- AbstractGenerator
Abstract generator which must be implemented by each language
- AbstractRenderer
Abstract renderer with common helper methods
- AsyncapiV2Schema
AsyncAPI schema model
Based on Draft 7 with additions
https://www.asyncapi.com/docs/specifications/v2.0.0#schemaObject https://www.asyncapi.com/docs/specifications/v2.1.0#schemaObject https://www.asyncapi.com/docs/specifications/v2.2.0#schemaObject https://www.asyncapi.com/docs/specifications/v2.3.0#schemaObject
- CommonModel
Common internal representation for a model.
- Draft4Schema
JSON Draft 4 schema model
- Draft6Schema
JSON Draft 6 schema model
- Draft7Schema
JSON Draft7Schema Draft 7 model
- InputMetaModel
Since each input processor can create multiple meta models this is a wrapper to a MetaModel to make that possible.
- OpenapiV3Schema
OpenAPI 3.0 -> 3.0.4 schema model
Based on Draft 6, but with restricted keywords and definitions Modifications
- type, cannot be an array nor contain 'null'
Restrictions (keywords not allowed)
- patternProperties
- not
- OutputModel
Common representation for the output model.
- RenderOutput
Common representation for the rendered output.
- SwaggerV2Schema
OpenAPI 2.0 (Swagger 2.0) schema model
Based on Draft 4, but with restricted keywords and definitions
Restrictions (keywords not allowed)
- oneOf
- anyOf
- patternProperties
- not
- AsyncAPIInputProcessor
Class for processing AsyncAPI inputs
- InputProcessor
Main input processor which figures out the type of input it receives and delegates the processing into separate individual processors.
- JsonSchemaInputProcessor
Class for processing JSON Schema
- OpenAPIInputProcessor
Class for processing OpenAPI V3.0 inputs
- SwaggerInputProcessor
Class for processing Swagger inputs
- TemplateInputProcessor
Class for processing X input
- LoggerClass
Logger class for the model generation library
This class acts as a forefront for any external loggers which is why it also implements the interface itself.
- convertToUnionModel()
Converts a CommonModel into multiple models wrapped in a union model.
Because a CommonModel might contain multiple models, it's name for each of those models would be the same, instead we slightly change the model name. Each model has it's type as a name prepended to the union name.
If the CommonModel has multiple types
- isDictionary()
Determine whether we have a dictionary or an object. because in some cases inputs might be: { "type": "object", "additionalProperties": { "$ref": "#" } } which is to be interpreted as a dictionary not an object model.
- getOriginalInputFromAdditionalAndPatterns()
Return the original input based on additionalProperties and patternProperties.
- convertAdditionalAndPatterns()
Function creating the right meta model based on additionalProperties and patternProperties.
- NO_DUPLICATE_PROPERTIES(constrainedObjectModel, objectModel, propertyName, namingFormatter)
Because a lot of the other constrain functions (such as NO_NUMBER_START_CHAR, NO_EMPTY_VALUE, etc) they might manipulate the property names by append, prepend, or manipulate it any other way. We then need to make sure that they don't clash with any existing properties, this is what this function handles. If so, prepend
reserved_
to the property name and recheck.- NO_DUPLICATE_ENUM_KEYS(constrainedEnumModel, enumModel, enumKey, namingFormatter, enumKeyToCheck, onNameChange, onNameChangeToCheck) ⇒
string
Because a lot of the other constrain functions (such as NO_NUMBER_START_CHAR, NO_EMPTY_VALUE, etc) they might manipulate the enum keys by append, prepend, or manipulate it any other way. We then need to make sure that they don't clash with any existing enum keys, this is what this function handles. If so, prepend
reserved_
to the enum key and recheck.- renderJavaScriptDependency(toImport, fromModule, moduleSystem)
Function to make it easier to render JS/TS dependencies based on module system
- makeUnique(array)
Function to make an array of ConstrainedMetaModels only contain unique values (ignores different in memory instances)
- lengthInUtf8Bytes()
Convert a string into utf-8 encoding and return the byte size.
- hasPreset(presets, preset)
Returns true if and only if a given preset is already included in a list of presets Check is done using referential equality
- trySplitModel(model, options, models) ⇒
Try split the model
- split(model, options, models) ⇒
Overwrite the nested models with references where required.
- interpretAdditionalItems(schema, model, interpreter, interpreterOptions)
Interpreter function for additionalItems keyword.
- interpretAdditionalProperties(schema, model, interpreter, interpreterOptions)
Interpreter function for additionalProperties keyword.
- interpretAllOf(schema, model, interpreter, interpreterOptions)
Interpreter function for allOf keyword.
It either merges allOf schemas into existing model or if allowed, create inheritance.
- interpretAnyOf(schema, model, interpreter, interpreterOptions)
Interpreter function for anyOf keyword.
It puts the schema reference into the items field.
- interpretConst(schema, model)
Interpreter function for const keyword for draft version > 4
- interpretDependencies(schema, model)
Interpreter function for dependencies keyword.
- interpretEnum(schema, model)
Interpreter function for enum keyword
- interpretItems(schema, model, interpreter, interpreterOptions)
Interpreter function for items keyword.
- interpretArrayItems(rootSchema, itemSchemas, model, interpreter, interpreterOptions)
Internal function to process all item schemas
- interpretNot(schema, model, interpreter, interpreterOptions)
Interpreter function for not keyword.
- interpretOneOf(schema, model, interpreter, interpreterOptions)
Interpreter function for oneOf keyword.
It puts the schema reference into the items field.
- interpretOneOfWithAllOf(schema, model, interpreter, interpreterOptions)
Interpreter function for oneOf keyword combined with the allOf keyword.
It merges the allOf schemas into all of the oneOf schemas. Shared properties are merged. The oneOf schemas are then added as union to the model.
- interpretOneOfWithProperties(schema, model, interpreter, interpreterOptions)
Interpreter function for oneOf keyword combined with properties.
It merges the properties of the schema into the oneOf schemas. Shared properties are merged. The oneOf schemas are then added as union to the model.
- interpretPatternProperties(schema, model, interpreter, interpreterOptions)
Interpreter function for patternProperties keyword.
- interpretProperties(schema, model, interpreter, interpreterOptions)
Interpreter function for interpreting properties keyword.
- isEnum(model)
Check if CommonModel is an enum
- isModelObject(model)
Check if CommonModel is a separate model or a simple model.
- inferTypeFromValue(value)
Infers the JSON Schema type from value
- interpretName(schema)
Find the name for simplified version of schema
- isClass(obj)
Return true or false based on whether the input object is a regular object or a class
Taken from: https://stackoverflow.com/a/43197340/6803886
- mergePartialAndDefault()
Merge a non optional value with custom optional values to form a full value that has all properties sat.
Abstract generator which must be implemented by each language
Kind: global class
This function returns an instance of the dependency manager which is either a factory or an instance.
Kind: instance method of AbstractGenerator
Generates the full output of a model, instead of a scattered model.
OutputModels result is no longer the model itself, but including package, package dependencies and model dependencies.
Kind: instance method of AbstractGenerator
Generates a scattered model where dependencies and rendered results are separated.
Kind: instance method of AbstractGenerator
Process any of the input formats to the appropriate InputMetaModel type and split out the meta models based on the requirements of the generators
Kind: instance method of AbstractGenerator
Param |
---|
input |
Get all presets (default and custom ones from options) for a given preset type (class, enum, etc).
Kind: instance method of AbstractGenerator
Abstract renderer with common helper methods
AsyncAPI schema model
Based on Draft 7 with additions
https://www.asyncapi.com/docs/specifications/v2.0.0#schemaObject https://www.asyncapi.com/docs/specifications/v2.1.0#schemaObject https://www.asyncapi.com/docs/specifications/v2.2.0#schemaObject https://www.asyncapi.com/docs/specifications/v2.3.0#schemaObject
Takes a deep copy of the input object and converts it to an instance of AsyncapiV2Schema.
Kind: static method of AsyncapiV2Schema
Param |
---|
object |
Common internal representation for a model.
Kind: global class
- CommonModel
- instance
- .getFromOriginalInput(key) ⇒
any
- .setType(type)
- .removeType(types)
- .addTypes(types)
- .isRequired(propertyName) ⇒
boolean
- .addItem(itemModel, originalInput)
- .addItemTuple(tupleModel, originalInput, index)
- .addItemUnion(unionModel)
- .addEnum(enumValue)
- .removeEnum(enumValue)
- .addProperty(propertyName, propertyModel, originalInput)
- .addAdditionalProperty(additionalPropertiesModel, originalInput)
- .addPatternProperty(pattern, patternModel, originalInput)
- .addAdditionalItems(additionalItemsModel, originalInput)
- .addExtendedModel(extendedModel)
- .getFromOriginalInput(key) ⇒
- static
- .toCommonModel(object) ⇒
- .mergeProperties(mergeTo, mergeFrom, originalInput, alreadyIteratedModels)
- .mergeAdditionalProperties(mergeTo, mergeFrom, originalInput, alreadyIteratedModels)
- .mergeAdditionalItems(mergeTo, mergeFrom, originalInput, alreadyIteratedModels)
- .mergeItems(mergeTo, mergeFrom, originalInput, alreadyIteratedModels)
- .mergePatternProperties(mergeTo, mergeFrom, originalInput, alreadyIteratedModels)
- .mergeTypes(mergeTo, mergeFrom)
- .mergeCommonModels(mergeTo, mergeFrom, originalInput, alreadyIteratedModels)
- instance
Retrieves data from originalInput by given key
Kind: instance method of CommonModel
Param | Description |
---|---|
key | given key |
Set the types of the model
Kind: instance method of CommonModel
Param |
---|
type |
Removes type(s) from model type
Kind: instance method of CommonModel
Param |
---|
types |
Adds types to the existing model types.
Makes sure to only keep a single type incase of duplicates.
Kind: instance method of CommonModel
Param | Description |
---|---|
types | which types we should try and add to the existing output |
Checks if given property name is required in object
Kind: instance method of CommonModel
Param | Description |
---|---|
propertyName | given property name |
Adds an item to the model.
If items already exist the two are merged.
Kind: instance method of CommonModel
Param | Description |
---|---|
itemModel | |
originalInput | corresponding input that got interpreted to this model |
Adds a tuple to the model.
If a item already exist it will be merged.
Kind: instance method of CommonModel
Param | Description |
---|---|
tupleModel | |
originalInput | corresponding input that got interpreted to this model |
index |
Adds a union model to the model.
Kind: instance method of CommonModel
Param |
---|
unionModel |
Add enum value to the model.
Ensures no duplicates are added.
Kind: instance method of CommonModel
Param |
---|
enumValue |
Remove enum from model.
Kind: instance method of CommonModel
Param |
---|
enumValue |
Adds a property to the model. If the property already exist the two are merged.
Kind: instance method of CommonModel
Param | Description |
---|---|
propertyName | |
propertyModel | |
originalInput | corresponding input that got interpreted to this model |
Adds additionalProperty to the model. If another model already exist the two are merged.
Kind: instance method of CommonModel
Param | Description |
---|---|
additionalPropertiesModel | |
originalInput | corresponding input that got interpreted to this model corresponding input that got interpreted to this model |
Adds a patternProperty to the model. If the pattern already exist the two models are merged.
Kind: instance method of CommonModel
Param | Description |
---|---|
pattern | |
patternModel | |
originalInput | corresponding input that got interpreted to this model |
Adds additionalItems to the model. If another model already exist the two are merged.
Kind: instance method of CommonModel
Param | Description |
---|---|
additionalItemsModel | |
originalInput | corresponding input that got interpreted to this model |
Adds another model this model should extend.
It is only allowed to extend if the other model have $id and is not already being extended.
Kind: instance method of CommonModel
Param |
---|
extendedModel |
Takes a deep copy of the input object and converts it to an instance of CommonModel.
Kind: static method of CommonModel
Returns: CommonModel instance of the object
Param | Description |
---|---|
object | to transform |
Merge two common model properties together
Kind: static method of CommonModel
Param | Description |
---|---|
mergeTo | |
mergeFrom | |
originalInput | corresponding input that got interpreted to this model |
alreadyIteratedModels |
Merge two common model additionalProperties together
Kind: static method of CommonModel
Param | Description |
---|---|
mergeTo | |
mergeFrom | |
originalInput | corresponding input that got interpreted to this model |
alreadyIteratedModels |
Merge two common model additionalItems together
Kind: static method of CommonModel
Param | Description |
---|---|
mergeTo | |
mergeFrom | |
originalInput | corresponding input that got interpreted to this model |
alreadyIteratedModels |
Merge items together, prefer tuples over simple array since it is more strict.
Kind: static method of CommonModel
Param | Description |
---|---|
mergeTo | |
mergeFrom | |
originalInput | corresponding input that got interpreted to this model |
alreadyIteratedModels |
Merge two common model pattern properties together
Kind: static method of CommonModel
Param | Description |
---|---|
mergeTo | |
mergeFrom | |
originalInput | corresponding input that got interpreted to this model |
alreadyIteratedModels |
Merge types together
Kind: static method of CommonModel
Param |
---|
mergeTo |
mergeFrom |
Only merge if left side is undefined and right side is sat OR both sides are defined
Kind: static method of CommonModel
Param | Description |
---|---|
mergeTo | |
mergeFrom | |
originalInput | corresponding input that got interpreted to this model |
alreadyIteratedModels |
JSON Draft 4 schema model
Takes a deep copy of the input object and converts it to an instance of Draft4Schema.
Kind: static method of Draft4Schema
Param |
---|
object |
JSON Draft 6 schema model
Takes a deep copy of the input object and converts it to an instance of Draft6Schema.
Kind: static method of Draft6Schema
Param |
---|
object |
JSON Draft7Schema Draft 7 model
Takes a deep copy of the input object and converts it to an instance of Draft7Schema.
Kind: static method of Draft7Schema
Param |
---|
object |
Since each input processor can create multiple meta models this is a wrapper to a MetaModel to make that possible.
OpenAPI 3.0 -> 3.0.4 schema model
Based on Draft 6, but with restricted keywords and definitions Modifications
- type, cannot be an array nor contain 'null'
Restrictions (keywords not allowed)
- patternProperties
- not
https://swagger.io/specification/#schema-object
Takes a deep copy of the input object and converts it to an instance of OpenapiV3Schema.
Kind: static method of OpenapiV3Schema
Param |
---|
object |
Common representation for the output model.
Common representation for the rendered output.
OpenAPI 2.0 (Swagger 2.0) schema model
Based on Draft 4, but with restricted keywords and definitions
Restrictions (keywords not allowed)
- oneOf
- anyOf
- patternProperties
- not
https://swagger.io/specification/v2/#schemaObject
Takes a deep copy of the input object and converts it to an instance of SwaggerV2Schema.
Kind: static method of SwaggerV2Schema
Param |
---|
object |
Class for processing AsyncAPI inputs
Kind: global class
Process the input as an AsyncAPI document
Kind: instance method of AsyncAPIInputProcessor
Param |
---|
input |
Figures out if an object is of type AsyncAPI document
Kind: instance method of AsyncAPIInputProcessor
Param |
---|
input |
Try to find the AsyncAPI version from the input. If it cannot undefined are returned, if it can, the version is returned.
Kind: instance method of AsyncAPIInputProcessor
Param |
---|
input |
Figure out if input is from the AsyncAPI parser.
Kind: static method of AsyncAPIInputProcessor
Param |
---|
input |
Figure out if input is from the new AsyncAPI parser.
Kind: static method of AsyncAPIInputProcessor
Param |
---|
input |
Main input processor which figures out the type of input it receives and delegates the processing into separate individual processors.
Kind: global class
Set a processor.
Kind: instance method of InputProcessor
Param | Description |
---|---|
type | of processor |
processor |
Kind: instance method of InputProcessor
Returns: all processors
The processor code which delegates the processing to the correct implementation.
Kind: instance method of InputProcessor
Param | Description |
---|---|
input | to process |
options | passed to the processors |
Class for processing JSON Schema
Kind: global class
Function for processing a JSON Schema input.
Kind: instance method of JsonSchemaInputProcessor
Param |
---|
input |
Unless the schema states one that is not supported we assume its of type JSON Schema
Kind: instance method of JsonSchemaInputProcessor
Param |
---|
input |
Process a draft-7 schema
Kind: instance method of JsonSchemaInputProcessor
Param | Description |
---|---|
input | to process as draft 7 |
Process a draft-4 schema
Kind: instance method of JsonSchemaInputProcessor
Param | Description |
---|---|
input | to process as draft 4 |
Process a draft-6 schema
Kind: instance method of JsonSchemaInputProcessor
Param | Description |
---|---|
input | to process as draft-6 |
This is a hotfix and really only a partial solution as it does not cover all cases.
But it's the best we can do until we find or build a better library to handle references.
Kind: instance method of JsonSchemaInputProcessor
Each schema must have a name, so when later interpreted, the model have the most accurate model name.
Reflect name from given schema and save it to x-modelgen-inferred-name
extension.
This reflects all the common keywords that are shared between draft-4, draft-7 and Swagger 2.0 Schema
Kind: static method of JsonSchemaInputProcessor
Param | Description |
---|---|
schema | to process |
namesStack | is a aggegator of previous used names |
name | to infer |
isRoot | indicates if performed schema is a root schema |
Ensure schema name using previous name and new part
Kind: static method of JsonSchemaInputProcessor
Param | Description |
---|---|
previousName | to concatenate with |
...newParts |
Simplifies a JSON Schema into a common models
Kind: static method of JsonSchemaInputProcessor
Param | Description |
---|---|
schema | to simplify to common model |
Class for processing OpenAPI V3.0 inputs
Kind: global class
Process the input as a OpenAPI V3.0 document
Kind: instance method of OpenAPIInputProcessor
Param |
---|
input |
Figures out if an object is of type OpenAPI V3.0.x document and supported
Kind: instance method of OpenAPIInputProcessor
Param |
---|
input |
Try to find the AsyncAPI version from the input. If it cannot undefined are returned, if it can, the version is returned.
Kind: instance method of OpenAPIInputProcessor
Param |
---|
input |
Converts a schema to the internal schema format.
Kind: static method of OpenAPIInputProcessor
Param | Description |
---|---|
schema | to convert |
name | of the schema |
Class for processing Swagger inputs
Kind: global class
Process the input as a Swagger document
Kind: instance method of SwaggerInputProcessor
Param |
---|
input |
Figures out if an object is of type Swagger document and supported
Kind: instance method of SwaggerInputProcessor
Param |
---|
input |
Try to find the swagger version from the input. If it cannot, undefined are returned, if it can, the version is returned.
Kind: instance method of SwaggerInputProcessor
Param |
---|
input |
Converts a Swagger 2.0 Schema to the internal schema format.
Kind: static method of SwaggerInputProcessor
Param | Description |
---|---|
schema | to convert |
name | of the schema |
Class for processing X input
Logger class for the model generation library
This class acts as a forefront for any external loggers which is why it also implements the interface itself.
Sets the logger to use for the model generation library
Kind: instance method of LoggerClass
Param | Description |
---|---|
logger | to add |
Converts a CommonModel into multiple models wrapped in a union model.
Because a CommonModel might contain multiple models, it's name for each of those models would be the same, instead we slightly change the model name. Each model has it's type as a name prepended to the union name.
If the CommonModel has multiple types
Determine whether we have a dictionary or an object. because in some cases inputs might be: { "type": "object", "additionalProperties": { "$ref": "#" } } which is to be interpreted as a dictionary not an object model.
Return the original input based on additionalProperties and patternProperties.
Function creating the right meta model based on additionalProperties and patternProperties.
Because a lot of the other constrain functions (such as NO_NUMBER_START_CHAR, NO_EMPTY_VALUE, etc) they might manipulate the property names by append, prepend, or manipulate it any other way.
We then need to make sure that they don't clash with any existing properties, this is what this function handles.
If so, prepend reserved_
to the property name and recheck.
Kind: global function
Param | Description |
---|---|
constrainedObjectModel | the current constrained object model, which contains already existing constrained properties |
objectModel | the raw object model which is non-constrained to the output language. |
propertyName | one of the properties in objectModel which might have been manipulated |
namingFormatter | the name formatter which are used to format the property key |
NO_DUPLICATE_ENUM_KEYS(constrainedEnumModel, enumModel, enumKey, namingFormatter, enumKeyToCheck, onNameChange, onNameChangeToCheck) ⇒ string
Because a lot of the other constrain functions (such as NO_NUMBER_START_CHAR, NO_EMPTY_VALUE, etc) they might manipulate the enum keys by append, prepend, or manipulate it any other way.
We then need to make sure that they don't clash with any existing enum keys, this is what this function handles.
If so, prepend reserved_
to the enum key and recheck.
Kind: global function
Returns: string
- the potential new enum key that does not clash with existing enum keys.
Param | Description |
---|---|
constrainedEnumModel | the current constrained enum model, which contains already existing constrained enum keys |
enumModel | the raw enum model which is non-constrained to the output language. |
enumKey | one of the enum keys in enumModel which might have been manipulated. |
namingFormatter | the name formatter which are used to format the enum key. |
enumKeyToCheck | the enum key to use for checking if it already exist, defaults to enumKey. |
onNameChange | callback to change the name of the enum key that needs to be returned. |
onNameChangeToCheck | callback to change the enum key which is being checked as part of the existing models. |
Function to make it easier to render JS/TS dependencies based on module system
Kind: global function
Param |
---|
toImport |
fromModule |
moduleSystem |
Function to make an array of ConstrainedMetaModels only contain unique values (ignores different in memory instances)
Kind: global function
Param | Description |
---|---|
array | to make unique |
Convert a string into utf-8 encoding and return the byte size.
Returns true if and only if a given preset is already included in a list of presets Check is done using referential equality
Kind: global function
Param | Description |
---|---|
presets | the list to check |
preset | the preset to check for |
Try split the model
Kind: global function
Returns: whether the new or old MetaModel to use.
Param |
---|
model |
options |
models |
Overwrite the nested models with references where required.
Kind: global function
Returns: an array of all the split models
Param |
---|
model |
options |
models |
Interpreter function for additionalItems keyword.
Kind: global function
Param | Description |
---|---|
schema | |
model | |
interpreter | |
interpreterOptions | to control the interpret process |
Interpreter function for additionalProperties keyword.
Kind: global function
Param | Description |
---|---|
schema | |
model | |
interpreter | |
interpreterOptions | to control the interpret process |
Interpreter function for allOf keyword.
It either merges allOf schemas into existing model or if allowed, create inheritance.
Kind: global function
Param | Description |
---|---|
schema | |
model | |
interpreter | |
interpreterOptions | to control the interpret process |
Interpreter function for anyOf keyword.
It puts the schema reference into the items field.
Kind: global function
Param | Description |
---|---|
schema | |
model | |
interpreter | |
interpreterOptions | to control the interpret process |
Interpreter function for const keyword for draft version > 4
Kind: global function
Param |
---|
schema |
model |
Interpreter function for dependencies keyword.
Kind: global function
Param |
---|
schema |
model |
Interpreter function for enum keyword
Kind: global function
Param |
---|
schema |
model |
Interpreter function for items keyword.
Kind: global function
Param | Description |
---|---|
schema | |
model | |
interpreter | |
interpreterOptions | to control the interpret process |
Internal function to process all item schemas
Kind: global function
Param | Description |
---|---|
rootSchema | |
itemSchemas | |
model | |
interpreter | |
interpreterOptions | to control the interpret process |
Interpreter function for not keyword.
Kind: global function
Param | Description |
---|---|
schema | |
model | |
interpreter | |
interpreterOptions | to control the interpret process |
Interpreter function for oneOf keyword.
It puts the schema reference into the items field.
Kind: global function
Param | Description |
---|---|
schema | |
model | |
interpreter | |
interpreterOptions | to control the interpret process |
Interpreter function for oneOf keyword combined with the allOf keyword.
It merges the allOf schemas into all of the oneOf schemas. Shared properties are merged. The oneOf schemas are then added as union to the model.
Kind: global function
Param | Description |
---|---|
schema | |
model | |
interpreter | |
interpreterOptions | to control the interpret process |
Interpreter function for oneOf keyword combined with properties.
It merges the properties of the schema into the oneOf schemas. Shared properties are merged. The oneOf schemas are then added as union to the model.
Kind: global function
Param | Description |
---|---|
schema | |
model | |
interpreter | |
interpreterOptions | to control the interpret process |
Interpreter function for patternProperties keyword.
Kind: global function
Param | Description |
---|---|
schema | |
model | |
interpreter | |
interpreterOptions | to control the interpret process |
Interpreter function for interpreting properties keyword.
Kind: global function
Param | Description |
---|---|
schema | |
model | |
interpreter | |
interpreterOptions | to control the interpret process |
Check if CommonModel is an enum
Kind: global function
Param |
---|
model |
Check if CommonModel is a separate model or a simple model.
Kind: global function
Param |
---|
model |
Infers the JSON Schema type from value
Kind: global function
Param | Description |
---|---|
value | to infer type of |
Find the name for simplified version of schema
Kind: global function
Param | Description |
---|---|
schema | to find the name |
Return true or false based on whether the input object is a regular object or a class
Taken from: https://stackoverflow.com/a/43197340/6803886
Kind: global function
Param |
---|
obj |
Merge a non optional value with custom optional values to form a full value that has all properties sat.
Kind: global function