Skip to content

Commit

Permalink
a hash exclude test and a package bump
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Nov 19, 2010
1 parent 752f64f commit 536b93d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
7 changes: 7 additions & 0 deletions test/hash.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 536b93d

Please sign in to comment.