Skip to content

Commit 783794e

Browse files
committed
Bugfix: revert es6 for backwards compatability
1 parent bd530be commit 783794e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"use strict";
2-
const encode = str => {
2+
const encode = function(str) {
33
return encodeURIComponent(str + '')
44
.replace(/[!'()]/g, escape)
55
.replace(/\*/g, "%2A")
66
.replace(/\%20/g, "+")
77
.replace(/~/g, '%7E');
88
};
99

10-
const decode = str => {
10+
const decode = function(str) {
1111
return decodeURIComponent(
1212
(str + '')
1313
.replace(/%(?![\da-f]{2})/gi, () => '%25')

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "phpurlencode",
33
"description": "Functionally similar to PHP urlencode and urldecode functions",
4-
"version": "1.0.1",
4+
"version": "1.0.2",
55
"main": "index.js",
66
"license": "MIT",
77
"devDependencies": {

0 commit comments

Comments
 (0)