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
/*! | |
* JavaScript whatevCache - v0.2pre - 12/30/2010 | |
* http://benalman.com/ | |
* | |
* Copyright (c) 2010 "Cowboy" Ben Alman | |
* Dual licensed under the MIT and GPL licenses. | |
* http://benalman.com/about/license/ | |
*/ | |
// whatevCache.set( key, value [, ttl ] ); |
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
// Cross-browser object.watch and object.unwatch | |
// object.watch | |
if (!Object.prototype.watch) { | |
Object.prototype.watch = function (prop, handler) { | |
var oldval = this[prop], newval = oldval, | |
getter = function () { | |
return newval; | |
}, | |
setter = function (val) { |