1.1.12 • Published 3 years ago

url-polyfill v1.1.12

Weekly downloads
324,101
License
MIT
Repository
github
Last release
3 years ago

Polyfill URL and URLSearchParams to match last WHATWG specifications

Compliant in most of the use cases but not at 100% (like unicode chars, punycodes, etc...)

Tested on IE 10+

Install

npm i url-polyfill --save

Currently supported

window.URL

Documentation: https://developer.mozilla.org/en-US/docs/Web/API/URL

Supported : 'hash', 'host', 'hostname', 'href', 'port', 'protocol', 'search', 'toString', 'pathname', 'origin', 'searchParams'

Example:

const url = new URL('https://www.example.com:8080/?fr=yset_ie_syc_oracle&type=orcl_hpset#page0');
  • hash: "page0"
  • host: "www.example.com:8080"
  • hostname: "www.example.com"
  • href: "https://www.example.com:8080/?fr=yset_ie_syc_oracle&type=orcl_hpset#page0"
  • origin: "https://www.example.com:8080"
  • pathname: "/"
  • port: "8080"
  • protocol: "https:"
  • search: "?fr=yset_ie_syc_oracle&type=orcl_hpset"
  • searchParams: URLSearchParams (see next)
window.URLSearchParams

Documentation: https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams

Supported : 'append', 'delete', 'get', 'getAll', 'has', 'set', 'forEach', 'keys', 'values', 'entries', 'toString', 'Symbol.iterator'

Example:

const url = new URL('https://www.example.com/?fr=yset_ie_syc_oracle&type=orcl_hpset#page0');
url.searchParams.append('page', 0);
console.log(url.toString()); // print: "https://www.example.com/?fr=yset_ie_syc_oracle&type=orcl_hpset&page=0#page0"
@verbaler/videvowassplayerwassplayerswassplayersswebapp-userjs-paymentsaerolito-nextsitka-web@deriv/traderve-playertalent-app-shelllegible-epubjsdva-webpack-antd-tstdpro-clihzero-boothzero-boot-purehzero-front-runtimemostmessageswiss-post-internet-header@le2xx/plyr@competitionlabs/gamification-ux-package@everything-registry/sub-chunk-3023snbc-paas-bootcpaas-boot@gameleap/plyr@fridayjs/appwebchat-appzincjszhl-epubjszero-layoutzero-elementyungu-newnotice@gerhardsletten/epubjswodax-umi-build-devwinston-loki-without-snappywinston-lokiwodax-umi-plugin-polyfillsuhnoxi-music-webuhnoxi-music-web-builduiza-player-sdkxwy-dvvidevo-player@goodforonefare/polyfillstest-maomisrinstallersttk-app-coreumi-plugin-polyfillstui-baseumi-build-devuniversal-scriptsupembed-plyrtwo-faces-plyrvenom-playervxpay-jswplayer@koumoul/data-fair-charts@ktt45678/plyr@lightningjs/sdkfe-docker@lite-v3/polyfills@loipham/plyr-player@loortv/plyr@hmscore/analytics-sdk-miniprogram@hmscore/analytics-sdk-quickapp@hmscore/analytics-web@hycomponents-native/storybook@inlasningstjanst/epubjs@infinitebrahmanuniverse/nolb-urlgnrl.js@mohamedabdelwahed99/plyrgatsby-theme-municipio@oat-sa/tao-deliver-testrunner-fe@open-rights-exchange/serverfriendly-challenge@metrological/sdk@maa/monkey@mindsorg/plyrgeneraljs-2021gdom-0.0.1gdom.jseifwebuiesm-bare-to-browserio-plyr@rxmap/basiclib@rxmap/rxmapik-js-testingimgoptimizr@edsilv/epubjs@easy-messenger/client-connection@easy-messenger/server-connection@pareext/cli-service@os1-platform/aaa-webinfini@robguy21/plyrinfinidesk-web-widgetinspection-agent-ljp@rpmadden08/browser-core-with-local-storage@harryy/plyr@interplay/cliee-pltv
1.1.12

3 years ago

1.1.11

4 years ago

1.1.10

4 years ago

1.1.9

4 years ago

1.1.8

4 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago