-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
breaking changesChange that can breaking existing codeChange that can breaking existing codefeatureNew functionality or improvementNew functionality or improvement
Milestone
Description
Context
- node version: 6.9
- joi version: 10.6.1
const schema = Joi.lazy(() => Joi.any()).once()Since fn for Joi.lazy(fn) should return joi schema, it's okay to be called once to avoid unnecessary overhead.
(+) My other need is describing lazily-loaded schema with Joi.describe().
If lazy.once() replace the schema as lazily loaded schema itself, we can now describe the lazy schema as well. (Could it be another feature request for Joi.describe()? )
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
breaking changesChange that can breaking existing codeChange that can breaking existing codefeatureNew functionality or improvementNew functionality or improvement