swc/bundler/tests/.cache/untrusted/63dad99f2eed60a72f04d6f87f755e568c3f1152.ts
강동윤 bbaf619f63
fix(bundler): Fix bugs (#1437)
swc_bundler:
 - [x] Fix wrapped esms. (denoland/deno#9307)
 - [x] Make test secure.
2021-03-02 17:33:03 +09:00

41 lines
997 B
TypeScript

// Loaded from https://dev.jspm.io/npm:jszip@3.5.0/lib/stream/Crc32Probe.dew.js
import { dew as _GenericWorkerDewDew } from "./GenericWorker.dew.js";
import { dew as _crc32DewDew } from "../crc32.dew.js";
import { dew as _utilsDewDew } from "../utils.dew.js";
var exports = {},
_dewExec = false;
export function dew() {
if (_dewExec) return exports;
_dewExec = true;
var GenericWorker = _GenericWorkerDewDew();
var crc32 = _crc32DewDew();
var utils = _utilsDewDew();
/**
* A worker which calculate the crc32 of the data flowing through.
* @constructor
*/
function Crc32Probe() {
GenericWorker.call(this, "Crc32Probe");
this.withStreamInfo("crc32", 0);
}
utils.inherits(Crc32Probe, GenericWorker);
/**
* @see GenericWorker.processChunk
*/
Crc32Probe.prototype.processChunk = function (chunk) {
this.streamInfo.crc32 = crc32(chunk.data, this.streamInfo.crc32 || 0);
this.push(chunk);
};
exports = Crc32Probe;
return exports;
}