Design & Download
Your JS Library
in Seconds!!!

Snippet: create() - Object.create()

Written by Christopher West (cwest) on December 06, 2015.
function create(proto, opt_props) {
  function t() {}
  t.prototype = proto;
  proto = new t();
  for (t in opt_props = Object(opt_props)) {
    if (has(opt_props, t)) {
      proto[t] = opt_props[t];
    }
  }
  return proto;
}