objectid-string-utils

1.0.1 • Public • Published

objectid-string-utils

Helpers to pars/stringify hexadecimal representation of an ObjectId (MongoDB)

NPM version Build status Dependency Status devDependency Status Coverage Status

Modules

objectid-string-utils
## 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

## objectid-string-utils ## parse(id) ⇒ 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

stringify(parts) ⇒ String

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

Package Sidebar

Install

npm i objectid-string-utils

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • nfroidure