Releases: shysolocup/aepl
Releases · shysolocup/aepl
1.4.1
1.4.0
aepl v1.4 🍎
- updated directory stuff
- more compact because less files
extensions
used for extending properties and functions from another class externally from class declarations
extend()
extending from both props and funcs
alts:
- ext()
extendFunctions()
extending from only a class' functions
alts:
- extendFuncs()
- extendF()
- extFuncs()
- extF()
extendProperties()
extending from only a class' properties
alts:
- extendProps()
- extendP()
- extProps()
- extP()
const cl = require('aepl');
// class to extend from
class Ext {
constructor(var1) {
this.var1 = var1
}
test1() {
return this.var1;
}
test2() {
return this.var2;
}
}
// class extends from the extension class
cl.init("Example", class {
constructor(var2) {
this.var2 = var2;
this.extend(Ext, "abc");
}
});
let ex = new Example( "def" );
console.log(ex); // Example { var1: 'abc', var2: 'def' }
console.log(ex.test1()); // 'abc'
console.log(ex.test2()); // 'def'
1.3.2
- updated package.json links to use paishee
- updated license to use paishee
1.3.1
aepl 1.3.1
- added __inspect property to aepl classes
- added inspect() function to the main aepl class
const cl = require('aepl');
cl.init("Example", class {
constructor(data) {
this.data = data;
}
});
Example.setInspect(function() {
return `Example(${this.data.length}) ${cl.inspect(this.data)}`;
});
let ex = new Example([ 1, 2, 3 ]);
console.log(ex.__inspect); // Example(3) [ 1, 2, 3 ]
1.3.0
aepl 1.3.0
- added pre classes and functions that let you create stuff for before the class is initiated
- added setInspect for changing the output on the console
const cl = require('aepl');
cl.init("Example", class {
constructor(data) {
this.data = data
}
});
Example.newPF("from", function(data) {
return new Example(data);
});
Example.setInspect(function() {
return `Example Class (${this.data.length}) [ ${this.data.join(", ")} ]`;
});
console.log(Example.from([ 1, 2, 3 ])); // Example Class (3) [ 1, 2, 3 ]
1.2.11
aepl 1.2.11
- added from()
- updated init()
- added Class.setName()
- updated docs
1.2.10
due to complications and me being a little stupid I had to remove the support I was trying to add for classes created using non-class values
you can still do it but it won't be supported and will go back to returning the value you put in
const Class = require('aepl');
new Class("Main", [1, 2, 3]);
let main = new Main();
console.log(main); // [1, 2, 3]
1.2.9
aepl 1.2.9
updated builder for better cooler stuff
1.2.8
aepl 1.2.8
- renamed AeplSubClass to AeplSubclass
- updated README
1.2.7
aepl 1.2.7
added emoji to readme