Sha256: 608c6a6ccc511b1dec7677175d828731aaca90802d3c4ed13c8a39019aa35385

Contents?: true

Size: 918 Bytes

Versions: 26

Compression:

Stored size: 918 Bytes

Contents

{"version":3,"sources":["../../../../src/core/utils/url/cleanUrl.ts"],"sourcesContent":["const REDUNDANT_CHARACTERS_EXP = /[\\?|#].*$/g\n\nexport function getSearchParams(path: string) {\n  return new URL(`/${path}`, 'http://localhost').searchParams\n}\n\n/**\n * Removes search parameters and the fragment\n * from a given URL string.\n */\nexport function cleanUrl(path: string): string {\n  // If the path ends with an optional path parameter,\n  // return it as-is.\n  if (path.endsWith('?')) {\n    return path\n  }\n\n  // Otherwise, remove the search and fragment from it.\n  return path.replace(REDUNDANT_CHARACTERS_EXP, '')\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAM,2BAA2B;AAE1B,SAAS,gBAAgB,MAAc;AAC5C,SAAO,IAAI,IAAI,IAAI,IAAI,IAAI,kBAAkB,EAAE;AACjD;AAMO,SAAS,SAAS,MAAsB;AAG7C,MAAI,KAAK,SAAS,GAAG,GAAG;AACtB,WAAO;AAAA,EACT;AAGA,SAAO,KAAK,QAAQ,0BAA0B,EAAE;AAClD;","names":[]}

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
clapton-0.0.26 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.25 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.24 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.23 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.22 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.21 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.20 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.19 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.18 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.17 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.16 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.15 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.14 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.13 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.12 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.11 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.10 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.9 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.8 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.7 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map