Skip to content

Commit

Permalink
Merge pull request #539 from luzpaz/misc-typos
Browse files Browse the repository at this point in the history
Misc. doxy and trivial source comment typo fixes
  • Loading branch information
Stuk committed Aug 28, 2019
2 parents 8742db3 + bf9a136 commit 3109282
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 32 deletions.
28 changes: 14 additions & 14 deletions dist/jszip.js
Expand Up @@ -178,7 +178,7 @@ CompressedObject.prototype = {

/**
* Chain the given worker with other workers to compress the content with the
* given compresion.
* given compression.
* @param {GenericWorker} uncompressedWorker the worker to pipe.
* @param {Object} compression the compression object.
* @param {Object} compressionOptions the options to use when compressing.
Expand Down Expand Up @@ -484,7 +484,7 @@ var generateDosExternalFileAttr = function (dosPermissions, isDir) {

/**
* Generate the various parts used in the construction of the final zip file.
* @param {Object} streamInfo the hash with informations about the compressed file.
* @param {Object} streamInfo the hash with information about the compressed file.
* @param {Boolean} streamedContent is the content streamed ?
* @param {Boolean} streamingEnded is the stream finished ?
* @param {number} offset the current offset from the start of the zip file.
Expand Down Expand Up @@ -707,7 +707,7 @@ var generateCentralDirectoryEnd = function (entriesCount, centralDirLength, loca

/**
* Generate data descriptors for a file entry.
* @param {Object} streamInfo the hash generated by a worker, containing informations
* @param {Object} streamInfo the hash generated by a worker, containing information
* on the file entry.
* @return {String} the data descriptors.
*/
Expand Down Expand Up @@ -759,7 +759,7 @@ function ZipFileWorker(streamFiles, comment, platform, encodeFileName) {
// The total number of entries in this zip file.
this.entriesCount = 0;
// the name of the file currently being added, null when handling the end of the zip file.
// Used for the emited metadata.
// Used for the emitted metadata.
this.currentFile = null;


Expand Down Expand Up @@ -1667,7 +1667,7 @@ var out = {
opts.type = opts.type.toLowerCase();
opts.compression = opts.compression.toUpperCase();

// "binarystring" is prefered but the internals use "string".
// "binarystring" is preferred but the internals use "string".
if(opts.type === "binarystring") {
opts.type = "string";
}
Expand Down Expand Up @@ -1876,9 +1876,9 @@ DataReader.prototype = {
// see implementations
},
/**
* Find the last occurence of a zip signature (4 bytes).
* Find the last occurrence of a zip signature (4 bytes).
* @param {string} sig the signature to find.
* @return {number} the index of the last occurence, -1 if not found.
* @return {number} the index of the last occurrence, -1 if not found.
*/
lastIndexOfSignature: function(sig) {
// see implementations
Expand Down Expand Up @@ -3122,7 +3122,7 @@ function stringToArrayLike(str, array) {

/**
* An helper for the function arrayLikeToString.
* This contains static informations and functions that
* This contains static information and functions that
* can be optimized by the browser JIT compiler.
*/
var arrayToStringHelper = {
Expand Down Expand Up @@ -3862,7 +3862,7 @@ ZipEntry.prototype = {
reader.skip(localExtraFieldsLength);

if (this.compressedSize === -1 || this.uncompressedSize === -1) {
throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory " + "(compressedSize === -1 || uncompressedSize === -1)");
throw new Error("Bug or corrupted zip : didn't get enough information from the central directory " + "(compressedSize === -1 || uncompressedSize === -1)");
}

compression = findCompression(this.compressionMethod);
Expand Down Expand Up @@ -4608,7 +4608,7 @@ var Z_DEFLATED = 8;
/* internal
* Deflate.chunks -> Array
*
* Chunks of output data, if [[Deflate#onData]] not overriden.
* Chunks of output data, if [[Deflate#onData]] not overridden.
**/

/**
Expand Down Expand Up @@ -4850,7 +4850,7 @@ Deflate.prototype.push = function (data, mode) {

/**
* Deflate#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.
*
Expand Down Expand Up @@ -4993,7 +4993,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.
**/

/**
Expand Down Expand Up @@ -5268,7 +5268,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.
*
Expand All @@ -5295,7 +5295,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);
Expand Down
2 changes: 1 addition & 1 deletion documentation/api_jszip/external.md
Expand Up @@ -11,7 +11,7 @@ contains the following properties :

* `Promise` : the [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) implementation used.

The global object is prefered when available.
The global object is preferred when available.

__Example__

Expand Down
2 changes: 1 addition & 1 deletion documentation/api_jszip/generate_async.md
Expand Up @@ -186,7 +186,7 @@ zip.generateAsync({
If specified, this function will be called each time a chunk is pushed to the
output stream (or internally accumulated).

The function takes a `metadata` object which contains informations about the
The function takes a `metadata` object which contains information about the
ongoing process.

__Metadata__ : the metadata are:
Expand Down
2 changes: 1 addition & 1 deletion documentation/api_zipobject/async.md
Expand Up @@ -44,7 +44,7 @@ zip.file("image.png").async("uint8array").then(function (u8) {
If specified, this function will be called each time a chunk is pushed to the
output stream (or internally accumulated).

The function takes a `metadata` object which contains informations about the
The function takes a `metadata` object which contains information about the
ongoing process.

__Metadata__ : the metadata are :
Expand Down
2 changes: 1 addition & 1 deletion documentation/examples.md
Expand Up @@ -91,7 +91,7 @@ zip.remove("photos"); // by removing the folder, you also remove its content.
With `.generateAsync(options)` or `.generateNodeStream(options)` you can generate
a zip file (not a real file but its representation in memory). Check
[this page]({{site.baseurl}}/documentation/howto/write_zip.html) for more
informations on how to write / give the file to the user.
information on how to write / give the file to the user.

```js
var promise = null;
Expand Down
2 changes: 1 addition & 1 deletion documentation/faq.md
Expand Up @@ -15,7 +15,7 @@ decode the binary content as a text and corrupt it. See

That happens if you try to handle to much data with the synchronous API. If
possible, try the asynchronous API, see
[this page]({{site.baseurl}}/documentation/limitations.html) for more informations.
[this page]({{site.baseurl}}/documentation/limitations.html) for more information.

### Can't read the data of [...]. Is it in a supported JavaScript type ?

Expand Down
2 changes: 1 addition & 1 deletion index.html
Expand Up @@ -136,7 +136,7 @@ <h3>Getting help</h3>
answers to common questions.
</li>
<li>
If you're looking for informations about a specific method, try the
If you're looking for information about a specific method, try the
<a href="{{site.baseurl}}/documentation/api_jszip.html">documentation</a>.
</li>
<li>
Expand Down
2 changes: 1 addition & 1 deletion lib/compressedObject.js
Expand Up @@ -57,7 +57,7 @@ CompressedObject.prototype = {

/**
* Chain the given worker with other workers to compress the content with the
* given compresion.
* given compression.
* @param {GenericWorker} uncompressedWorker the worker to pipe.
* @param {Object} compression the compression object.
* @param {Object} compressionOptions the options to use when compressing.
Expand Down
6 changes: 3 additions & 3 deletions lib/generate/ZipFileWorker.js
Expand Up @@ -70,7 +70,7 @@ var generateDosExternalFileAttr = function (dosPermissions, isDir) {

/**
* Generate the various parts used in the construction of the final zip file.
* @param {Object} streamInfo the hash with informations about the compressed file.
* @param {Object} streamInfo the hash with information about the compressed file.
* @param {Boolean} streamedContent is the content streamed ?
* @param {Boolean} streamingEnded is the stream finished ?
* @param {number} offset the current offset from the start of the zip file.
Expand Down Expand Up @@ -293,7 +293,7 @@ var generateCentralDirectoryEnd = function (entriesCount, centralDirLength, loca

/**
* Generate data descriptors for a file entry.
* @param {Object} streamInfo the hash generated by a worker, containing informations
* @param {Object} streamInfo the hash generated by a worker, containing information
* on the file entry.
* @return {String} the data descriptors.
*/
Expand Down Expand Up @@ -345,7 +345,7 @@ function ZipFileWorker(streamFiles, comment, platform, encodeFileName) {
// The total number of entries in this zip file.
this.entriesCount = 0;
// the name of the file currently being added, null when handling the end of the zip file.
// Used for the emited metadata.
// Used for the emitted metadata.
this.currentFile = null;


Expand Down
2 changes: 1 addition & 1 deletion lib/object.js
Expand Up @@ -335,7 +335,7 @@ var out = {
opts.type = opts.type.toLowerCase();
opts.compression = opts.compression.toUpperCase();

// "binarystring" is prefered but the internals use "string".
// "binarystring" is preferred but the internals use "string".
if(opts.type === "binarystring") {
opts.type = "string";
}
Expand Down
4 changes: 2 additions & 2 deletions lib/reader/DataReader.js
Expand Up @@ -83,9 +83,9 @@ DataReader.prototype = {
// see implementations
},
/**
* Find the last occurence of a zip signature (4 bytes).
* Find the last occurrence of a zip signature (4 bytes).
* @param {string} sig the signature to find.
* @return {number} the index of the last occurence, -1 if not found.
* @return {number} the index of the last occurrence, -1 if not found.
*/
lastIndexOfSignature: function(sig) {
// see implementations
Expand Down
2 changes: 1 addition & 1 deletion lib/utils.js
Expand Up @@ -88,7 +88,7 @@ function stringToArrayLike(str, array) {

/**
* An helper for the function arrayLikeToString.
* This contains static informations and functions that
* This contains static information and functions that
* can be optimized by the browser JIT compiler.
*/
var arrayToStringHelper = {
Expand Down
2 changes: 1 addition & 1 deletion lib/zipEntry.js
Expand Up @@ -86,7 +86,7 @@ ZipEntry.prototype = {
reader.skip(localExtraFieldsLength);

if (this.compressedSize === -1 || this.uncompressedSize === -1) {
throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory " + "(compressedSize === -1 || uncompressedSize === -1)");
throw new Error("Bug or corrupted zip : didn't get enough information from the central directory " + "(compressedSize === -1 || uncompressedSize === -1)");
}

compression = findCompression(this.compressionMethod);
Expand Down
2 changes: 1 addition & 1 deletion test/asserts/file.js
Expand Up @@ -247,7 +247,7 @@ QUnit.module("file", function () {
if (JSZip.support.blob) {
QUnit.assert.equal(err, null, testName + "no error");
QUnit.assert.ok(blob instanceof Blob, testName + "the result is a instance of Blob");
QUnit.assert.equal(blob.type, "", testName + "the result has the rigth mime type");
QUnit.assert.equal(blob.type, "", testName + "the result has the right mime type");
QUnit.assert.equal(blob.size, opts.rawData.length, testName + "the result has the right length");
} else {
QUnit.assert.equal(blob, null, testName + "no data");
Expand Down
4 changes: 2 additions & 2 deletions test/asserts/generate.js
Expand Up @@ -149,7 +149,7 @@ testGenerateFor([{
if (JSZip.support.blob) {
assert.equal(err, null, "no error");
assert.ok(result instanceof Blob, "the result is a instance of Blob");
assert.equal(result.type, "application/zip", "the result has the rigth mime type");
assert.equal(result.type, "application/zip", "the result has the right mime type");
assert.equal(result.size, expected.length, "the result has the right length");
} else {
assert.equal(result, null, "no data");
Expand All @@ -168,7 +168,7 @@ testGenerateFor([{
if (JSZip.support.blob) {
assert.equal(err, null, "no error");
assert.ok(result instanceof Blob, "the result is a instance of Blob");
assert.equal(result.type, "application/ods", "the result has the rigth mime type");
assert.equal(result.type, "application/ods", "the result has the right mime type");
assert.equal(result.size, expected.length, "the result has the right length");
} else {
assert.equal(result, null, "no data");
Expand Down

0 comments on commit 3109282

Please sign in to comment.