-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
featureNew functionality or improvementNew functionality or improvement
Milestone
Description
While the object.keys(schema) method allows an existing schema to be extended, the behaviour when no keys are present does not align with what I expect. Namely undefined, null, & {} does not extend the existing schema, but for some reason replaces it.
This means that if I want to optionally extend a schema, I will need to manually test the extension for these values, to avoid calling object.keys() with it.
As such, I would like to propose an object.append(schema) method, which will do nothing for these values, and otherwise do what object.keys(schema) does.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureNew functionality or improvementNew functionality or improvement