Buckets:
ktongue/docker_container / .cache /opencode /node_modules /fast-json-stringify /examples /example.js
| const fastJson = require('..') | |
| const stringify = fastJson({ | |
| title: 'Example Schema', | |
| type: 'object', | |
| properties: { | |
| firstName: { | |
| type: 'string' | |
| }, | |
| lastName: { | |
| type: 'string' | |
| }, | |
| age: { | |
| description: 'Age in years', | |
| type: 'integer' | |
| }, | |
| now: { | |
| type: 'string' | |
| }, | |
| birthdate: { | |
| type: ['string'], | |
| format: 'date-time' | |
| }, | |
| reg: { | |
| type: 'string' | |
| }, | |
| obj: { | |
| type: 'object', | |
| properties: { | |
| bool: { | |
| type: 'boolean' | |
| } | |
| } | |
| }, | |
| arr: { | |
| type: 'array', | |
| items: { | |
| type: 'object', | |
| properties: { | |
| str: { | |
| type: 'string' | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| required: ['now'], | |
| patternProperties: { | |
| '.*foo$': { | |
| type: 'string' | |
| }, | |
| test: { | |
| type: 'number' | |
| }, | |
| date: { | |
| type: 'string', | |
| format: 'date-time' | |
| } | |
| }, | |
| additionalProperties: { | |
| type: 'string' | |
| } | |
| }) | |
| console.log(stringify({ | |
| firstName: 'Matteo', | |
| lastName: 'Collina', | |
| age: 32, | |
| now: new Date(), | |
| reg: /"([^"]|\\")*"/, | |
| foo: 'hello', | |
| numfoo: 42, | |
| test: 42, | |
| strtest: '23', | |
| arr: [{ str: 'stark' }, { str: 'lannister' }], | |
| obj: { bool: true }, | |
| notmatch: 'valar morghulis', | |
| notmatchobj: { a: true }, | |
| notmatchnum: 42 | |
| })) | |
Xet Storage Details
- Size:
- 1.34 kB
- Xet hash:
- df0c95d1d91098dfe108df26c2071b9be721ca97171b241d5ce71829dd42f9be
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.