UNPKG

@sanpjs/bundler-webpack

Version:

@sanpjs/bundler-webpack

25 lines 834 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.normalizeConfig = exports.formatSize = exports.isIncluded = void 0; const isIncluded = (name, includes, excludes) => { if (includes) { return includes.some((p) => typeof p === 'string' ? name === p : p.test(name)); } if (excludes) { return !excludes.some((p) => typeof p === 'string' ? name === p : p.test(name)); } return true; }; exports.isIncluded = isIncluded; const formatSize = (size) => { return (size / 1024).toFixed(2) + ' KiB'; }; exports.formatSize = formatSize; const normalizeConfig = (config, defaultValue) => { if (typeof config === 'string') { return [config, defaultValue]; } return config; }; exports.normalizeConfig = normalizeConfig; //# sourceMappingURL=inspect.js.map