modella-timestamps

0.1.3 • Public • Published

modella-timestamps

Adds createdAt and updatedAt fields to the given model using the fields specified and updates them autoamtically.

Usage Example

var modella    = require('modella');
var timestamps = require('modella-timestamps');
 
var User = modella('User');
 
// Use the default createdAt and updatedAt field names:
User.use(timestamps);
 
// Specify custom field names:
User.use(timestamps('born_at', 'changed_at'));

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.3
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.3
    0
  • 0.1.2
    0
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i modella-timestamps

Weekly Downloads

0

Version

0.1.3

License

MIT

Last publish

Collaborators

  • rschmukler