Skip to content

Instantly share code, notes, and snippets.

@paulnicholson
Created June 4, 2009 19:12
Show Gist options
  • Save paulnicholson/123781 to your computer and use it in GitHub Desktop.
Save paulnicholson/123781 to your computer and use it in GitHub Desktop.
var M = {
get: function(key) {
return function(target) {
return target[key];
}
},
set: function(key, value) {
return function(target) {
target[key] = value;
}
},
is: function(key) {
return function(target) {
return !!target[key];
}
},
isnt: function(key) {
return function(target) {
return !target[key];
}
},
send: function(method) {
return function(target) {
return target[method]();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment