UNPKG

@thenewboston/utils

Version:

Utility files for the thenewboston community

43 lines (31 loc) 991 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } var bemify = function bemify(classNames, suffix, isVisible) { if (isVisible === void 0) { isVisible = true; } var classNameList = (classNames == null ? void 0 : classNames.split(' ')) || null; if (classNameList) { return classNameList.reduce(function (acc, className) { var _extends2; return _extends({}, acc, (_extends2 = {}, _extends2["" + className + suffix] = isVisible, _extends2)); }, {}); } return {}; }; exports.bemify = bemify; //# sourceMappingURL=utils.cjs.development.js.map