Node-Red configuration
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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