Created
February 25, 2017 10:51
-
-
Save ryaan-anthony/68f1a52f3102ebf8626fa7b585daf6bd to your computer and use it in GitHub Desktop.
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
<script type="text/javascript"> | |
class Parameters | |
{ | |
constructor() | |
{ | |
return new Proxy(Object.assign(this, arguments[0]), { | |
get: function(target, name) { | |
return name in target ? target[name] : undefined; | |
} | |
}); | |
} | |
} | |
</script> | |
<script> | |
var parameters = new Parameters({test: 'success'}); | |
console.log(parameters.test); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment