Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 428 Bytes

README.md

File metadata and controls

23 lines (15 loc) · 428 Bytes

mongoose-uuid

mongoose-uuid is a plugin which adds uuid _id to a model

Example

var mongoose = require('mongoose');
var Schema   = mongoose.Schema;
var uuid = require('mongoose-uuid');

var UserSchema = new Schema({}, {_id: false});

UserSchema.plugin(uuid);

Installation

  • npm install mongoose-uuid --save

License

Copyright (c) 2014 Darin Lampson. Licensed under the MIT license.