Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var moment = require('moment'),
_ = require('lodash'),
SchemaType = require('warehouse').SchemaType;
var SchemaMoment = module.exports = function(options){
SchemaType.call(this, options);
};
SchemaMoment.__proto__ = SchemaType;
SchemaMoment.prototype.__proto__ = SchemaType.prototype;
SchemaMoment.prototype.checkRequired = function(value){
return moment.isMoment(value);
};
var cast = SchemaMoment.prototype.cast = function(value){
if (!value) return null;
if (moment.isMoment(value)) return value;