Created
February 1, 2012 23:33
-
-
Save searls/1720156 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data = | |
a: 0 | |
b: "foo" | |
result = _(data).reject((v,k) -> k == 'b') | |
expect(result).toEqual(a: 0) #but fail! it returns: [0] | |
# so far now, I could settle for this: | |
newData = _(data).clone() | |
_(newData).each (v,k) -> delete newData[k] if k == 'b' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks Zach. Yeah, I just hacked my own underscore mixin _.withoutProperties
http://tryjasmine.com/?gist=1720249