Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lzstring-loader

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

lzstring-loader

lzstring loader

  • 0.2.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

lzstring-loader

lz-string for webpack

Compresses a string and then decompresses it at runtime Ideal for large JSONs and large CSS files

Usage

Plain old string

var string = require("lzstring!./a.txt");

JSON (with json-loader)

var json = require("lzstring!json!./a.json");

CSS (with style-loader)

require("style!lzstring!./a.css");

Use other lzstring methods with the query param to

require("style!lzstring?to=utf16!./a.css");

Query params

to

The default is (compress/decompress)(To/From)Base64

  • base64: (compress/decompress)(To/From)Base64
  • utf16: (compress/decompress)(To/From)UTF16
  • webkit-utf16: (compress/decompress)
  • uri: (compress/decompress)(To/From)EncodedURIComponent
  • uint8: (compress/decompress)(To/From)Uint8Array

TODO

Add support for script-loader
Make json-loading a bit more polymorphic

eg:

var json = require("json!lzstring!./a.json");

Keywords

FAQs

Package last updated on 27 Nov 2015

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