Skip to content

Commit

Permalink
Update README to schemaFromJSON method
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeembrey committed Sep 7, 2018
1 parent 99c7f5b commit c2ea6d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ npm install standardschema --save
## Usage

```ts
import { fromJSON } from 'standardschema'
import { schemaFromJSON } from 'standardschema'

const model = fromJSON({
const schema = schemaFromJSON({
'@type': 'Object',
'properties': [
{
Expand All @@ -29,7 +29,7 @@ const model = fromJSON({
]
})

model.isAssignable(fromJSON({ '@type': 'Integer' })) //=> false
schema.isAssignable(schemaFromJSON({ '@type': 'Integer' })) //=> false
```

## License
Expand Down

0 comments on commit c2ea6d3

Please sign in to comment.