Created
December 1, 2012 03:01
-
-
Save fiveisprime/4180354 to your computer and use it in GitHub Desktop.
unwatch
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
| var unwatch = function(obj, prop) { | |
| var value = obj[prop]; | |
| // Delete the property that has the get/set functions specified | |
| // then add the property back using the original value. | |
| delete obj[prop]; | |
| obj[prop] = value; | |
| return this; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment