1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-04 13:10:09 +02:00

update some packages and remove node_modules from repo

This commit is contained in:
s2
2019-03-09 16:38:04 +01:00
parent 3dcadb39c2
commit d24a82e91e
94766 changed files with 290 additions and 858252 deletions

View File

@@ -1,35 +0,0 @@
var assert = require('assert');
var Traverse = require('traverse');
exports.dateEach = function () {
var obj = { x : new Date, y : 10, z : 5 };
var counts = {};
Traverse(obj).forEach(function (node) {
var t = (node instanceof Date && 'Date') || typeof node;
counts[t] = (counts[t] || 0) + 1;
});
assert.deepEqual(counts, {
object : 1,
Date : 1,
number : 2,
});
};
exports.dateMap = function () {
var obj = { x : new Date, y : 10, z : 5 };
var res = Traverse(obj).map(function (node) {
if (typeof node === 'number') this.update(node + 100);
});
assert.ok(obj.x !== res.x);
assert.deepEqual(res, {
x : obj.x,
y : 110,
z : 105,
});
};