Provides Number Long support for Mongoose
Switch branches/tags
Clone or download
Latest commit 19ca880 May 17, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib add bitsAnySet and bitsAllSet May 14, 2018
test chore: fix build Feb 26, 2018
.gitignore [FIXED] Incorrect variable reference. Oct 16, 2012
.travis.yml chore: fix build Feb 26, 2018
History.md chore: release 0.2.1 May 17, 2018
LICENSE initial commit Aug 1, 2012
Makefile simplify test flags Oct 18, 2012
README.md docs: fix build badge May 17, 2018
index.js initial commit Aug 1, 2012
package-lock.json chore: release 0.2.1 May 17, 2018
package.json chore: release 0.2.1 May 17, 2018

README.md

#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