File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,19 @@ Stringify an object so it can be safely inlined in JavaScript code
1010
1111 npm install js-stringify
1212
13+ ## Usage
14+
15+ ``` js
16+
17+ var assert = require (' assert' );
18+ var stringify = require (' js-stringify' );
19+
20+ assert (stringify (' foo' ) === ' "foo"' );
21+ assert (stringify (' foo\u2028 bar\u2029 baz' ) === ' "foo\\ u2028bar\\ u2029baz"' );
22+ assert (stringify (new Date (' 2014-12-19T03:42:00.000Z' )) === ' new Date("2014-12-19T03:42:00.000Z")' );
23+ assert (stringify ({foo: ' bar' }) === ' {"foo":"bar"}' );
24+ ```
25+
1326## License
1427
1528 MIT
Original file line number Diff line number Diff line change 11{
22 "name" : " js-stringify" ,
3- "version" : " 0 .0.0" ,
3+ "version" : " 1 .0.0" ,
44 "description" : " Stringify an object so it can be safely inlined in JavaScript code" ,
55 "keywords" : [],
66 "dependencies" : {},
You can’t perform that action at this time.
0 commit comments