@thenewboston/utils
Version:
Utility files for the thenewboston community
39 lines (29 loc) • 894 B
JavaScript
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 {};
};
export { bemify };
//# sourceMappingURL=utils.esm.js.map