Skip to content

Instantly share code, notes, and snippets.

@greduan
Created July 24, 2015 20:32
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 greduan/d8e0989c30c7b33f5982 to your computer and use it in GitHub Desktop.
Save greduan/d8e0989c30c7b33f5982 to your computer and use it in GitHub Desktop.
What I've been looking for OLOO
var MyClass = {
prototype: {
// prototypal members and methods
},
create: function (options) {
// do stuff with options
return Object.create(MyClass.prototype, options)
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment