npm.io
0.24.0-alpha.0 • Published 2 years ago

@toa.io/concise

Licence
MIT
Version
0.24.0-alpha.0
Deps
2
Size
32 kB
Vulns
0
Weekly
0
Stars
3

Concise Object Schema

Concise Object Schema (COS) is a human-friendly object schema description language. See features.

expand(cos, validate): JSONSchema

Expand function accepts COS-object as first argument and returns JSONSchema object.

One of the criteria to expand a node is if a node is valid JSONSchema already. As validation itself is out of the scope of this library, expand requires JSONSchema meta-schema validation function conforming toa.cos.Validate type as second argument. To keep things simple, consider using expand of @toa.io/schemas.