npm

Need private packages and team management tools?Check out npm Orgs. »

encody

1.0.0 • Public • Published

encody

Tagged string helper for encodeURIComponent.

npm Build Status node

Usage

In cases where you would do:

let url = 'http://example.com/?cat=' + encodeURIComponent('meow') + '&dog=' + encodeURIComponent('woof')

you can just do:

const encody = require('encody')
let url = encody`http://example.com?cat=${meow}&dog=${woof}`

encody(strings, ...vals)

Tag function for template string literals.

Encodes everything in vals with encodeURIComponent.

Returns: String

License

MIT

install

npm i encody

Downloadsweekly downloads

1

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability