ut-function.transform
v1.3.1
Published
Used to map db result set to json object based on the config object
Downloads
22
Readme
ut-function.transform
Used to map db result set to json object based on the config object
Usage
const {diff, after, isAfter, now, spare} = require('ut-function.timing')
Where
diff(time1, time2)
- difference in milliseconds between two high resolution time valuestime1
andtime2
after(interval)
- get local high resolution time value after specified timeinterval
in millisecondsisAfter(time, timeout)
- check if high resolutiontime
is after high resolution valuetimeout
now
- get curren time as high resolution valuespare(time, latency)
- get remaining time between current time and passedtime
, minus the optional expected network or otherlatency