2.0.0 • Published 7 years ago
@hamgom95/objtools v2.0.0
@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.
| Param | Description |
|---|---|
| key | Key in object. |
| defaultValue | Default value to set if property not found. |
getPath(...levels) ⇒
Get value at path in object.
Kind: global function
Returns: Value at path.
| Param | Description |
|---|---|
| ...levels | Path in object. |
setPath(value, ...levels) ⇒
Set value at path in object.
Kind: global function
Returns: Set value at path.
| Param | Description |
|---|---|
| value | Value to set at path. |
| ...levels | Path in object. |
register(cls) ⇒
Register object methods to cls.
Kind: global function
Returns: Mixed in class.
| Param | Description |
|---|---|
| cls | Class to add methods to. |
2.0.0
7 years ago