1.1.12 • Published 5 years ago

url-polyfill v1.1.12

Weekly downloads
324,101
License
MIT
Repository
github
Last release
5 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-boottest-maomiwinston-lokiwinston-loki-without-snappywodax-umi-build-devwodax-umi-plugin-polyfillsvxpay-jswebchat-appwplayervenom-playervidevo-player@rpmadden08/browser-core-with-local-storagejujin-dvkalash-media-plyrkalash-player-plyrjest-preset-edgekm-plyrlc-ant-reactlatitude-flexportik-js-testingimgoptimizrinfiniinfinidesk-web-widgethelpers-cliio-plyrinspection-agent-ljplg-paylibrary-simplified-webpub-viewermarinafunnellambda-service@whitespace/gatsby-theme-wordpress-basic@whitespace/gatsby-theme-wordpress@wessberg/polyfiller@workpathco/client@uizaio/playerjs@thepalaceproject/webpub-viewer@tsq/plyr@universalviewer/epubjs@theoplayer/react-native-ui@theankur/plyr@xrengine/engine@yungu-fed/yungu-userinfo@yungu-fed/yungu-newnotice@yungu-fed/yungu-studentmessage@yungu-fed/yungu-studentselect@z1399/reta-cli@zappr/plyranalytics-cn-euanalytics-eu@ziqni-tech/gamification-ux-package@ziqni-tech/member-widgetadaptation-jitsi-meetasyncy-playerant-pro-wzc-testaooappauthhelper@goodforonefare/polyfills@harryy/plyr@aatif-packages/tools@aioz/plyr@easy-messenger/client-connection@easy-messenger/server-connection@edsilv/epubjs@constl/utils-tests@crewlinq/winston-loki@compassinformatics/cpsi-mapview@amc-technology/ui-libraryplyr-fixsrinstallerstwo-faces-plyruhnoxi-music-webuhnoxi-music-web-buildumi-build-devuiza-player-sdkumi-plugin-polyfillsttk-app-coretui-base
1.1.12

5 years ago

1.1.11

5 years ago

1.1.10

5 years ago

1.1.9

5 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.14

7 years ago

1.0.13

8 years ago

1.0.12

8 years ago

1.0.11

8 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago