refactor: Improve array filtering logic in parser.ts
This commit is contained in:
@@ -1014,8 +1014,8 @@ const matcher = (p1:string,matcherArg:matcherArg) => {
|
||||
}
|
||||
case 'filter':{
|
||||
const array = arra[1].split('§')
|
||||
return array.filter((f) => {
|
||||
return f !== '' && array.indexOf(f) === array.lastIndexOf(f)
|
||||
return array.filter((f, i) => {
|
||||
return f !== '' && i === array.indexOf(f)
|
||||
}).join('§')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user