summaryrefslogtreecommitdiff
path: root/doc/api/util.md
diff options
context:
space:
mode:
authorSam Ruby <rubys@intertwingly.net>2018-07-12 13:48:11 -0400
committerVse Mozhet Byt <vsemozhetbyt@gmail.com>2018-07-15 23:57:35 +0300
commit40c85ff0634913f4c61e13cbb7cacb7e2c76120f (patch)
tree242febebcaa984898e65cdcd6bd61d6f6c1e4fed /doc/api/util.md
parent1009118d27b069411016df4ca6915aac3c36a41f (diff)
downloadandroid-node-v8-40c85ff0634913f4c61e13cbb7cacb7e2c76120f.tar.gz
android-node-v8-40c85ff0634913f4c61e13cbb7cacb7e2c76120f.tar.bz2
android-node-v8-40c85ff0634913f4c61e13cbb7cacb7e2c76120f.zip
doc: declare all parameter types
PR-URL: https://github.com/nodejs/node/pull/21782 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Diffstat (limited to 'doc/api/util.md')
-rw-r--r--doc/api/util.md46
1 files changed, 43 insertions, 3 deletions
diff --git a/doc/api/util.md b/doc/api/util.md
index 42cdf1b99c..1c7d2393a1 100644
--- a/doc/api/util.md
+++ b/doc/api/util.md
@@ -298,13 +298,13 @@ changes:
description: The `constructor` parameter can refer to an ES6 class now.
-->
+* `constructor` {Function}
+* `superConstructor` {Function}
+
Usage of `util.inherits()` is discouraged. Please use the ES6 `class` and
`extends` keywords to get language level inheritance support. Also note
that the two styles are [semantically incompatible][].
-* `constructor` {Function}
-* `superConstructor` {Function}
-
Inherit the prototype methods from one [constructor][] into another. The
prototype of `constructor` will be set to a new object created from
`superConstructor`.
@@ -939,6 +939,7 @@ useful for addon developers who prefer to do type checking in JavaScript.
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a built-in [`ArrayBuffer`][] or
@@ -959,6 +960,7 @@ util.types.isAnyArrayBuffer(new SharedArrayBuffer()); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is an `arguments` object.
@@ -977,6 +979,7 @@ function foo() {
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a built-in [`ArrayBuffer`][] instance.
@@ -995,6 +998,7 @@ util.types.isArrayBuffer(new SharedArrayBuffer()); // Returns false
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is an [async function][].
@@ -1014,6 +1018,7 @@ util.types.isAsyncFunction(async function foo() {}); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a `BigInt64Array` instance. The
@@ -1033,6 +1038,7 @@ util.types.isBigInt64Array(new BigUint64Array()); // Returns false
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a `BigUint64Array` instance. The
@@ -1052,6 +1058,7 @@ util.types.isBigUint64Array(new BigUint64Array()); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a boolean object, e.g. created
@@ -1073,6 +1080,7 @@ util.types.isBooleanObject(Boolean(true)); // Returns false
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a built-in [`DataView`][] instance.
@@ -1092,6 +1100,7 @@ See also [`ArrayBuffer.isView()`][].
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a built-in [`Date`][] instance.
@@ -1107,6 +1116,7 @@ util.types.isDate(new Date()); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a native `External` value.
@@ -1116,6 +1126,7 @@ Returns `true` if the value is a native `External` value.
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a built-in [`Float32Array`][] instance.
@@ -1133,6 +1144,7 @@ util.types.isFloat32Array(new Float64Array()); // Returns false
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a built-in [`Float64Array`][] instance.
@@ -1150,6 +1162,7 @@ util.types.isFloat64Array(new Float64Array()); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a generator function.
@@ -1169,6 +1182,7 @@ util.types.isGeneratorFunction(function* foo() {}); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a generator object as returned from a
@@ -1190,6 +1204,7 @@ util.types.isGeneratorObject(generator); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a built-in [`Int8Array`][] instance.
@@ -1207,6 +1222,7 @@ util.types.isInt8Array(new Float64Array()); // Returns false
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a built-in [`Int16Array`][] instance.
@@ -1224,6 +1240,7 @@ util.types.isInt16Array(new Float64Array()); // Returns false
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a built-in [`Int32Array`][] instance.
@@ -1241,6 +1258,7 @@ util.types.isInt32Array(new Float64Array()); // Returns false
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a built-in [`Map`][] instance.
@@ -1256,6 +1274,7 @@ util.types.isMap(new Map()); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is an iterator returned for a built-in
@@ -1276,6 +1295,7 @@ util.types.isMapIterator(map[Symbol.iterator]()); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is an instance of a [Module Namespace Object][].
@@ -1294,6 +1314,7 @@ util.types.isModuleNamespaceObject(ns); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is an instance of a built-in [`Error`][] type.
@@ -1311,6 +1332,7 @@ util.types.isNativeError(new RangeError()); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a number object, e.g. created
@@ -1328,6 +1350,7 @@ util.types.isNumberObject(new Number(0)); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a built-in [`Promise`][].
@@ -1343,6 +1366,7 @@ util.types.isPromise(Promise.resolve(42)); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a [`Proxy`][] instance.
@@ -1361,6 +1385,7 @@ util.types.isProxy(proxy); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a regular expression object.
@@ -1377,6 +1402,7 @@ util.types.isRegExp(new RegExp('abc')); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a built-in [`Set`][] instance.
@@ -1392,6 +1418,7 @@ util.types.isSet(new Set()); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is an iterator returned for a built-in
@@ -1412,6 +1439,7 @@ util.types.isSetIterator(set[Symbol.iterator]()); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a built-in [`SharedArrayBuffer`][] instance.
@@ -1430,6 +1458,7 @@ util.types.isSharedArrayBuffer(new SharedArrayBuffer()); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a string object, e.g. created
@@ -1447,6 +1476,7 @@ util.types.isStringObject(new String('foo')); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a symbol object, created
@@ -1465,6 +1495,7 @@ util.types.isSymbolObject(Object(symbol)); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a built-in [`TypedArray`][] instance.
@@ -1484,6 +1515,7 @@ See also [`ArrayBuffer.isView()`][].
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a built-in [`Uint8Array`][] instance.
@@ -1501,6 +1533,7 @@ util.types.isUint8Array(new Float64Array()); // Returns false
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a built-in [`Uint8ClampedArray`][] instance.
@@ -1518,6 +1551,7 @@ util.types.isUint8ClampedArray(new Float64Array()); // Returns false
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a built-in [`Uint16Array`][] instance.
@@ -1535,6 +1569,7 @@ util.types.isUint16Array(new Float64Array()); // Returns false
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a built-in [`Uint32Array`][] instance.
@@ -1552,6 +1587,7 @@ util.types.isUint32Array(new Float64Array()); // Returns false
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a built-in [`WeakMap`][] instance.
@@ -1567,6 +1603,7 @@ util.types.isWeakMap(new WeakMap()); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a built-in [`WeakSet`][] instance.
@@ -1582,6 +1619,7 @@ util.types.isWeakSet(new WeakSet()); // Returns true
added: v10.0.0
-->
+* `value` {any}
* Returns: {boolean}
Returns `true` if the value is a built-in [`WebAssembly.Module`][] instance.
@@ -1603,6 +1641,8 @@ applications and modules should be updated to find alternative approaches.
added: v0.7.5
deprecated: v6.0.0
-->
+* `target` {Object}
+* `source` {Object}
> Stability: 0 - Deprecated: Use [`Object.assign()`] instead.