Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yamadapc/mongoose-uniqueid
Mongoose UniqueId: A plugin that provides, unique "_id's" accross models
https://github.com/yamadapc/mongoose-uniqueid
Last synced: 15 days ago
JSON representation
Mongoose UniqueId: A plugin that provides, unique "_id's" accross models
- Host: GitHub
- URL: https://github.com/yamadapc/mongoose-uniqueid
- Owner: yamadapc
- License: mit
- Created: 2013-10-28T21:53:29.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2016-04-03T16:53:00.000Z (almost 9 years ago)
- Last Synced: 2024-12-24T11:57:59.838Z (17 days ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mongoose-uniqueid [![Build Status](https://secure.travis-ci.org/yamadapc/mongoose-uniqueid.png?branch=master)](http://travis-ci.org/yamadapc/mongoose-uniqueid)
A mongoose plugin for having a unique ObjectId (the '\_id' property) across
several collections.## Getting Started
Install the module with: `npm install mongoose-uniqueid````javascript
var mongoose = require('mongoose'),
Schema = mongoose.Schema
uniqueid = require('mongoose-uniqueid');var UserSchema = new Schema({}, {_id: false});
UserSchema.plugin(uniqueid, {
models: ['users', 'organizations']
});var OrganizationSchema = new Schema({}, {_id: false});
```
## Documentation
_(Coming soon)_## Examples
_(Coming soon)_## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding
style. Add unit tests for any new or changed functionality.## License
Copyright (c) 2013 Pedro Yamada. Licensed under the MIT license.## Donations
Would you like to buy me a beer? Send bitcoin to 3JjxJydvoJjTrhLL86LGMc8cNB16pTAF3y