Arguments error fix
This commit is contained in:
parent
c71a180d8a
commit
fba60407e4
18
wire.js
18
wire.js
|
@ -11,18 +11,18 @@
|
||||||
let pipeLine = function(){
|
let pipeLine = function(){
|
||||||
this.reads = [];
|
this.reads = [];
|
||||||
this.writes = [];
|
this.writes = [];
|
||||||
this.read = (fn,pr) => reads.push({fn,pr});
|
this.read = (fn,pr) => this.reads.push({fn,pr});
|
||||||
this.write = (fn,pr) => writes.push({fn,pr});
|
this.write = (fn,pr) => this.writes.push({fn,pr});
|
||||||
this.get = (val) => {
|
this.get = (val) => {
|
||||||
let fns = reads.sort((a,b) => (a?.pr|0) - (b?.pr|0)),
|
let fns = this.reads.sort((a,b) => (a?.pr|0) - (b?.pr|0)),
|
||||||
real = val;
|
real = val;
|
||||||
for (const { fn } of fns) {
|
for (const { fn } of fns) {
|
||||||
fn( real, e => real = e );
|
fn( real, e => real = e );
|
||||||
};
|
};
|
||||||
return real;
|
return real;
|
||||||
};
|
};
|
||||||
this.set = () => {
|
this.set = (val) => {
|
||||||
let fns = writes.sort((a,b) => (a?.pr|0) - (b?.pr|0)),
|
let fns = this.writes.sort((a,b) => (a?.pr|0) - (b?.pr|0)),
|
||||||
real = val;
|
real = val;
|
||||||
for (const { fn } of fns) {
|
for (const { fn } of fns) {
|
||||||
fn( real, e => real = e );
|
fn( real, e => real = e );
|
||||||
|
@ -284,13 +284,13 @@
|
||||||
é.prototype.equalTo = function(value){
|
é.prototype.equalTo = function(value){
|
||||||
return é.isSame(value, this.value)
|
return é.isSame(value, this.value)
|
||||||
}
|
}
|
||||||
é.prototype.readLayer = function(value){
|
é.prototype.readLayer = function(fn,priority){
|
||||||
this.flag = this.flag | 2;
|
this.flag = this.flag | 2;
|
||||||
this.piping.read(a,b)
|
this.piping.read(fn,priority)
|
||||||
}
|
}
|
||||||
é.prototype.writeLayer = function(value){
|
é.prototype.writeLayer = function(fn,priority){
|
||||||
this.flag = this.flag | 4;
|
this.flag = this.flag | 4;
|
||||||
this.piping.write(a,b)
|
this.piping.write(fn,priority)
|
||||||
}
|
}
|
||||||
try{
|
try{
|
||||||
module.exports = é;
|
module.exports = é;
|
||||||
|
|
Loading…
Reference in New Issue