multi parameters.

This commit is contained in:
Rintim 2023-09-21 20:14:27 +08:00
parent 8bf10e67d3
commit 8f57dfd661
1 changed files with 2 additions and 0 deletions

View File

@ -24825,12 +24825,14 @@
},
hasStorageAny:function(name,values){
const storage=this.storage[name];
if(!Array.isArray(values)) values=Array.from(arguments).slice(1);
if(!storage) return false;
if (!Array.isArray(storage)) return values.contains(storage);
return values.some(item => storage.contains(item));
},
hasStorageAll:function(name,values){
const storage=this.storage[name];
if(!Array.isArray(values)) values=Array.from(arguments).slice(1);
if(!storage) return false;
if (!Array.isArray(storage)) return false;
return values.every(item => storage.contains(item));