openfl
Version:
A fast, productive library for 2D cross-platform development.
11 lines (9 loc) • 367 B
JavaScript
Object.defineProperty(exports, "__esModule", {value: true});
exports.default = function $extend(from, fields) {
function Inherit() {};
Inherit.prototype = from;
var proto = new Inherit();
for (var name in fields) proto[name] = fields[name];
if(fields.toString !== Object.prototype.toString) proto.toString = fields.toString;
return proto;
};