Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: specify options parameter type in zlib.md #21920

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
doc: specify options parameter type in zlib.md
Also, delete now redundant notes and links.
vsemozhetbyt committed Jul 21, 2018
commit 7938680ebb3e1b3319e274c864d71b0b593a862c
57 changes: 28 additions & 29 deletions doc/api/zlib.md
Original file line number Diff line number Diff line change
@@ -480,18 +480,18 @@ Provides an object enumerating Zlib-related constants.
added: v0.5.8
-->

* `options` {Object}
* `options` {zlib options}

Creates and returns a new [`Deflate`][] object with the given [`options`][].
Creates and returns a new [`Deflate`][] object.

## zlib.createDeflateRaw([options])
<!-- YAML
added: v0.5.8
-->

* `options` {Object}
* `options` {zlib options}

Creates and returns a new [`DeflateRaw`][] object with the given [`options`][].
Creates and returns a new [`DeflateRaw`][] object.

An upgrade of zlib from 1.2.8 to 1.2.11 changed behavior when `windowBits`
is set to 8 for raw deflate streams. zlib would automatically set `windowBits`
@@ -505,45 +505,45 @@ that effectively uses an 8-bit window only.
added: v0.5.8
-->

* `options` {Object}
* `options` {zlib options}

Creates and returns a new [`Gunzip`][] object with the given [`options`][].
Creates and returns a new [`Gunzip`][] object.

## zlib.createGzip([options])
<!-- YAML
added: v0.5.8
-->

* `options` {Object}
* `options` {zlib options}

Creates and returns a new [`Gzip`][] object with the given [`options`][].
Creates and returns a new [`Gzip`][] object.

## zlib.createInflate([options])
<!-- YAML
added: v0.5.8
-->

* `options` {Object}
* `options` {zlib options}

Creates and returns a new [`Inflate`][] object with the given [`options`][].
Creates and returns a new [`Inflate`][] object.

## zlib.createInflateRaw([options])
<!-- YAML
added: v0.5.8
-->

* `options` {Object}
* `options` {zlib options}

Creates and returns a new [`InflateRaw`][] object with the given [`options`][].
Creates and returns a new [`InflateRaw`][] object.

## zlib.createUnzip([options])
<!-- YAML
added: v0.5.8
-->

* `options` {Object}
* `options` {zlib options}

Creates and returns a new [`Unzip`][] object with the given [`options`][].
Creates and returns a new [`Unzip`][] object.

## Convenience Methods

@@ -572,7 +572,7 @@ changes:
description: The `buffer` parameter can be an `Uint8Array` now.
-->
* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}
* `callback` {Function}

### zlib.deflateSync(buffer[, options])
@@ -591,7 +591,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}

Compress a chunk of data with [`Deflate`][].

@@ -608,7 +608,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}
* `callback` {Function}

### zlib.deflateRawSync(buffer[, options])
@@ -627,7 +627,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}

Compress a chunk of data with [`DeflateRaw`][].

@@ -647,7 +647,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}
* `callback` {Function}

### zlib.gunzipSync(buffer[, options])
@@ -666,7 +666,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}

Decompress a chunk of data with [`Gunzip`][].

@@ -686,7 +686,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}
* `callback` {Function}

### zlib.gzipSync(buffer[, options])
@@ -705,7 +705,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}

Compress a chunk of data with [`Gzip`][].

@@ -725,7 +725,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}
* `callback` {Function}

### zlib.inflateSync(buffer[, options])
@@ -744,7 +744,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}

Decompress a chunk of data with [`Inflate`][].

@@ -764,7 +764,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}
* `callback` {Function}

### zlib.inflateRawSync(buffer[, options])
@@ -783,7 +783,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}

Decompress a chunk of data with [`InflateRaw`][].

@@ -803,7 +803,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}
* `callback` {Function}

### zlib.unzipSync(buffer[, options])
@@ -822,7 +822,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}

Decompress a chunk of data with [`Unzip`][].

@@ -840,7 +840,6 @@ Decompress a chunk of data with [`Unzip`][].
[`InflateRaw`]: #zlib_class_zlib_inflateraw
[`TypedArray`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
[`Unzip`]: #zlib_class_zlib_unzip
[`options`]: #zlib_class_options
[`zlib.bytesWritten`]: #zlib_zlib_byteswritten
[Memory Usage Tuning]: #zlib_memory_usage_tuning
[pool size]: cli.html#cli_uv_threadpool_size_size
4 changes: 3 additions & 1 deletion tools/doc/type-parser.js
Original file line number Diff line number Diff line change
@@ -118,7 +118,9 @@ const customTypesMap = {
'URL': 'url.html#url_the_whatwg_url_api',
'URLSearchParams': 'url.html#url_class_urlsearchparams',

'MessagePort': 'worker_threads.html#worker_threads_class_messageport'
'MessagePort': 'worker_threads.html#worker_threads_class_messageport',

'zlib options': 'zlib.html#zlib_class_options',
};

const arrayPart = /(?:\[])+$/;