aboutsummaryrefslogtreecommitdiff
path: root/node_modules/pako/lib/inflate.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/pako/lib/inflate.js')
-rw-r--r--node_modules/pako/lib/inflate.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/node_modules/pako/lib/inflate.js b/node_modules/pako/lib/inflate.js
index 0ed4999dd..4028130be 100644
--- a/node_modules/pako/lib/inflate.js
+++ b/node_modules/pako/lib/inflate.js
@@ -22,7 +22,7 @@ var toString = Object.prototype.toString;
/* internal
* inflate.chunks -> Array
*
- * Chunks of output data, if [[Inflate#onData]] not overriden.
+ * Chunks of output data, if [[Inflate#onData]] not overridden.
**/
/**
@@ -150,7 +150,7 @@ function Inflate(options) {
* Inflate#push(data[, mode]) -> Boolean
* - data (Uint8Array|Array|ArrayBuffer|String): input data
* - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.
- * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH.
+ * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.
*
* Sends input data to inflate pipe, generating [[Inflate#onData]] calls with
* new output chunks. Returns `true` on success. The last data block must have
@@ -297,7 +297,7 @@ Inflate.prototype.push = function (data, mode) {
/**
* Inflate#onData(chunk) -> Void
- * - chunk (Uint8Array|Array|String): ouput data. Type of array depends
+ * - chunk (Uint8Array|Array|String): output data. Type of array depends
* on js engine support. When string output requested, each chunk
* will be string.
*
@@ -324,7 +324,7 @@ Inflate.prototype.onEnd = function (status) {
if (status === c.Z_OK) {
if (this.options.to === 'string') {
// Glue & convert here, until we teach pako to send
- // utf8 alligned strings to onData
+ // utf8 aligned strings to onData
this.result = this.chunks.join('');
} else {
this.result = utils.flattenChunks(this.chunks);
@@ -381,7 +381,7 @@ function inflate(input, options) {
inflator.push(input, true);
// That will never happens, if you don't cheat with options :)
- if (inflator.err) { throw inflator.msg; }
+ if (inflator.err) { throw inflator.msg || msg[inflator.err]; }
return inflator.result;
}