Skip to content

Commit

Permalink
Fix IE8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrybendy committed Mar 27, 2019
1 parent a9b5942 commit 520ea10
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
coverage
.idea
node_modules
node_modules
.DS_Store
test
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This is a polyfill library for JavaScript's `URLSearchParams` class.
* Implemented all features from [MDN document](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams).
* Can use for both browsers and Node.js.
* Detect if browsers have full support for `URLSearchParams` and extend it
* Compatible with IE8 and above


## Installation
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
*
* @param {string} name
*/
prototype.delete = function(name) {
prototype['delete'] = function(name) {
delete this [__URLSearchParams__] [name];
};

Expand Down Expand Up @@ -171,7 +171,7 @@
keys.sort();

for (i = 0; i < keys.length; i++) {
this.delete(keys[i]);
this['delete'](keys[i]);
}
for (i = 0; i < keys.length; i++) {
var key = keys[i], values = dict[key];
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "url-search-params-polyfill",
"version": "5.0.1",
"version": "5.1.0",
"description": "a simple polyfill for javascript URLSearchParams",
"homepage": "https://github.com/jerrybendy/url-search-params-polyfill",
"main": "index.js",
Expand Down

0 comments on commit 520ea10

Please sign in to comment.