UNPKG

@enonic/js-utils

Version:
20 lines (18 loc) 359 B
// array/flatten.ts function flatten(arr, d = 1) { return d > 0 ? arr.reduce((acc, val) => acc.concat( Array.isArray(val) ? flatten(val, d - 1) : val ), []) : arr.slice(); } // storage/query/dsl/not.ts function not(...args) { const flattened = flatten(args); return { mustNot: flattened }; } var mustNot = not; export { mustNot, not };