- A basic JS object schema framework geared towards "data definition" rather than comprehensive data validation (akin to table definitions in a database).
- Utility functions for creating HTML, (P)React, and "arbitrary tech stack" forms for working with schema'd objects.
- A simple JSON-based human-readable, human-editable document store with schema support
- A JS differ that allows for three-way diffs (e.g. applying schema1 → schema2 transforms to instances of schema1, to make them schema2-conformant).
- An
equals(o1, o2)
function that allows for both strict and coerced equality testing.
See the schema docs for details.
loadSchema(path)
validate(schema, object, strict = true)
createValidator(schema, strict = true)
migrate(object, schema1, schema1)
migrate(object, migration_operations)
See the schema docs for details.
createFormHTML(schema, object)
createTableHTML(schema, object)
createTableRowHTML(schema, object)
createFormTree(schema, object, options)
createTableTree(schema, object, options)
createTableTreeRows(schema, object, options)
See the JSON store docs for details.
store
/new Store()
/new JSONDataStore()
load(namespace, schema)
migrate(newschema)
view(primaryKey)
get(key)
put(key, value)
remove(key)
See the diffing docs for details.
create(object1, object2)
/createDiff(object1, object2)
apply(diff, object)
/applyDiff(diff, object)
makeChangeHandler(ignoreKey, filterKeyString)
See the docs for equals()
for details.
equals(o1, o2, strict = true)
If you want to work on this with me, drop me a line!
There's a whole bunch of pure-node tests that can be run by using node whatever/it/may/be/test.js
. These tests are not so much exhaustive tests as they are representative tests that can be modified and rerun to see things still working the way they're supposed to.
None right now, because of...
The docs need a lot more examples, and prose-reworking, because so far this has been a development exercise, and that's not good reading material in terms of a manual/handbook for using the "stack".
Hit me up via email (which I'm pretty sure Github will tell you about), or tweetspace, or tootspace.