Package Exports
- shrink-string
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 (shrink-string) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
shrink-string
Tiny string compression module for Node.
Installation
npm i shrink-string
Usage
const { compress, decompress } = require('shrink-string')
// `compress` takes a unicode string and returns a base64 string
// `decompress` takes that base64 string and returns the original unicode string
const thing = async (s = '') => {
const shrunk = await compress(s)
const expanded = await decompress(shrunk)
assert(s === expanded)
}