0.1.0 • Published 5 months ago

@hugov/shorter-string2 v0.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

shorter-string

small string to string compression for short strings to any base with a given character set

ExampleAPILicense

Example

import {encode, decode} from './index.js'

const code = encode('text to encode')

API

exportsNote
string constants
BASE620-9A-Za-z
BASE64BASE62 + -_
UNRESERVEDBASE62 + -._~; RFC 3986 base:66
PCHARUNRESERVED + %!$&'()*+,;=:@; RFC 3986 base:80
QUERYPCHAR without ' for chrome base:79
RFC1924RFC1924 base:85
HASHPCHAR + /?#; base:81
functions
encode( text:string, [keys:string=HASH] ) => code:string
decode:( code:string, [keys:string=HASH] ) => text:string

License

MIT © Hugo Villeneuve

0.1.0

5 months ago