Socket
Socket
Sign inDemoInstall

@eonasdan/lz-string

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eonasdan/lz-string

Compress and decompress string with javascript.


Version published
Maintainers
1
Created
Source

String Compression

I forked matschik version which is a port of the original lz-string.

I reduced the redundant code and used rollup to produce both an ES6+ and UMD scripts

Install

$ npm install @eonasdan/lz-string

Example

import { compress, decompress } from '@eonasdan/lz-string'

const compressed = compress('hello world');
const decompressed = decompress(compressed);

API

compressToBase64(input: string): string;

decompressFromBase64(input: string): string | null;

compressToURL(input: string): string;

decompressFromURL(input: string): string | null;

compress(uncompressed: string): string;

decompress(compressed: null | string): string | null;

FAQs

Package last updated on 23 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc