Created
October 5, 2010 15:38
-
-
Save etgryphon/611746 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/** | |
One-way boolean transform binding that returns YES if the 'from' end of the binding equals | |
'testValue', and NO otherwise. | |
*/ | |
SC.Binding.equals = function(testValue) { | |
return this.oneWay().transform(function(value) { | |
value = (value === testValue) ? YES : NO; | |
return value; | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment