Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    mongoose-longpublic

    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

    install

    npm i mongoose-long

    Downloadslast 7 days

    2,307

    version

    0.2.0

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar
    • avatar