UNPKG

tw-themes

Version:

powerful tailwind color themes (dynamically selectable at run-time)

26 lines (19 loc) 570 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; function generateCheck(baseCheckFn, msgPrefix = '') { const outerMsgPrefix = baseCheckFn ? baseCheckFn.msgPrefix : ''; const check = (condition, msg) => { if (!condition) { throw new Error(outerMsgPrefix + msgPrefix + msg); } }; check.msgPrefix = outerMsgPrefix + msgPrefix; check.prefix = msgPrefix => generateCheck(check, msgPrefix); return check; } const check = generateCheck(); var _default = check; exports.default = _default;