UNPKG

str-merge

Version:

String utilities and conflict conditionals (includes tailwind-merge).

18 lines (17 loc) 517 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ocx = void 0; function ocx(...inputs) { return inputs.reduce((acc, input) => { if (!input) return acc; if (typeof input === 'function') return { ...acc, ...ocx(input()) }; if (Array.isArray(input)) return { ...acc, ...ocx(...input) }; if (typeof input === 'object') return { ...acc, ...input }; return acc; }, {}); } exports.ocx = ocx;