cubus
cubus means cube in Latin.
Install
npm i cubus
Usage
suppose you want to build a cube...
Build?
const dimensions = 'time' 'x' 'y' // new a cube with that three dimensionsconst cube = dimensions // and add whatever value to dimensionscubecubecube cubecubecube cube // add datum to the cubecube // why not chain it up?cube
Query?
cube// will give you value and property//// [// {// "value": "A",// "property": [// {// "name": "time",// "value": "20180101"// },// {// "name": "x",// "value": "4"// },// {// "name": "y",// "value": "1"// }// ]// },// {// "value": "B",// "property": [// {// "name": "time",// "value": "20180101"// },// {// "name": "x",// "value": "5"// },// {// "name": "y",// "value": "1"// }// ]// },// {// "value": "C",// "property": [// {// "name": "time",// "value": "20180102"// },// {// "name": "x",// "value": "6"// },// {// "name": "y",// "value": "1"// }// ]// }// ] // true means yes, give me raw datacube// give you//// [// "A",// "B",// "C"// ] // multiple conditionscube// give you// [// "C"// ]
Remove?
// just claim the conditionscube
well I need to remove one by one?
// CLEAR backs you upcubeclear
export and import?
// in case you want to transport data to somewhere via http or whateverconst json = cube anotherCube
API
to be filled
License
MIT