Comparing version 1.0.0 to 1.0.1
@@ -9,6 +9,4 @@ | ||
const _compress = function(uncompressed, bitsPerChar, getCharFromInt) { | ||
if (uncompressed === null) { | ||
return ''; | ||
} | ||
let i; let value; | ||
let i; | ||
let value; | ||
const context_dictionary = {}; | ||
@@ -230,3 +228,3 @@ const context_dictionaryToCreate = {}; | ||
module.exports = function(input) { | ||
if (input === null) { | ||
if (input === null || input === '' || typeof input === 'undefined') { | ||
return ''; | ||
@@ -233,0 +231,0 @@ } |
@@ -192,3 +192,3 @@ | ||
module.exports = function(input) { | ||
if (input === null || input === '') { | ||
if (input === null || input === '' || typeof input === 'undefined') { | ||
return ''; | ||
@@ -195,0 +195,0 @@ } |
{ | ||
"name": "lz-utils", | ||
"description": "lz-utils", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "./lib/index.js", | ||
@@ -12,4 +12,4 @@ "keywords": [ | ||
}, | ||
"workspaces": [ | ||
"packages/*" | ||
"files": [ | ||
"lib" | ||
], | ||
@@ -16,0 +16,0 @@ "dependencies": {}, |
@@ -9,2 +9,3 @@ # lz-utils | ||
## Usage | ||
```js | ||
@@ -19,2 +20,12 @@ const {compress, decompress} = require('lz-utils'); | ||
} | ||
``` | ||
``` | ||
## Only import compress or decompress | ||
```js | ||
const compress = require('lz-utils/lib/compress.js'); | ||
const decompress = require('lz-utils/lib/decompress.js'); | ||
``` | ||
## Link | ||
* [https://github.com/pieroxy/lz-string](https://github.com/pieroxy/lz-string) | ||
* [https://pieroxy.net/blog/pages/lz-string/index.html](https://pieroxy.net/blog/pages/lz-string/index.html) |
29
16744
5
407