UNPKG

icomoon-helper

Version:
30 lines (29 loc) 1.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.needRenderIcon = exports.checkSymbolsCount = exports.logger = exports.getLogString = void 0; const getLogString = (message) => { return '[icomoon-helper] ' + message; }; exports.getLogString = getLogString; exports.logger = { error: (message) => console.error(exports.getLogString(message)), warn: (message) => console.warn(exports.getLogString(message)), log: (message) => console.log(exports.getLogString(message)), }; const checkSymbolsCount = (symbol, count) => { if (count > 10) { exports.logger.error('In icon "' + symbol + '" more than ten colors(' + count + '), strongly not recommend use such icons'); } else if (count > 3) { exports.logger.warn('In icon "' + symbol + '" more than three colors(' + count + '), this can be a performance issue'); } }; exports.checkSymbolsCount = checkSymbolsCount; const needRenderIcon = () => { exports.logger.error('For current platform need provide renderIcon function'); }; exports.needRenderIcon = needRenderIcon;