Makes the type accept null & undefined
Returns all shallow properties that accept undefined
or null
.
Does not include Optional properties, only undefined
or null
.
A new object with camel-cased keys
Wraps a constructor to not need the new
keyword using a proxy.
Only used for data types.
The class instance to wrap as invocable.
Wrapped class instance.
Assigns own and inherited enumerable string and symbol keyed properties of source objects to the destination object.
https://lodash.com/docs/4.17.4#defaults
Note: This method mutates object
.
The destination object.
The source objects.
Returns object
.
Receives a tree-like object and returns a plain object which depth is 1.
{ name: 'John', address: { street: 'Fake St. 123', coordinates: { longitude: 55.6779627, latitude: 12.5964313 } } }
{ name: 'John', address.street: 'Fake St. 123', address.coordinates.latitude: 55.6779627, address.coordinates.longitude: 12.5964313 }
an Object
a flattened object
Returns ENUM name by joining table and column name
getComplexKeys
All keys including operators
getComplexSize
Length of object properties including operators if obj is array returns its length
getOperators
All operators properties of obj
Checks if 2 arrays intersect.
Returns whether value
is using the nested syntax for attributes.
The attribute reference to check.
Returns true if a where clause is empty, even with Symbols
Joins an array with a single space, auto trimming when needed.
Certain elements do not get leading/trailing spaces.
The array to be joined. Falsy values are skipped. If an element is another array, this function will be called recursively on that array. Otherwise, if a non-string, non-falsy value is present, a TypeError will be thrown.
The joined string.
Expand and normalize finder options. Mutates the "options" parameter.
Used to map field names in attributes and where conditions.
Mutates the "options" parameter.
Used to map field names in values
An alternative to _.merge, which doesn't clone its arguments.
Does not mutate parameters.
Cloning is a bad idea because options arguments may contain references to sequelize models - which again reference database libs which don't like to be cloned (in particular pg-native)
Deeply merges object b
into a
.
Mutates a
.
Same concept as _.merge, but doesn't overwrite properties that have already been assigned.
Removes entries from hash
whose value is either null or undefined, unless omitNull
is false or allowNull
includes that key.
Keys ending with 'Id' are never removed.
the object from which entries with nullish values will be removed.
if false, this method returns the object as-is
A list of keys that must be preserved even if their value is null or undefined.
Stringify a value as JSON with some differences:
safeStringifyJson({ val: 1n })
outputs '{ "val": "1" }'
).
This is because of a decision by TC39 to not support bigint in JSON.stringify https://github.com/tc39/proposal-bigint/issues/24the value to stringify.
the resulting json.
Generated using TypeDoc
Makes all shallow properties of an object
optional
if they acceptundefined
ornull
as a value.