From 536b93dc0474a27a0f5c3f53b8a80cf3eb32e4e4 Mon Sep 17 00:00:00 2001 From: James Halliday Date: Fri, 19 Nov 2010 14:58:15 +0000 Subject: [PATCH] a hash exclude test and a package bump --- package.json | 2 +- test/hash.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 88dba7f..007bc81 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name" : "traverse", - "version" : "0.2.2", + "version" : "0.2.3", "description" : "Traverse and transform objects by visiting every node on a recursive walk.", "author" : "James Halliday", "license" : "MIT/X11", diff --git a/test/hash.js b/test/hash.js index d761692..18e1386 100755 --- a/test/hash.js +++ b/test/hash.js @@ -97,6 +97,13 @@ exports.extract = function (assert) { assert.deepEqual(extracted.items, { a : 1, b : 2 }); }; +exports.exclude = function (assert) { + var hash = Hash({ a : 1, b : 2, c : 3 }).clone; + var extracted = hash.exclude(['a','b']); + assert.equal(extracted.length, 1); + assert.deepEqual(extracted.items, { c : 3 }); +}; + exports.compact = function (assert) { var hash = { a : 1,