couchdb-timestamp-model
Data model for CouchDB timestamps
Installation
npm install --save couchdb-timestamp-model
Usage
const timestamp = timestamp// => undefined// undefined means the object validated
See json-clay for general API docs.
timestamp.validate(<json>)
Validate the given json
against the schema. Returns undefined
if the data
is valid, otherwise an array of errors.
timestamp.generate([attributes])
Generates a model with fake data via json-schema-faker. If an attributes object is provided, its properties will be used instead of faked values.
CLI
A handy command line tool for creating test data:
$ couchdb-timestamp-model --updatedAt "1970-01-01T00:00:00.000Z"
Contributors
© 2016 Tom Vincent tom@field.partners
License
Released under the Apache-2.0 license.