wormhole-crypto
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -10,3 +10,3 @@ /* eslint-env browser */ | ||
*/ | ||
export function transformStream (sourceReadable, transformer) { | ||
export function transformStream (sourceReadable, transformer = {}) { | ||
let transformedReadable | ||
@@ -51,3 +51,3 @@ let done | ||
async start (controller) { | ||
if (this.transformer?.start) { | ||
if (this.transformer.start) { | ||
try { | ||
@@ -76,3 +76,3 @@ await this.transformer.start(controller) | ||
if (data.done) { | ||
if (this.transformer?.flush) { | ||
if (this.transformer.flush) { | ||
await this.transformer.flush(controller) | ||
@@ -84,3 +84,3 @@ } | ||
} | ||
if (this.transformer?.transform) { | ||
if (this.transformer.transform) { | ||
await this.transformer.transform(data.value, wrappedController) | ||
@@ -87,0 +87,0 @@ } else { |
{ | ||
"name": "wormhole-crypto", | ||
"description": "Streaming encryption for Wormhole.app, based on Encrypted Content-Encoding for HTTP (RFC 8188)", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Socket Inc", |
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
27371