fast-json-stringify
Advanced tools
Comparing version 2.4.1 to 2.4.2
{ | ||
"name": "fast-json-stringify", | ||
"version": "2.4.1", | ||
"version": "2.4.2", | ||
"description": "Stringify your JSON at max speed", | ||
@@ -57,3 +57,4 @@ "main": "index.js", | ||
] | ||
} | ||
}, | ||
"runkitExampleFilename": "example.js" | ||
} |
@@ -33,2 +33,3 @@ # fast-json-stringify | ||
- <a href="#example">`Example`</a> | ||
- <a href="#options">`Options`</a> | ||
- <a href="#api">`API`</a> | ||
@@ -52,2 +53,3 @@ - <a href="#fastJsonStringify">`fastJsonStringify`</a> | ||
<a name="example"></a> | ||
Try it out on RunKit: <a href="https://runkit.com/npm/fast-json-stringify">https://runkit.com/npm/fast-json-stringify</a> | ||
## Example | ||
@@ -84,2 +86,22 @@ | ||
``` | ||
<a name="options"></a> | ||
## Options | ||
Optionally, you may provide to `fast-json-stringify` an option object as second parameter: | ||
```js | ||
const fastJson = require('fast-json-stringify') | ||
const stringify = fastJson(mySchema, { | ||
schema: { ... }, | ||
ajv: { ... }, | ||
rounding: 'ceil' | ||
}) | ||
``` | ||
- `schema`: external schemas references by $ref property. [More details](#ref) | ||
- `ajv`: ajv instance's settings for those properties that require `ajv`. [More details](#anyof) | ||
- `rounding`: setup how the `integer` types will be rounded when not integers. [More details](#integer) | ||
<a name="api"></a> | ||
@@ -90,4 +112,3 @@ ## API | ||
Build a `stringify()` function based on | ||
[jsonschema](http://json-schema.org/). | ||
Build a `stringify()` function based on [jsonschema](http://json-schema.org/). | ||
@@ -94,0 +115,0 @@ Supported types: |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
320044
650