1.0.4 • Published 4 years ago

@samwen/to-string v1.0.4

Weekly downloads
125
License
ISC
Repository
github
Last release
4 years ago

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);