lix-website/themes/lix/assets/bootstrap/node_modules/os-filter-obj/index.js
2024-04-26 22:49:34 -06:00

8 lines
269 B
JavaScript

'use strict';
module.exports = input => {
const arch = require('arch')();
const check = (bool, key, val) => (!bool || !key || key === val);
return input.filter(x => [process.platform, arch].every((y, i) => check(i === 0, x.os, y) && check(i === 1, x.arch, y)));
};