remixml-pathencode

6.1.0 • Public • Published

Remixml path-component filter

NPM version Downloads Rate on Openbase

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

Automatically registers itself as a Remixml filter using the name path.

Basic usage

<set var="_.foo">SÖme text with a diacritic.</set>
Then insert /this/is/a/sanitised/&_.foo:path;/path using the path filter.

Requirements

It runs inside any webbrowser or NodeJS environment.

Reference documentation

  • RemixmlPathencode.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.

/remixml-pathencode/

    Package Sidebar

    Install

    npm i remixml-pathencode

    Weekly Downloads

    8

    Version

    6.1.0

    License

    (ISC OR GPL-3.0)

    Unpacked Size

    12 kB

    Total Files

    13

    Last publish

    Collaborators

    • buglessrb