ObjectArray constructor
|
ObjectArray#constructor |
should create a void instance of ObjectArray
|
- |
should create a data instance of ObjectArray
|
- |
should create a nested data instance of ObjectArray
|
- |
should preserve ObjectArray data if ObjectArray is given in arguments
|
- |
ObjectArray define function
|
ObjectArray#define |
should create a default value for new key
|
- |
should create a default value for new dotted key
|
- |
should not override existent value
|
- |
Data getter and setter
|
ObjectArray#data |
should get and set data
|
- |
Global throwing behaviour override
|
ObjectArray#throwing |
should always throw an exception
|
- |
should never throw an exception
|
- |
Parent key memorizer
|
ObjectArray#pKey |
should use memorizer when using data read/write methods
|
- |
Key constructor
|
ObjectArray#_key |
should return dotted key
|
- |
should return undefined
|
- |
should throw exception
|
- |
Cloning ObjectArray
|
ObjectArray#clone
ObjectArray#flatten |
should return a clone with empty data
|
- |
should return a clone with nested data
|
- |
should restore data in clone after flattening original
|
- |
should restore data in clone after dotted flattening original
|
- |
Empty ObjectArray or remove subset
|
ObjectArray#empty |
should empty all data
|
- |
should empty subset
|
- |
should throw an exception if key missing
|
- |
should do nothing if key missing
|
- |
Length
|
ObjectArray#length |
should returns length
|
- |
should throw an exception if key missing
|
- |
should return undefined if key missing
|
- |
ObjectArray keys and values
|
- |
should returns keys
|
- |
should returns values
|
- |
should returns right keys and values for dotted object
|
- |
Has key, data fetch and parent data fetch
|
- |
should find key
|
- |
should find data
|
- |
should find parent key
|
- |
Check key/value
|
- |
Strict equality
|
- |
Loose equality
|
- |
Flatten ObjectArray
|
- |
should change nothing if data empty
|
- |
should change nothing if data already flattened
|
- |
should flatten dataset
|
- |
should flatten dataset and replace
|
- |
should flatten dataset and dot keys
|
- |
should flatten subdataset and no change
|
- |
should throw an exception if key does not exist
|
- |
should flatten subdataset
|
- |
should flatten subdataset and dot keys
|
- |
Data manipulation
|
- |
should create all needed keys
|
- |
should push or import ObjectArray without losing data
|
- |
should use pull as an alias to dataset
|
- |
should use pull as an alias to dataset with parent key
|
- |
should create all needed keys
|
- |
should create all needed keys
|
- |
should push simple data
|
- |
should remove simple data
|
- |
should push dotted data
|
- |
should remove dotted data
|
- |
should throw an exception if key not a string
|
- |
should throw an exception if parent key is not a string
|
- |
Fetch and getset
|
- |
should getset data and throw an exception if inexistent key
|
- |
should pull data and returns undefined if inexistent key
|
- |
ObjectArray iterations
|
ObjectArray#forEach
ObjectArray#reduce |
should iterate a callback with forEach
|
- |
should iterate a callback with forEach on a dotted key
|
- |
should throw an exception with forEach
|
- |
should do nothing with forEach and bad key
|
- |
should reduce the data
|
- |
should reduce the data of a subset
|
- |
Serializers
|
- |
should return a style type string
|
- |
should return a style type string from subset or undefined
|
- |
should import a style type string
|
- |
should throw an exception if bad string provided
|
- |
should return a url encoded string
|
- |
should return a form url encoded string
|
- |
should return undefined as form url encoded string with unknown key
|
- |
Import JSON and change keys
|
- |
should import JSON and change keys
|
- |
Camel and dash
|
ObjectArray#camelize
ObjectArray#dashize |
should camelize space and dashed strings
|
- |
should dashize space and uppercase letter
|
- |
Check subkey existence evaluation on various data types
|
*
*
* |
should return undefined if key does not exist under an empty object
|
- |
should return undefined if key does not exist under a boolean value
|
- |
should return undefined if key does not exist under a null value
|
- |
should return undefined if key does not exist under a string value
|
- |