JSPM

pct-encode

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 372452
  • Score
    100M100P100Q176183F
  • License BSD

Percent-encode characters in strings matching a regular expression

Package Exports

  • pct-encode

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pct-encode) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

pct-encode

Create versions of strings where characters that match a regular expression are percent encoded.

Synopsis

var pctEncode = require('pct-encode')

var encode = pctEncode(/\W/);

console.log(encode("UTF-8 in your URIs: ✓"));

API

module.exports = function (regexp) -> function (string)