url-encode-decode
v1.0.0
Published
URL encoding & decoding
Downloads
1,956
Readme
url-encode-decode
URL encoding & decoding
Table of Contents
About
Based on this snippet.
Install
This project uses node and npm.
$ npm install url-encode-decode
$ # OR
$ yarn add url-encode-decode
Usage
const { encode, decode } = require('url-encode-decode')
encode('foo bar baz') // 'foo+bar+baz'
encode(`Hi! How? & you person/\\`) // 'Hi%21+How%3F+%26+you+person%2F%5C'
decode('foo+bar+baz') // 'foo bar baz'
decode('Hi%21+How%3F+%26+you+person%2F%5C') // `Hi! How? & you person/\\`
Contribute
- Fork it and create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am "Add some feature"
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
License
MIT