
Security News
curl Shuts Down Bug Bounty Program After Flood of AI Slop Reports
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.
mongorito-timestamps
Advanced tools
Plugin to add "created" and "updated" timestamps for Mongorito models.
$ npm install --save mongorito-timestamps
const {Database, Model} = require('mongorito');
const timestamps = require('mongorito-timestamps');
class Post extends Model {}
const db = new Database('localhost/blog');
await db.connect();
db.use(timestamps());
db.register(Post);
const post = new Post({title: 'Hello'});
await post.save();
post.get('created_at');
//=> 2017-05-17T18:02:06.612Z
post.get('updated_at');
//=> same as `created_at`
post.set({title: 'World'});
await post.save();
post.get('created_at');
//=> same as previous `created_at`
post.get('updated_at');
//=> 2017-05-17T18:02:06.971Z
Configures and returns a timestamps plugin. Accepts an optional options object to customize field names and a function, which generates the timestamps.
Type: string
Default: created_at
Name of the field, which stores the date when the document was created. This field doesn't change after the initial creation.
Type: string
Default: updated_at
Name of the field, which stores the date when the document was updated. This field changes on every save of the document.
Type: function
Default:
const getTimestamp = () => new Date();
Function, which generates a timestamp.
MIT © Vadim Demedes
FAQs
Created and updated timestamps for Mongorito
We found that mongorito-timestamps demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.

Product
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.