Negatory. Postpone Mission.
Wondering what’s next for npm?Check out our public roadmap! »

mongoose-long

0.3.2 • Public • Published

mongoose-long

===============

Provides Number Long support for Mongoose.

Build Status

Example:

const mongoose = require('mongoose')
require('mongoose-long')(mongoose);
const {Types: {Long}} = mongoose;
 
const partSchema = new Schema({
  long: {
    type: Long,
  }
});
 
const Part = db.model('Part', partSchema);
const part = new Part({long: '9223372036854775806'});
 
part.long = part.long.divide(Long.fromString('2'));
part.save()

install

npm install mongoose-long

See node-mongodb-native docs on all the Long methods available.

LICENSE

Install

npm i mongoose-long

DownloadsWeekly Downloads

33,153

Version

0.3.2

License

MIT

Unpacked Size

11 kB

Total Files

9

Last publish

Collaborators

  • avatar
  • avatar