brunch/skemata

Name: skemata

Owner: Brunch

Description: An object structure and types validation library

Created: 2016-04-23 13:24:26.0

Updated: 2016-09-14 19:31:34.0

Pushed: 2016-05-03 21:55:57.0

Homepage: null

Size: 10

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Skemata

Skemata is a small library for validating object structure and value types. It was extracted during development of config validation for Brunch.

Sample use (straight from brunch)
t v = skemata.v;
t configBaseSchema = v.object({
ths: v.object({
root: v.string.default('.'),
public: v.string.default('public'),
watched: v.array(v.string).default(['app', 'test', 'vendor']),
ignored: v.deprecated(v.noop, 'moved to `config.conventions.ignored`'),
assets: v.deprecated(v.noop, 'moved to `config.conventions.assets`'),
test: v.deprecated(v.noop, 'moved to `config.conventions.test`'),
vendor: v.deprecated(v.noop, 'moved to `config.conventions.vendor`'),
config: v.string,
packageConfig: v.string.default('package.json'),
bowerConfig: v.string.default('bower.json')
.default({}),

otPath: v.deprecated(v.noop, 'moved to `config.paths.root`'),
ildPath: v.deprecated(v.noop, 'moved to `config.paths.public`')
 ...


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.