Skip to content

Instantly share code, notes, and snippets.

@bmeck
Created June 9, 2010 23:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmeck/432332 to your computer and use it in GitHub Desktop.
Save bmeck/432332 to your computer and use it in GitHub Desktop.
require("overload").Watchable(
function(argInfo){
return typeof(argInfo.property)=='number'
? proxiedObj.item(argInfo.property)
: proxiedObj[argInfo.property];
}
,function(argInfo){return proxiedObj[argInfo.property]=argInfo.value}
,function(){return Object.getPropertyNames(proxiedObj)}
,function(argInfo){return argInfo.property in proxiedObj}
,function(argInfo){proxiedObj[delete argInfo.property]}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment