mirror of
https://github.com/flynx/serialize.js.git
synced 2026-07-10 03:00:57 +00:00
docs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
23b5c41fa0
commit
bd17b1df38
26
README.md
26
README.md
@ -8,8 +8,9 @@ This extends the default JSON serialization adding the following:
|
||||
- Deep and partial-deep cleen object copy
|
||||
|
||||
Possible differences to JSON output:
|
||||
- Repeating long strings and BigInts can be referenced instead of
|
||||
reincluded in the output.
|
||||
- Repeating long strings and BigInts are referenced by default instead of
|
||||
being reincluded in the output.
|
||||
|
||||
|
||||
|
||||
## Motivation
|
||||
@ -67,6 +68,27 @@ serialize(obj, indent, depth=0, options){
|
||||
-> <string>
|
||||
```
|
||||
|
||||
Options format:
|
||||
```
|
||||
{
|
||||
// pretty-printing indent...
|
||||
// (default: undefined)
|
||||
indent: undefined,
|
||||
|
||||
// outout root indent...
|
||||
// (default: 0)
|
||||
depth: 0,
|
||||
|
||||
// minimal referenced string/bigint length...
|
||||
// (default: MIN_LENGTH_REF)
|
||||
min_length_ref: MIN_LENGTH_REF,
|
||||
|
||||
// functions list...
|
||||
// (default: undefined)
|
||||
functions: undefined,
|
||||
}
|
||||
```
|
||||
|
||||
Supported options:
|
||||
- `indent` controls formatting and nested value indent, if set to a number
|
||||
that number of spaces will be used to indent nested values if given a
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user