nv-facutil-time-relation
v1.0.1
Published
nv-facutil-time-relation ====================== - nv-facutil-time-relation - simple overlap time-range utils - for time-sensitive actions
Downloads
1
Readme
nv-facutil-time-relation
- nv-facutil-time-relation
- simple overlap time-range utils
- for time-sensitive actions
install
- npm install nv-facutil-time-relation
usage
const {
ERRORS,
load_from_json
} = require("nv-facutil-time-relation")
example
var J = [
['task1',[2000,9000],0], ['task4',[11000,16000],0],
['task2',[8000,13500],1], ['task6',[18000,21000],1],
['task0',[1000,4000],2], ['task3',[7000,12000],2], ['task5',[15500,19000],2],
]
var ctrl = load_from_json(J)
> var ctrl = load_from_json(J)
undefined
> ctrl.task0
_TM [[
"task0",
[
1000,
4000
],
2
]] {}
> ctrl.task0.serial_
[
[ null, [ 2000, 1000 ] ],
[ 'task0', [ 1000, 4000 ] ],
[ null, [ 4000, 7000 ] ],
[ 'task3', [ 7000, 12000 ] ],
[ null, [ 12000, 15500 ] ],
[ 'task5', [ 15500, 19000 ] ]
]
METHODS
> ctrl.
ctrl.E_ ctrl.S_ ctrl.add
ctrl.line ctrl.list
> ctrl.task0.
ctrl.task0.del ctrl.task0.end_
ctrl.task0.json ctrl.task0.line_ ctrl.task0.name_
ctrl.task0.overlap ctrl.task0.serial_ ctrl.task0.start_
ctrl.task0.units_
APIS
LICENSE
- ISC