Sha256: d10060a5ab81a4ec0e504a0d69da24feb287e2cbdbf8c48c48e9e1a7471a1680

Contents?: true

Size: 1.36 KB

Versions: 154

Compression:

Stored size: 1.36 KB

Contents

{"version":3,"file":"unescape.js","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,MACsB,EAAE,EACtD,EAAE;IACF,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC;QACnC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;AAChF,CAAC,CAAA","sourcesContent":["import { MinimatchOptions } from './index.js'\n/**\n * Un-escape a string that has been escaped with {@link escape}.\n *\n * If the {@link windowsPathsNoEscape} option is used, then square-brace\n * escapes are removed, but not backslash escapes.  For example, it will turn\n * the string `'[*]'` into `*`, but it will not turn `'\\\\*'` into `'*'`,\n * becuase `\\` is a path separator in `windowsPathsNoEscape` mode.\n *\n * When `windowsPathsNoEscape` is not set, then both brace escapes and\n * backslash escapes are removed.\n *\n * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped\n * or unescaped.\n */\nexport const unescape = (\n  s: string,\n  {\n    windowsPathsNoEscape = false,\n  }: Pick<MinimatchOptions, 'windowsPathsNoEscape'> = {}\n) => {\n  return windowsPathsNoEscape\n    ? s.replace(/\\[([^\\/\\\\])\\]/g, '$1')\n    : s.replace(/((?!\\\\).|^)\\[([^\\/\\\\])\\]/g, '$1$2').replace(/\\\\([^\\/])/g, '$1')\n}\n"]}

Version data entries

154 entries across 41 versions & 2 rubygems

Version Path
immosquare-cleaner-0.1.41 node_modules/minimatch/dist/mjs/unescape.js.map
immosquare-cleaner-0.1.41 node_modules/ignore-walk/node_modules/minimatch/dist/mjs/unescape.js.map
immosquare-cleaner-0.1.41 node_modules/glob/node_modules/minimatch/dist/mjs/unescape.js.map
immosquare-cleaner-0.1.40 node_modules/glob/node_modules/minimatch/dist/mjs/unescape.js.map
immosquare-cleaner-0.1.40 node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/unescape.js.map
immosquare-cleaner-0.1.40 node_modules/minimatch/dist/mjs/unescape.js.map
immosquare-cleaner-0.1.40 node_modules/ignore-walk/node_modules/minimatch/dist/mjs/unescape.js.map
immosquare-cleaner-0.1.40 node_modules/@tufjs/models/node_modules/minimatch/dist/mjs/unescape.js.map
immosquare-cleaner-0.1.39 node_modules/glob/node_modules/minimatch/dist/mjs/unescape.js.map
immosquare-cleaner-0.1.39 node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/unescape.js.map
immosquare-cleaner-0.1.39 node_modules/minimatch/dist/mjs/unescape.js.map
immosquare-cleaner-0.1.39 node_modules/ignore-walk/node_modules/minimatch/dist/mjs/unescape.js.map
immosquare-cleaner-0.1.39 node_modules/@tufjs/models/node_modules/minimatch/dist/mjs/unescape.js.map
immosquare-cleaner-0.1.38 node_modules/glob/node_modules/minimatch/dist/mjs/unescape.js.map
immosquare-cleaner-0.1.38 node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/unescape.js.map
immosquare-cleaner-0.1.38 node_modules/minimatch/dist/mjs/unescape.js.map
immosquare-cleaner-0.1.38 node_modules/ignore-walk/node_modules/minimatch/dist/mjs/unescape.js.map
immosquare-cleaner-0.1.38 node_modules/@tufjs/models/node_modules/minimatch/dist/mjs/unescape.js.map
decidim-0.26.10 packages/webpacker/node_modules/minimatch/dist/mjs/unescape.js.map
immosquare-cleaner-0.1.32 node_modules/minimatch/dist/mjs/unescape.js.map