lib/timestamp.js
function preSave(next) {
		const _ref = this.get(options.createdName);

		if (!options.disableUpdated) {
			this[options.updatedName] = new Date();
		}
		if (!options.disableCreated && (_ref === undefined || _ref === null)) {
			this[options.createdName] = new Date();
		}

		next();
	}
function preSave(next) {
		const _ref = this.get(options.createdName);

		if (!options.disableUpdated) {
			this[options.updatedName] = new Date();
		}
		if (!options.disableCreated && (_ref === undefined || _ref === null)) {
			this[options.createdName] = new Date();
		}

		next();
	}
function preSave ( next ) { const _ref = this . get ( options . createdName ) ; if ( ! options . disableUpdated ) { this [ options . updatedName ] = new Date ( ) ; } if ( ! options . disableCreated && ( _ref === undefined || _ref === null ) ) { this [ options . createdName ] = new Date ( ) ; } next ( ) ; }
Callback for the schema pre save

@this mongoose.Schema
@param {Function} next The next pre save callback in chain
@returns {undefined}
Callback for the schema pre save