UNPKG

abstract

Version:

Abstraction of JavaScript Objects.

60 lines (59 loc) 4.83 kB
/* automatically generated by JSCoverage - do not edit */ if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; if (! _$jscoverage['other.js']) { _$jscoverage['other.js'] = []; _$jscoverage['other.js'][9] = 0; _$jscoverage['other.js'][20] = 0; _$jscoverage['other.js'][23] = 0; _$jscoverage['other.js'][30] = 0; _$jscoverage['other.js'][32] = 0; _$jscoverage['other.js'][33] = 0; _$jscoverage['other.js'][37] = 0; _$jscoverage['other.js'][38] = 0; _$jscoverage['other.js'][41] = 0; _$jscoverage['other.js'][50] = 0; _$jscoverage['other.js'][51] = 0; _$jscoverage['other.js'][81] = 0; _$jscoverage['other.js'][85] = 0; _$jscoverage['other.js'][98] = 0; _$jscoverage['other.js'][99] = 0; } _$jscoverage['other.js'][9]++; module.exports = {_create: {value: (function create(fn) { _$jscoverage['other.js'][20]++; var child = new Abstract(); _$jscoverage['other.js'][23]++; Object.defineProperty(child, "constructor", {value: fn, configurable: true, enumerable: false}); _$jscoverage['other.js'][30]++; Abstract.addPrototype(child, this); _$jscoverage['other.js'][32]++; if (this._meta.initialization) { _$jscoverage['other.js'][33]++; this._meta.initialization.call(child); } _$jscoverage['other.js'][37]++; if ("function" === typeof fn) { _$jscoverage['other.js'][38]++; fn.call(child, child, Abstract); } _$jscoverage['other.js'][41]++; return child; }), configurable: true, enumerable: false, writable: true}, identity: {get: (function () { _$jscoverage['other.js'][50]++; var path = Abstract.utility.get_constructors(this).reverse(); _$jscoverage['other.js'][51]++; return ({id: this._meta.id, type: path[(path.length - 1)], path: path.join(".")}); }), configurable: true, enumerable: false}, spawn: {value: (function spawn() { }), configurable: true, enumerable: true, writable: true}, build: {value: (function build(options) { _$jscoverage['other.js'][81]++; var script = ""; _$jscoverage['other.js'][85]++; return script; }), configurable: true, enumerable: false, writable: true}, addPrototype: {get: (function () { _$jscoverage['other.js'][98]++; return (function (context, proto) { _$jscoverage['other.js'][99]++; return Abstract.prototype.use.call(context, proto); }); }), configurable: false, enumerable: true}}; _$jscoverage['other.js'].source = ["/**"," * -"," *"," * -"," *"," * @author potanin"," * @date 7/6/13"," */","module.exports = {"," _create: {"," /**"," * Instantiate Children."," *"," */"," value: function create( fn ) {",""," // Create new Abstract Instance as a base"," //var child = Object.create( Abstract.prototype );"," //var child = new Abstract;"," var child = new Abstract;",""," // Set Constructor"," Object.defineProperty( child, 'constructor', {"," value: fn,"," configurable: true,"," enumerable: false"," })",""," // Add this to the child's chain, allowing the child"," Abstract.addPrototype( child, this );",""," if( this._meta.initialization ) {"," this._meta.initialization.call( child );"," }",""," // Call Constructor, pass in some arguments maybe"," if( 'function' === typeof fn ) {"," fn.call( child, child, Abstract );"," }",""," return child;",""," },"," configurable: true,"," enumerable: false,"," writable: true"," },"," identity: {"," get: function() {"," var path = Abstract.utility.get_constructors( this ).reverse();"," return {"," id: this._meta.id,"," type: path[ ( path.length - 1 ) ],"," path: path.join( '.' )"," }"," },"," configurable: true,"," enumerable: false"," },"," spawn: {"," /**"," * Start Context in another Worker"," *"," * @experimental"," */"," value: function spawn() {},"," configurable: true,"," enumerable: true,"," writable: true"," },"," build: {"," /**"," * Generate Standalone JavaScript for browser integration"," *"," * The result is not cached and is expected that the rendering engine does the caching."," *"," * @param options"," * @returns {String}"," */"," value: function build( options ) {"," var script = '';"," // read this file"," // include dependencies"," // minify"," return script;"," },"," configurable: true,"," enumerable: false,"," writable: true"," },"," addPrototype: {"," /**"," * Allow Prototype useage method to be ran in custom context for static calls"," *"," * @returns {Function}"," */"," get: function() {"," return function( context, proto ) {"," return Abstract.prototype.use.call( context, proto );"," }"," },"," configurable: false,"," enumerable: true"," }","}"];