2.0.0 • Published 5 years ago

@hamgom95/objtools v2.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

@hamgom95/objtools

Object helper methods.

API Documentation

Functions

setDefault(key, defaultValue) ⇒

Get value for key in object or set default.

Kind: global function
Returns: Value for property in object.

ParamDescription
keyKey in object.
defaultValueDefault value to set if property not found.

getPath(...levels) ⇒

Get value at path in object.

Kind: global function
Returns: Value at path.

ParamDescription
...levelsPath in object.

setPath(value, ...levels) ⇒

Set value at path in object.

Kind: global function
Returns: Set value at path.

ParamDescription
valueValue to set at path.
...levelsPath in object.

register(cls) ⇒

Register object methods to cls.

Kind: global function
Returns: Mixed in class.

ParamDescription
clsClass to add methods to.