Sha256: e904cddc6f53b4d0ca9171ceb31fe4039b8fedea78575863158b86a2eba74d5c
Contents?: true
Size: 451 Bytes
Versions: 45
Compression:
Stored size: 451 Bytes
Contents
var inspect = require('../'); var test = require('tape'); test('circular', function (t) { t.plan(2); var obj = { a: 1, b: [3, 4] }; obj.c = obj; t.equal(inspect(obj), '{ a: 1, b: [ 3, 4 ], c: [Circular] }'); var double = {}; double.a = [double]; double.b = {}; double.b.inner = double.b; double.b.obj = double; t.equal(inspect(double), '{ a: [ [Circular] ], b: { inner: [Circular], obj: [Circular] } }'); });
Version data entries
45 entries across 44 versions & 4 rubygems