1.0.0 • Published 4 years ago
ox-tool v1.0.0
mongodb-objectid
id to timestamp in ms
creating id
Install
npm i ox-tool --save
Usage
const { toTimestamp, createId } = require('ox-tool');
const time = toTimestamp('563229dd1ee6030100644cbe');
console.log(time); // 1446128093391
const id = createId();
console.log(id); // new objectId
const arr = anEmptyArray([])
console.log(arr); // true
const obj = anEmptyObject({})
console.log(obj); // true
Test
npm test
License
MIT
1.0.0
4 years ago