Skip to content

Commit 244f55c

Browse files
committed
Update README
1 parent 3371e70 commit 244f55c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Coverage Status](https://coveralls.io/repos/github/codenirvana/teleport-javascript/badge.svg?branch=master)](https://coveralls.io/github/codenirvana/teleport-javascript?branch=master) [![Build Status](https://travis-ci.org/codenirvana/teleport-javascript.svg?branch=master)](https://travis-ci.org/codenirvana/teleport-javascript) [![License: ISC](https://img.shields.io/badge/License-ISC-yellow.svg)](https://opensource.org/licenses/ISC) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
44

55

6-
A super light and fast JavaScript object (de)serialization that includes date, bigint, regex, etc.
6+
A super light and fast JavaScript object (de)serialization that includes Date, BigInt, RegExp, etc.
77

88
### Installation
99
```console
@@ -19,12 +19,13 @@ const obj = {
1919
undefined: undefined,
2020
regex: /a-z/gi,
2121
set: new Set([-Infinity, NaN, Infinity]),
22-
bigint: 900719925474099123n
22+
bigint: 900719925474099123n,
23+
symbol: Symbol('key')
2324
};
2425
obj.circular = obj;
2526

2627
const stringified = stringify(obj);
27-
// '[{"key":"1","undefined":"_0","regex":"_1","set":"_2","bigint":"_3","circular":"0"},"value",["u","R;/a-z/gi","S;[[\\"_0\\",\\"_1\\",\\"_2\\"],[\\"n;-Infinity\\",\\"n;NaN\\",\\"n;Infinity\\"]]","b;900719925474099123"]]'
28+
// '[{"key":"1","undefined":"_0","regex":"_1","set":"_2","bigint":"_3","symbol":"_4","circular":"0"},"value",["u","R/a-z/gi","S[[\\"_0\\",\\"_1\\",\\"_2\\"],[\\"n-Infinity\\",\\"nNaN\\",\\"nInfinity\\"]]","b900719925474099123","skey"]]'
2829

2930
const parsed = parse(stringified);
3031
// {
@@ -33,6 +34,7 @@ const parsed = parse(stringified);
3334
// regex: /a-z/gi,
3435
// set: Set { -Infinity, NaN, Infinity },
3536
// bigint: 900719925474099123n,
37+
// symbol: Symbol(key),
3638
// circular: [Circular]
3739
// }
3840
```
@@ -42,6 +44,7 @@ const parsed = parse(stringified);
4244
* Number _(including NaN, Infinity, -Infinity)_
4345
* BigInt
4446
* Boolean
47+
* Symbol
4548
* Null
4649
* Undefined
4750
* Array
@@ -54,7 +57,6 @@ const parsed = parse(stringified);
5457
- Uint32Array
5558
- Float32Array
5659
- Float64Array
57-
* Symbol
5860
* Object _(including circular reference)_
5961
- Date
6062
- Buffer

0 commit comments

Comments
 (0)