diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
commit | bbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch) | |
tree | c58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/micromatch/lib/chars.js | |
parent | 003fb34971cf63466184351b4db5f7c67df4f444 (diff) |
update packages
Diffstat (limited to 'node_modules/micromatch/lib/chars.js')
-rw-r--r-- | node_modules/micromatch/lib/chars.js | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/node_modules/micromatch/lib/chars.js b/node_modules/micromatch/lib/chars.js deleted file mode 100644 index a1ffe3714..000000000 --- a/node_modules/micromatch/lib/chars.js +++ /dev/null @@ -1,67 +0,0 @@ -'use strict'; - -var chars = {}, unesc, temp; - -function reverse(object, prepender) { - return Object.keys(object).reduce(function(reversed, key) { - var newKey = prepender ? prepender + key : key; // Optionally prepend a string to key. - reversed[object[key]] = newKey; // Swap key and value. - return reversed; // Return the result. - }, {}); -} - -/** - * Regex for common characters - */ - -chars.escapeRegex = { - '?': /\?/g, - '@': /\@/g, - '!': /\!/g, - '+': /\+/g, - '*': /\*/g, - '(': /\(/g, - ')': /\)/g, - '[': /\[/g, - ']': /\]/g -}; - -/** - * Escape characters - */ - -chars.ESC = { - '?': '__UNESC_QMRK__', - '@': '__UNESC_AMPE__', - '!': '__UNESC_EXCL__', - '+': '__UNESC_PLUS__', - '*': '__UNESC_STAR__', - ',': '__UNESC_COMMA__', - '(': '__UNESC_LTPAREN__', - ')': '__UNESC_RTPAREN__', - '[': '__UNESC_LTBRACK__', - ']': '__UNESC_RTBRACK__' -}; - -/** - * Unescape characters - */ - -chars.UNESC = unesc || (unesc = reverse(chars.ESC, '\\')); - -chars.ESC_TEMP = { - '?': '__TEMP_QMRK__', - '@': '__TEMP_AMPE__', - '!': '__TEMP_EXCL__', - '*': '__TEMP_STAR__', - '+': '__TEMP_PLUS__', - ',': '__TEMP_COMMA__', - '(': '__TEMP_LTPAREN__', - ')': '__TEMP_RTPAREN__', - '[': '__TEMP_LTBRACK__', - ']': '__TEMP_RTBRACK__' -}; - -chars.TEMP = temp || (temp = reverse(chars.ESC_TEMP)); - -module.exports = chars; |