Skip to content

Commit 62b25f6

Browse files
committed
require() pako lazily
1 parent 825e737 commit 62b25f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/flate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"use strict";
22
var USE_TYPEDARRAY = (typeof Uint8Array !== "undefined") && (typeof Uint16Array !== "undefined") && (typeof Uint32Array !== "undefined");
33

4-
var pako = require("pako");
54
var utils = require("./utils");
65
var GenericWorker = require("./stream/GenericWorker");
76

@@ -64,6 +63,7 @@ FlateWorker.prototype.cleanUp = function () {
6463
* issue #446.
6564
*/
6665
FlateWorker.prototype._createPako = function () {
66+
var pako = require("pako");
6767
this._pako = new pako[this._pakoAction]({
6868
chunkSize: 65536,
6969
raw: true,

0 commit comments

Comments
 (0)