objectid-string-utils
Helpers to pars/stringify hexadecimal representation of an ObjectId (MongoDB)
Modules ## Functions
- parse(id) ⇒
Object
Parse an hexadecimal object id and return it parts
- stringify(parts) ⇒
String
Build an haxadecimal string from the various parts of an ObjectId
Object
Parse an hexadecimal object id and return it parts
Kind: global function
Returns: Object
- Hash containing the various parts (timestamp, machine, pid, increment)
Param | Type | Description |
---|---|---|
id | String |
The ObjectId to parse |
String
stringify(parts) ⇒ Build an haxadecimal string from the various parts of an ObjectId
Kind: global function
Returns: String
- The ObjectId string representation
Param | Type | Description |
---|---|---|
parts | Object |
The given parts |