1.0.2 • Published 7 years ago

json-scheme-tools v1.0.2

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

JSON Scheme Tools

Purpose: Create, validate and fix objects according scheme object

Example scheme object: { "item": { "property": "value" } }

Allowed properties:

  • type: text/array/object/boolean
  • allow: array
  • regexp: string
  • props: object
  • default: text/array/object/boolean

Rules: 1. Item must contain exact one property of type, allow, regexp or props 2. Props must contain a scheme object itself 3. Default is optional, must be valid itself and is allowed together with type, allow and regexp 4. Default is required for allow and regexp 5. Other props are not allowed

Functions:

  • create(scheme, saveToFile)
  • validate(scheme, objectSource)
  • fix(scheme, objectSource)
1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.0

7 years ago