lossy-encode-to-uri

1.0.0 • Public • Published

Lossy encode to URI

NPM version Downloads Rate on Openbase

Performs a lossy transformation into a format that can be inserted into a URI path component.

Requirements

It runs inside any webbrowser (starting at IE11 and up) or NodeJS environment.

It has zero dependencies on other modules.

Reference documentation

  • LossyEncode2URI.encode(string)
    Performs a lossy transformation of string into a format that can be inserted into a URI path component:
    • Cast to lowercase.
    • Replace diacritics by their ASCII equivalent.
    • Replace all strings of non-alphanumeric characters with single dashes.
    • Strip dashes from start and end.

References

Card-carrying member of the zerodeps movement.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i lossy-encode-to-uri

      Weekly Downloads

      5

      Version

      1.0.0

      License

      (ISC OR GPL-3.0)

      Unpacked Size

      25.3 kB

      Total Files

      13

      Last publish

      Collaborators

      • buglessrb