Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

deep.js 400B

123456789101112
  1. var inspect = require('../');
  2. var test = require('tape');
  3. test('deep', function (t) {
  4. t.plan(4);
  5. var obj = [[[[[[500]]]]]];
  6. t.equal(inspect(obj), '[ [ [ [ [ [Array] ] ] ] ] ]');
  7. t.equal(inspect(obj, { depth: 4 }), '[ [ [ [ [Array] ] ] ] ]');
  8. t.equal(inspect(obj, { depth: 2 }), '[ [ [Array] ] ]');
  9. t.equal(inspect([[[{ a: 1 }]]], { depth: 3 }), '[ [ [ [Object] ] ] ]');
  10. });