compress-brotli
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="1.0.5"></a> | ||
## [1.0.5](https://github.com/Kikobeats/compress-brotli/compare/v1.0.4...v1.0.5) (2019-04-11) | ||
### Bug Fixes | ||
* expose serialize/deserialize in noop ([8afc3f4](https://github.com/Kikobeats/compress-brotli/commit/8afc3f4)) | ||
<a name="1.0.4"></a> | ||
@@ -7,0 +17,0 @@ ## [1.0.4](https://github.com/Kikobeats/compress-brotli/compare/v1.0.3...v1.0.4) (2019-04-11) |
13
index.js
@@ -8,5 +8,10 @@ 'use strict' | ||
const defaultSerialize = val => Buffer.from(JSON.stringify(val)) | ||
const defaultDeserialize = JSON.parse | ||
const noop = { | ||
compress: data => data, | ||
decompress: data => data | ||
deserialize: defaultDeserialize, | ||
serialize: defaultSerialize, | ||
decompress: data => data, | ||
compress: data => data | ||
} | ||
@@ -16,4 +21,4 @@ | ||
enable = true, | ||
serialize = val => Buffer.from(JSON.stringify(val)), | ||
deserialize = JSON.parse | ||
serialize = defaultSerialize, | ||
deserialize = defaultDeserialize | ||
} = {}) => { | ||
@@ -20,0 +25,0 @@ if (!enable) return noop |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://nicedoc.io/Kikobeats/compress-brotli", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"main": "index.js", | ||
@@ -8,0 +8,0 @@ "author": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11188
67