1.3.1 • Published 2 years ago
ut-function.transform v1.3.1
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 valuestime1andtime2after(interval)- get local high resolution time value after specified timeintervalin millisecondsisAfter(time, timeout)- check if high resolutiontimeis after high resolution valuetimeoutnow- get curren time as high resolution valuespare(time, latency)- get remaining time between current time and passedtime, minus the optional expected network or otherlatency