mongoose-long

Long number type for Mongoose

npm install mongoose-long
13 downloads in the last day
84 downloads in the last week
457 downloads in the last month

mongoose-long

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

Provides Number Long support for Mongoose.

Build Status

Example:

var mongoose = require('mongoose')
require('mongoose-long')(mongoose);

var SchemaTypes = mongoose.Schema.Types;
var partSchema = new Schema({ long: SchemaTypes.Long });

var Part = db.model('Part', partSchema);
var part = new Part({ long: "9223372036854775806" });

var Long = mongoose.Types.Long;
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

npm loves you