Lossy encode to URI
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 ofstring
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
- Used by the high performance Javascript templating engine Remixml.
- Compatible with the fastest lockandload AMD-loader.
Card-carrying member of the zerodeps
movement.