chore: add node_modules dependencies

- Add all npm dependencies for the project

🤖 Generated with [Qoder](https://qoder.com)
This commit is contained in:
yuantao
2026-03-27 15:37:13 +08:00
parent 84bb32d5d4
commit 1b742b91b5
3460 changed files with 1479079 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
var test = require('tape');
var stringify = require('../');
test('toJSON function', function (t) {
t.plan(1);
var obj = { one: 1, two: 2, toJSON: function() { return { one: 1 }; } };
t.equal(stringify(obj), '{"one":1}' );
});
test('toJSON returns string', function (t) {
t.plan(1);
var obj = { one: 1, two: 2, toJSON: function() { return 'one'; } };
t.equal(stringify(obj), '"one"');
});
test('toJSON returns array', function (t) {
t.plan(1);
var obj = { one: 1, two: 2, toJSON: function() { return ['one']; } };
t.equal(stringify(obj), '["one"]');
});