@ams-team/json-stringify

0.9.0 • Public • Published

@ams-team/json-stringify

example

var stringify = require('@ams-team/json-stringify');
var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
console.log(stringify(obj));

output:

{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}

methods

var stringify = require('@ams/json-stringify')

var str = stringify(obj, opts)

Return a deterministic stringified string str from the object obj.

options

cycles

Pass true in opts.cycles to stringify circular property as __cycle__ - the result will not be a valid JSON string in this case.

TypeError will be thrown in case of circular object without this option.

Readme

Keywords

none

Package Sidebar

Install

npm i @ams-team/json-stringify

Weekly Downloads

2

Version

0.9.0

License

none

Unpacked Size

6.75 kB

Total Files

11

Last publish

Collaborators

  • w3cmark
  • eshaooo
  • bfkkkd
  • wzbwzb
  • hodor-cn