1.0.0 • Published 5 years ago

url-encode-decode v1.0.0

Weekly downloads
632
License
MIT
Repository
github
Last release
5 years ago

url-encode-decode

package version package downloads standard-readme compliant package license make a pull request

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

  1. Fork it and create your feature branch: git checkout -b my-new-feature
  2. Commit your changes: git commit -am "Add some feature"
  3. Push to the branch: git push origin my-new-feature
  4. Submit a pull request

License

MIT