Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 32x 2x 2x 2x 2x 27x 5x 5x 2x 2x 32x 2x 2x 2x 2x 2x 2x 2x 2x 14x 14x 14x 14x 5x 5x 14x 14x 14x 2x 2x 2x 2x 2x 2x | /*! standard-engine. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ /** * @template T * @param {T[]|T} value * @returns {T[]} */ const ensureArray = (value) => Array.isArray(value) ? [...value] : [value] /** * @param {unknown} value * @returns {string[]} */ const ensureStringArrayValue = (value) => { if (!Array.isArray(value)) return [] /** @type {string[]} */ const result = [] for (const item of value) { if (typeof item === 'string') result.push(item) } return result } /** * @template T * @param {string|string[]} values * @param {{ [key: string]: T }} base * @returns {{ [key: string]: T|true }} */ const stringArrayToObj = (values, base = {}) => { /** @type {{ [key: string]: T|true }} */ const result = { ...base } for (const value of ensureArray(values)) { result[value] = true } return result } module.exports = { ensureArray, ensureStringArrayValue, stringArrayToObj } |