diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-03-27 21:01:33 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-03-27 21:01:33 +0100 |
commit | cc97a4dd2a967e1c2273bd5f4c5f49a5bf2e2585 (patch) | |
tree | 92c5d88706a6ffc654d1b133618d357890e7096b /node_modules/clean-css/lib/utils | |
parent | 3771b4d6b67b34c130f3a9a1a15f42deefdb2eda (diff) |
remove node_modules
Diffstat (limited to 'node_modules/clean-css/lib/utils')
-rw-r--r-- | node_modules/clean-css/lib/utils/clone-array.js | 12 | ||||
-rw-r--r-- | node_modules/clean-css/lib/utils/format-position.js | 11 | ||||
-rw-r--r-- | node_modules/clean-css/lib/utils/has-protocol.js | 7 | ||||
-rw-r--r-- | node_modules/clean-css/lib/utils/is-data-uri-resource.js | 7 | ||||
-rw-r--r-- | node_modules/clean-css/lib/utils/is-http-resource.js | 7 | ||||
-rw-r--r-- | node_modules/clean-css/lib/utils/is-https-resource.js | 7 | ||||
-rw-r--r-- | node_modules/clean-css/lib/utils/is-import.js | 7 | ||||
-rw-r--r-- | node_modules/clean-css/lib/utils/is-remote-resource.js | 7 | ||||
-rw-r--r-- | node_modules/clean-css/lib/utils/natural-compare.js | 31 | ||||
-rw-r--r-- | node_modules/clean-css/lib/utils/override.js | 34 | ||||
-rw-r--r-- | node_modules/clean-css/lib/utils/split.js | 50 |
11 files changed, 0 insertions, 180 deletions
diff --git a/node_modules/clean-css/lib/utils/clone-array.js b/node_modules/clean-css/lib/utils/clone-array.js deleted file mode 100644 index b95ee6843..000000000 --- a/node_modules/clean-css/lib/utils/clone-array.js +++ /dev/null @@ -1,12 +0,0 @@ -function cloneArray(array) { - var cloned = array.slice(0); - - for (var i = 0, l = cloned.length; i < l; i++) { - if (Array.isArray(cloned[i])) - cloned[i] = cloneArray(cloned[i]); - } - - return cloned; -} - -module.exports = cloneArray; diff --git a/node_modules/clean-css/lib/utils/format-position.js b/node_modules/clean-css/lib/utils/format-position.js deleted file mode 100644 index 0e3713c19..000000000 --- a/node_modules/clean-css/lib/utils/format-position.js +++ /dev/null @@ -1,11 +0,0 @@ -function formatPosition(metadata) { - var line = metadata[0]; - var column = metadata[1]; - var source = metadata[2]; - - return source ? - source + ':' + line + ':' + column : - line + ':' + column; -} - -module.exports = formatPosition; diff --git a/node_modules/clean-css/lib/utils/has-protocol.js b/node_modules/clean-css/lib/utils/has-protocol.js deleted file mode 100644 index fa1b61fd5..000000000 --- a/node_modules/clean-css/lib/utils/has-protocol.js +++ /dev/null @@ -1,7 +0,0 @@ -var NO_PROTOCOL_RESOURCE_PATTERN = /^\/\//; - -function hasProtocol(uri) { - return !NO_PROTOCOL_RESOURCE_PATTERN.test(uri); -} - -module.exports = hasProtocol; diff --git a/node_modules/clean-css/lib/utils/is-data-uri-resource.js b/node_modules/clean-css/lib/utils/is-data-uri-resource.js deleted file mode 100644 index 58558110f..000000000 --- a/node_modules/clean-css/lib/utils/is-data-uri-resource.js +++ /dev/null @@ -1,7 +0,0 @@ -var DATA_URI_PATTERN = /^data:(\S*?)?(;charset=[^;]+)?(;[^,]+?)?,(.+)/; - -function isDataUriResource(uri) { - return DATA_URI_PATTERN.test(uri); -} - -module.exports = isDataUriResource; diff --git a/node_modules/clean-css/lib/utils/is-http-resource.js b/node_modules/clean-css/lib/utils/is-http-resource.js deleted file mode 100644 index 5179c2ea9..000000000 --- a/node_modules/clean-css/lib/utils/is-http-resource.js +++ /dev/null @@ -1,7 +0,0 @@ -var HTTP_RESOURCE_PATTERN = /^http:\/\//; - -function isHttpResource(uri) { - return HTTP_RESOURCE_PATTERN.test(uri); -} - -module.exports = isHttpResource; diff --git a/node_modules/clean-css/lib/utils/is-https-resource.js b/node_modules/clean-css/lib/utils/is-https-resource.js deleted file mode 100644 index c6938f57d..000000000 --- a/node_modules/clean-css/lib/utils/is-https-resource.js +++ /dev/null @@ -1,7 +0,0 @@ -var HTTPS_RESOURCE_PATTERN = /^https:\/\//; - -function isHttpsResource(uri) { - return HTTPS_RESOURCE_PATTERN.test(uri); -} - -module.exports = isHttpsResource; diff --git a/node_modules/clean-css/lib/utils/is-import.js b/node_modules/clean-css/lib/utils/is-import.js deleted file mode 100644 index 72abc3287..000000000 --- a/node_modules/clean-css/lib/utils/is-import.js +++ /dev/null @@ -1,7 +0,0 @@ -var IMPORT_PREFIX_PATTERN = /^@import/i; - -function isImport(value) { - return IMPORT_PREFIX_PATTERN.test(value); -} - -module.exports = isImport; diff --git a/node_modules/clean-css/lib/utils/is-remote-resource.js b/node_modules/clean-css/lib/utils/is-remote-resource.js deleted file mode 100644 index fb3b61f3d..000000000 --- a/node_modules/clean-css/lib/utils/is-remote-resource.js +++ /dev/null @@ -1,7 +0,0 @@ -var REMOTE_RESOURCE_PATTERN = /^(\w+:\/\/|\/\/)/; - -function isRemoteResource(uri) { - return REMOTE_RESOURCE_PATTERN.test(uri); -} - -module.exports = isRemoteResource; diff --git a/node_modules/clean-css/lib/utils/natural-compare.js b/node_modules/clean-css/lib/utils/natural-compare.js deleted file mode 100644 index 7a5246762..000000000 --- a/node_modules/clean-css/lib/utils/natural-compare.js +++ /dev/null @@ -1,31 +0,0 @@ -// adapted from http://nedbatchelder.com/blog/200712.html#e20071211T054956 - -var NUMBER_PATTERN = /([0-9]+)/; - -function naturalCompare(value1, value2) { - var keys1 = ('' + value1).split(NUMBER_PATTERN).map(tryParseInt); - var keys2 = ('' + value2).split(NUMBER_PATTERN).map(tryParseInt); - var key1; - var key2; - var compareFirst = Math.min(keys1.length, keys2.length); - var i, l; - - for (i = 0, l = compareFirst; i < l; i++) { - key1 = keys1[i]; - key2 = keys2[i]; - - if (key1 != key2) { - return key1 > key2 ? 1 : -1; - } - } - - return keys1.length > keys2.length ? 1 : (keys1.length == keys2.length ? 0 : -1); -} - -function tryParseInt(value) { - return ('' + parseInt(value)) == value ? - parseInt(value) : - value; -} - -module.exports = naturalCompare; diff --git a/node_modules/clean-css/lib/utils/override.js b/node_modules/clean-css/lib/utils/override.js deleted file mode 100644 index e7f84948c..000000000 --- a/node_modules/clean-css/lib/utils/override.js +++ /dev/null @@ -1,34 +0,0 @@ -function override(source1, source2) { - var target = {}; - var key1; - var key2; - var item; - - for (key1 in source1) { - item = source1[key1]; - - if (Array.isArray(item)) { - target[key1] = item.slice(0); - } else if (typeof item == 'object' && item !== null) { - target[key1] = override(item, {}); - } else { - target[key1] = item; - } - } - - for (key2 in source2) { - item = source2[key2]; - - if (key2 in target && Array.isArray(item)) { - target[key2] = item.slice(0); - } else if (key2 in target && typeof item == 'object' && item !== null) { - target[key2] = override(target[key2], item); - } else { - target[key2] = item; - } - } - - return target; -} - -module.exports = override; diff --git a/node_modules/clean-css/lib/utils/split.js b/node_modules/clean-css/lib/utils/split.js deleted file mode 100644 index c91625506..000000000 --- a/node_modules/clean-css/lib/utils/split.js +++ /dev/null @@ -1,50 +0,0 @@ -var Marker = require('../tokenizer/marker'); - -function split(value, separator) { - var openLevel = Marker.OPEN_ROUND_BRACKET; - var closeLevel = Marker.CLOSE_ROUND_BRACKET; - var level = 0; - var cursor = 0; - var lastStart = 0; - var lastValue; - var lastCharacter; - var len = value.length; - var parts = []; - - if (value.indexOf(separator) == -1) { - return [value]; - } - - if (value.indexOf(openLevel) == -1) { - return value.split(separator); - } - - while (cursor < len) { - if (value[cursor] == openLevel) { - level++; - } else if (value[cursor] == closeLevel) { - level--; - } - - if (level === 0 && cursor > 0 && cursor + 1 < len && value[cursor] == separator) { - parts.push(value.substring(lastStart, cursor)); - lastStart = cursor + 1; - } - - cursor++; - } - - if (lastStart < cursor + 1) { - lastValue = value.substring(lastStart); - lastCharacter = lastValue[lastValue.length - 1]; - if (lastCharacter == separator) { - lastValue = lastValue.substring(0, lastValue.length - 1); - } - - parts.push(lastValue); - } - - return parts; -} - -module.exports = split; |