08-27-周三_17-09-29

This commit is contained in:
2025-08-27 17:10:05 +08:00
commit 86df397d8f
12735 changed files with 1145479 additions and 0 deletions

12
node_modules/traverse/examples/scrub.js generated vendored Normal file
View File

@@ -0,0 +1,12 @@
'use strict';
// scrub out circular references
var traverse = require('traverse');
var obj = { a: 1, b: 2, c: [3, 4] };
obj.c.push(obj);
var scrubbed = traverse(obj).map(function () {
if (this.circular) { this.remove(); }
});
console.dir(scrubbed);