mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-12-14 00:59:50 +08:00
18 lines
353 B
JavaScript
18 lines
353 B
JavaScript
function AND(...args) {
|
|
return args.reduce((a, b) => a.map((c, i) => b[i] && c));
|
|
}
|
|
|
|
function OR(...args) {
|
|
return args.reduce((a, b) => a.map((c, i) => b[i] || c));
|
|
}
|
|
|
|
function NOT(array) {
|
|
return array.map((c) => !c);
|
|
}
|
|
|
|
function FULL(length, bool) {
|
|
return [...Array(length).keys()].map(() => bool);
|
|
}
|
|
|
|
export { AND, OR, NOT, FULL };
|