Skip to content

Commit

Permalink
Add urlEncode and urlDecode functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
dleitee committed May 1, 2016
1 parent d937e8d commit bc9474c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/string.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -891,3 +891,12 @@ const decDecode = (value) =>
value.match(/.{1,5}/g).map((data)=>String.fromCharCode(parseInt(data, 10))).join('');

export {decDecode};

const urlEncode = (value) => encodeURI(value);

export {urlEncode};

const urlDecode = (value) => decodeURI(value);

export {urlDecode};

0 comments on commit bc9474c

Please sign in to comment.