0.2.5 • Published 6 years ago

1tree-schema v0.2.5

Weekly downloads
42
License
MIT
Repository
github
Last release
6 years ago

1tree-schema

Converts JSON schema to and from 1tree instances

const SchemaTree = require( '1tree-schema' )
const jsonSchema = require( './test.schema.json' )

const tree = SchemaTree( jsonSchema )

const integerNodes = tree.findAll( n => n.nodeType() === 'integer' )

integerNodes.forEach( n => {
  const value = n.value()

  value.minimum = 1

  n.value( value )
})

const newSchema = tree.toSchema()

console.log( JSON.stringify( newSchema, null, 2 ) )
0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago