diff --git a/.npmignore b/.npmignore index a8aad13..e9a1048 100644 --- a/.npmignore +++ b/.npmignore @@ -1,3 +1,5 @@ coverage .idea -node_modules \ No newline at end of file +node_modules +.DS_Store +test \ No newline at end of file diff --git a/README.md b/README.md index 7493520..31e3177 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/index.js b/index.js index d65cc8f..6af93a9 100644 --- a/index.js +++ b/index.js @@ -61,7 +61,7 @@ * * @param {string} name */ - prototype.delete = function(name) { + prototype['delete'] = function(name) { delete this [__URLSearchParams__] [name]; }; @@ -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]; diff --git a/package.json b/package.json index 92bbff8..cd06347 100644 --- a/package.json +++ b/package.json @@ -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",