GitHub - ccoder7/to-string: enable converting object to string by removing circular reference

Skip to content

Navigation Menu

Sign in

Appearance settings

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

Languages

  • JavaScript 100.0%