Skip to content

Instantly share code, notes, and snippets.

@sbstp
Created March 20, 2014 15:32
Show Gist options
  • Save sbstp/9666463 to your computer and use it in GitHub Desktop.
Save sbstp/9666463 to your computer and use it in GitHub Desktop.
function Const(hue) {
if (!(this instanceof Const)) {
var obj = Object.create(Const.prototype);
Const.apply(obj, arguments);
return obj;
}
this.hue = hue;
}
var x = Const('oyoyoy');
console.dir(x);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment