(key, options)
| 39 | SchemaTypes: { |
| 40 | DateString: class DateString extends mongoose.SchemaType { |
| 41 | constructor(key, options) { |
| 42 | super(key, options, 'DateString'); |
| 43 | } |
| 44 | |
| 45 | cast(val) { |
| 46 | if (typeof val !== 'string' || !/^\d{4}-\d{2}-\d{2}$/.test(val)) { |
nothing calls this directly
no outgoing calls
no test coverage detected