Sha256: ceb2384d6105e3a5c0f750620efd5e625ac3407565f56ec387fb2aa54a9feeaf

Contents?: true

Size: 857 Bytes

Versions: 1

Compression:

Stored size: 857 Bytes

Contents

var Factory = function () {};
var slice = Array.prototype.slice;

var augment = function (base, body) {
	var uber = Factory.prototype = typeof base === "function" ? base.prototype : base;
	var prototype = new Factory(), properties = body.apply(prototype, slice.call(arguments, 2).concat(uber));
	if (typeof properties === "object") for (var key in properties) prototype[key] = properties[key];
	if (!prototype.hasOwnProperty("constructor")) return prototype;
	var constructor = prototype.constructor;
	constructor.prototype = prototype;
	return constructor;
};

augment.defclass = function (prototype) {
	var constructor = prototype.constructor;
	constructor.prototype = prototype;
	return constructor;
};

augment.extend = function (base, body) {
	return augment(base, function (uber) {
		this.uber = uber;
		return body;
	});
};

module.exports = augment;

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tennpipes-init-3.6.6 lib/tennpipes-init/generators/project/public/images/placeholders/src/lib/augment.js