Gathering detailed insights and metrics for mongoose-commons
Gathering detailed insights and metrics for mongoose-commons
Gathering detailed insights and metrics for mongoose-commons
Gathering detailed insights and metrics for mongoose-commons
npm install mongoose-commons
Typescript
Module System
NPM Version
CoffeeScript (91.96%)
Shell (8.04%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
1 Stars
8 Commits
1 Forks
1 Watchers
1 Branches
2 Contributors
Updated on Nov 29, 2014
Latest Version
0.1.3
Package Id
mongoose-commons@0.1.3
Size
5.59 kB
NPM Version
1.4.3
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Mongoose common plugins executed on all Schemas.Learn from mongoose-times
npm install mongoose-commons
For more details, visit the mongoose-commons on npm page
The examples below create a model that will include createdAt
and updatedAt
properties in their schema. Those properties will have timestamps that are automatically generated and updated when you save your document.
1mongoose = require "mongoose" 2timestamps = require("mongoose-commons").timestamp 3 4ExampleSchema = new Schema {} 5ExampleSchema.plugin timestamps 6 7example = mongoose.model "Example", ExampleSchema
If you'd like to change the name of the key properties in your document just set them when calling the plugin method with the createdAt
and updatedAt
options
ExampleSchema.plugin timestamps, { createdAt: "created_at", updatedAt: "updated_at" }
1var mongoose = require("mongoose"), 2 timestamps = require("mongoose-commons").timestamp; 3 4var ExampleSchema = new Schema({}); 5ExampleSchema.plugin(timestamps); 6 7var example = mongoose.model("Example", ExampleSchema);
Again, if you'd like to change the name of the key properties in your document just then when calling the plugin method with the createdAt
and updatedAt
options
ExampleSchema.plugin(timestamps, { createdAt: "created_at", updatedAt: "updated_at" });
The MIT License (MIT)
Copyright (c) 2014 meepo@bigcoor.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
Found 0/8 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More