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.6 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.5 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.4 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.3 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.2 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map
clapton-0.0.1 lib/clapton/javascripts/node_modules/msw/lib/core/utils/url/cleanUrl.js.map