@merlin4/helpers
v1.0.0
Published
A suite of small helper functions for backend nodejs services.
Downloads
4
Readme
@merlin4/helpers
A suite of small helper functions for backend nodejs services.
Helper functions included:
sleep(ms)- create a promise that resolves aftermsmillisecondsarrayToIterator(arr)- convert an array to an iteratoriteratorToArray(itr)- convert an iterator to an arraychunkAsync(chunkSize, items)- chunk and iterator/array into batcheschunkSync(chunkSize, items)- chunk and iterator/array into batchesmeasureNow()andmeasureDur(end, start)- measure the time between two points in time using process.hrtime.bigint()replaceAll()-String.replaceAll()wrapper with partial support for older version of javascript
