@samwen/to-string

1.0.4 • Public • Published

to-string

enable converting object to string by removing circular reference

how to install

npm install @samwen/to-string --save

how to use

const to_string = require('@samwen/to-string');

const b = { name: 'b' };
const a = { name: 'a', reference_to: b};
b['reference_to'] = a;

// a has circular reference
const s = to_string(a);

Package Sidebar

Install

npm i @samwen/to-string

Weekly Downloads

1

Version

1.0.4

License

ISC

Unpacked Size

2.52 kB

Total Files

4

Last publish

Collaborators

  • samwen