Arguments error fix

This commit is contained in:
Abdussamed 2023-11-10 21:37:49 +03:00
parent c71a180d8a
commit fba60407e4
1 changed files with 9 additions and 9 deletions

18
wire.js
View File

@ -11,18 +11,18 @@
let pipeLine = function(){
this.reads = [];
this.writes = [];
this.read = (fn,pr) => reads.push({fn,pr});
this.write = (fn,pr) => writes.push({fn,pr});
this.read = (fn,pr) => this.reads.push({fn,pr});
this.write = (fn,pr) => this.writes.push({fn,pr});
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;
for (const { fn } of fns) {
fn( real, e => real = e );
};
return real;
};
this.set = () => {
let fns = writes.sort((a,b) => (a?.pr|0) - (b?.pr|0)),
this.set = (val) => {
let fns = this.writes.sort((a,b) => (a?.pr|0) - (b?.pr|0)),
real = val;
for (const { fn } of fns) {
fn( real, e => real = e );
@ -284,13 +284,13 @@
é.prototype.equalTo = function(value){
return é.isSame(value, this.value)
}
é.prototype.readLayer = function(value){
é.prototype.readLayer = function(fn,priority){
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.piping.write(a,b)
this.piping.write(fn,priority)
}
try{
module.exports = é;