mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-04 20:40:07 +02:00
use minify
This commit is contained in:
18
node_modules/html-minifier/src/utils.js
generated
vendored
Normal file
18
node_modules/html-minifier/src/utils.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
function createMap(values, ignoreCase) {
|
||||
var map = {};
|
||||
values.forEach(function(value) {
|
||||
map[value] = 1;
|
||||
});
|
||||
return ignoreCase ? function(value) {
|
||||
return map[value.toLowerCase()] === 1;
|
||||
} : function(value) {
|
||||
return map[value] === 1;
|
||||
};
|
||||
}
|
||||
|
||||
exports.createMap = createMap;
|
||||
exports.createMapFromString = function(values, ignoreCase) {
|
||||
return createMap(values.split(/,/), ignoreCase);
|
||||
};
|
Reference in New Issue
Block a user