Skip to content

Instantly share code, notes, and snippets.

@madx
Created January 27, 2015 13:57
Show Gist options
  • Save madx/bba95a111624134c2c42 to your computer and use it in GitHub Desktop.
Save madx/bba95a111624134c2c42 to your computer and use it in GitHub Desktop.
A basic JS object system
var assign = require("object-assign")
var Base = {
create: function create(properties) {
var base = Object.create(this)
properties = properties || {}
properties.parent = this
assign(base, properties)
return base
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment