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@compassinformatics/cpsi-mapview@databowl/affiliate-tracking@rpmadden08/browser-core-with-local-storagejujin-dvkalash-media-plyrkalash-player-plyrjest-preset-edgekm-plyrlc-ant-reactlatitude-flexportplyr-fixsrinstallerstwo-faces-plyruhnoxi-music-webuhnoxi-music-web-buildumi-build-devuiza-player-sdkumi-plugin-polyfillsttk-app-coretui-base@aioz/plyr@amc-technology/ui-library@antik-web/plyr@api.video/hlsjs-player-analytics@api.video/player-analytics@api.video/player-sdk@api.video/private-video-session@api.video/videojs-player-analytics@apimarket/apimarket-server@authing/sso@avanio/variable-util@autra/giro3d@autra/itowns@axa-ch/pod-myaxa@axa-ch/pod-myaxa-nextrel@axa-ch/pod-access-manager@axa-ch/alt-pod-myaxa@axa-ch/axa-ch-core@baladshow/plyr-shaka@barnardos/components@blorajs/umi-build-dev@blazes/analytics@blazes/analytics-cn@aatif-packages/tools@deskpro/portal-components@constl/utils-testsxwy-dvyungu-newnoticezero-layoutzero-elementzhl-epubjszincjsupembed-plyruniversal-scripts@easy-messenger/client-connection@easy-messenger/server-connection@harryy/plyr@hoanpx2201/plyr@hycomponents-native/storybook@flussonic/flussonic-dvr-player@flussonic/flussonic-webrtc-player@fengsi/imgproxy@edsilv/epubjs@gameleap/plyr@goodforonefare/polyfills@everflow/everflow-sdk
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

5 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 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

7 years ago

1.0.12

7 years ago

1.0.11

7 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

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago