Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Merge pull request #11 from dfcreative/patch-1
Browse files Browse the repository at this point in the history
Make `set` chainable
  • Loading branch information
arv committed Sep 30, 2014
2 parents cf980a2 + 618df70 commit 027f63a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
var o2 = function(){};
var o3 = window;

wm.set(o1, 37);
wm.set(o2, 'aoeui');
wm.set(o1, 37).set(o2, 'aoeui');

assert.equal(wm.get(o1), 37);
assert.equal(wm.get(o2), 'aoeui');
Expand Down
1 change: 1 addition & 0 deletions weakmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ if (typeof WeakMap === 'undefined') {
entry[1] = value;
else
defineProperty(key, this.name, {value: [key, value], writable: true});
return this;
},
get: function(key) {
var entry;
Expand Down

0 comments on commit 027f63a

Please sign in to comment.