Beta 7 with some repo names changed.
This commit is contained in:
1 parent
0f7b40cca7
commit
963c19493a
3408 files changed
+462217
-15516
No files matched your search
+17
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
const withIs = require('../../..');
|
||||
const Plant = require('./Plant');
|
||||
|
||||
function Algae() {
|
||||
Plant.call(this, 'algae');
|
||||
}
|
||||
|
||||
Algae.prototype = Object.create(Plant.prototype);
|
||||
Algae.prototype.constructor = Algae;
|
||||
|
||||
module.exports = withIs.proto(Algae, {
|
||||
className: 'Algae',
|
||||
symbolName: '@org/package/Algae',
|
||||
});
|
||||
module.exports.WrappedClass = Algae;
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
const withIs = require('../../..');
|
||||
|
||||
function Animal(type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
Animal.prototype.getType = function () {
|
||||
return this.type;
|
||||
};
|
||||
|
||||
module.exports = withIs.proto(Animal, {
|
||||
className: 'Animal',
|
||||
symbolName: '@org/package/Animal',
|
||||
});
|
||||
module.exports.WrappedClass = Animal;
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
|
||||
const withIs = require('../../..');
|
||||
|
||||
function ExplicitWithoutNew_() {
|
||||
if (!(this instanceof ExplicitWithoutNew)) {
|
||||
return new ExplicitWithoutNew();
|
||||
}
|
||||
|
||||
this.label = 'ExplicitWithoutNew';
|
||||
}
|
||||
|
||||
ExplicitWithoutNew_.prototype.getLabel = function () {
|
||||
return this.label;
|
||||
};
|
||||
|
||||
const ExplicitWithoutNew = withIs.proto(ExplicitWithoutNew_, {
|
||||
className: 'ExplicitWithoutNew',
|
||||
symbolName: '@org/package/ExplicitWithoutNew',
|
||||
});
|
||||
|
||||
module.exports = ExplicitWithoutNew;
|
||||
module.exports.WrappedClass = ExplicitWithoutNew_;
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
'use strict';
|
||||
|
||||
const withIs = require('../../..');
|
||||
|
||||
function ImplicitExplicitWithoutNew_() {
|
||||
/* istanbul ignore if */
|
||||
if (!(this instanceof ImplicitExplicitWithoutNew)) {
|
||||
return new ImplicitExplicitWithoutNew();
|
||||
}
|
||||
|
||||
this.label = 'ImplicitExplicitWithoutNew';
|
||||
}
|
||||
|
||||
ImplicitExplicitWithoutNew_.prototype.getLabel = function () {
|
||||
return this.label;
|
||||
};
|
||||
|
||||
const ImplicitExplicitWithoutNew = withIs.proto(ImplicitExplicitWithoutNew_, {
|
||||
className: 'ImplicitExplicitWithoutNew',
|
||||
symbolName: '@org/package/ImplicitExplicitWithoutNew',
|
||||
withoutNew: true,
|
||||
});
|
||||
|
||||
module.exports = ImplicitExplicitWithoutNew;
|
||||
module.exports.WrappedClass = ImplicitExplicitWithoutNew_;
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
const withIs = require('../../..');
|
||||
|
||||
function ImplicitWithoutNew() {
|
||||
this.label = 'ImplicitWithoutNew';
|
||||
}
|
||||
|
||||
ImplicitWithoutNew.prototype.getLabel = function () {
|
||||
return this.label;
|
||||
};
|
||||
|
||||
module.exports = withIs.proto(ImplicitWithoutNew, {
|
||||
className: 'ImplicitWithoutNew',
|
||||
symbolName: '@org/package/ImplicitWithoutNew',
|
||||
withoutNew: true,
|
||||
});
|
||||
module.exports.WrappedClass = ImplicitWithoutNew;
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
const withIs = require('../../..');
|
||||
const Animal = require('./Animal');
|
||||
|
||||
function Mammal() {
|
||||
Animal.call(this, 'mammal');
|
||||
}
|
||||
|
||||
Mammal.prototype = Object.create(Animal.prototype);
|
||||
Mammal.prototype.constructor = Mammal;
|
||||
|
||||
module.exports = withIs.proto(Mammal, {
|
||||
className: 'Mammal',
|
||||
symbolName: '@org/package/Mammal',
|
||||
});
|
||||
module.exports.WrappedClass = Mammal;
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
const withIs = require('../../..');
|
||||
|
||||
function Plant(type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
Plant.prototype.getType = function () {
|
||||
return this.type;
|
||||
};
|
||||
|
||||
module.exports = withIs.proto(Plant, {
|
||||
className: 'Plant',
|
||||
symbolName: '@org/package/Plant',
|
||||
});
|
||||
module.exports.WrappedClass = Plant;
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
Animal: require('./Animal'),
|
||||
Plant: require('./Plant'),
|
||||
Mammal: require('./Mammal'),
|
||||
Algae: require('./Algae'),
|
||||
|
||||
ExplicitWithoutNew: require('./ExplicitWithoutNew'),
|
||||
ImplicitWithoutNew: require('./ImplicitWithoutNew'),
|
||||
ImplicitExplicitWithoutNew: require('./ImplicitExplicitWithoutNew'),
|
||||
};
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
const withIs = require('../../..');
|
||||
const Plant = require('./Plant');
|
||||
|
||||
class Algae extends Plant {
|
||||
constructor() {
|
||||
super('algae');
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = withIs(Algae, {
|
||||
className: 'Algae',
|
||||
symbolName: '@org/package/Algae',
|
||||
});
|
||||
module.exports.WrappedClass = Algae;
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
const withIs = require('../../..');
|
||||
|
||||
class Animal {
|
||||
constructor(type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
getType() {
|
||||
return this.type;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = withIs(Animal, {
|
||||
className: 'Animal',
|
||||
symbolName: '@org/package/Animal',
|
||||
});
|
||||
module.exports.WrappedClass = Animal;
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
const withIs = require('../../..');
|
||||
const Animal = require('./Animal');
|
||||
|
||||
class Mammal extends Animal {
|
||||
constructor() {
|
||||
super('mammal');
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = withIs(Mammal, {
|
||||
className: 'Mammal',
|
||||
symbolName: '@org/package/Mammal',
|
||||
});
|
||||
module.exports.WrappedClass = Mammal;
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
const withIs = require('../../..');
|
||||
|
||||
class Plant {
|
||||
constructor(type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
getType() {
|
||||
return this.type;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = withIs(Plant, {
|
||||
className: 'Plant',
|
||||
symbolName: '@org/package/Plant',
|
||||
});
|
||||
module.exports.WrappedClass = Plant;
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
Animal: require('./Animal'),
|
||||
Plant: require('./Plant'),
|
||||
Mammal: require('./Mammal'),
|
||||
Algae: require('./Algae'),
|
||||
};
|
||||
Reference in new issue
Block a user