JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 484
  • Score
    100M100P100Q87906F
  • License MIT

JSON generator & parser with circular, date and regex support

Package Exports

  • json-dry

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (json-dry) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

JSON-dry

JSON-dry allows you to stringify objects containing circular references, dates and regexes.

Multiple references to the same object are also correctly converted.

JSON-dry is based on circular-json

Usage

var dry = require('json-dry'),
    obj,
    ref;

ref = {
    text: 'This object is referred to',
    number: 1,
    date: new Date(),
    regex: /test/i
};

obj = {
    alpha: 'test',
    extra: ref,
    again: ref,
    three: ref
};

dry.stringify(obj);