We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd530be commit 783794eCopy full SHA for 783794e
index.js
@@ -1,13 +1,13 @@
1
"use strict";
2
-const encode = str => {
+const encode = function(str) {
3
return encodeURIComponent(str + '')
4
.replace(/[!'()]/g, escape)
5
.replace(/\*/g, "%2A")
6
.replace(/\%20/g, "+")
7
.replace(/~/g, '%7E');
8
};
9
10
-const decode = str => {
+const decode = function(str) {
11
return decodeURIComponent(
12
(str + '')
13
.replace(/%(?![\da-f]{2})/gi, () => '%25')
package.json
@@ -1,7 +1,7 @@
{
"name": "phpurlencode",
"description": "Functionally similar to PHP urlencode and urldecode functions",
- "version": "1.0.1",
+ "version": "1.0.2",
"main": "index.js",
"license": "MIT",
"devDependencies": {
0 commit comments