mongo-objectid-info
v0.1.0
Published
Get timestamp, machineId, processid and counter parts from mongo objectId
Downloads
3
Maintainers
Readme
mongo-objectId-info
Get building blocks of hexadecimal mongo objectId
$ npm install --save mongo-objectid-info
Usage
var idInfo = require('mongo-objectId-info');
var obj = idInfo.getInfo("507f1f77bcf86cd799439011");
console.log(obj);
/*
{ timestamp: 1350508407,
machineId: 12384364,
processId: 55193,
counter: 4427793 }
*/
//Values will be NaN for invalid hexadecimal objectId