normalize-mongodb-id

1.1.0 • Public • Published

normalize-mongodb-id

replace within a document the field _id by the id

Build StatusCode Coverage 100%ISC Licensenpm - v1.1.0

Example

var normalizeId = require('normalize-mongodb-id');

var doc = {
    '_id' : ObjectId('53d98f133bb604791249ca99'),
    'item' : 'ABC1',
    'category' : 'clothing'
};

console.log(normalizeId(doc));// now the doc have the id

Development

this projet has been set up with a precommit that forces you to follow a code style, no jshint issues and 100% of code coverage before commit

to run test

npm test

to run jshint

npm run jshint

to run code style

npm run code-style

to run check code coverage

npm run check-coverage

to open the code coverage report

npm run open-coverage

Readme

Keywords

Package Sidebar

Install

npm i normalize-mongodb-id

Weekly Downloads

0

Version

1.1.0

License

ISC

Last publish

Collaborators

  • dscape
  • quim