提交 c9acdb7b 编写于 作者: W wusongqing

update docs against 5766

Signed-off-by: Nwusongqing <wusongqing@huawei.com>
上级 3c8dfac4
# util # util
> **NOTE**<br> > **NOTE**
>
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
This module provides common utility functions, such as **TextEncoder** and **TextDecoder** for string encoding and decoding, **RationalNumber** for rational number operations, **LruBuffer** for buffer management, **Scope** for range determination, **Base64** for Base64 encoding and decoding, and **types** for checks of built-in object types. This module provides common utility functions, such as **TextEncoder** and **TextDecoder** for string encoding and decoding, **RationalNumber** for rational number operations, **LruBuffer** for buffer management, **Scope** for range determination, **Base64** for Base64 encoding and decoding, and **Types** for checks of built-in object types.
## Modules to Import ## Modules to Import
...@@ -23,15 +24,15 @@ Prints the input content in a formatted string. ...@@ -23,15 +24,15 @@ Prints the input content in a formatted string.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| format | string | Yes | Format of the string to print. | | format | string | Yes| Format of the string to print.|
| ...args | Object[] | No | Data to format. | | ...args | Object[] | No| Data to format.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| string | String in the specified format. | | string | String in the specified format.|
**Example** **Example**
```js ```js
...@@ -49,14 +50,14 @@ Obtains detailed information about a system error code. ...@@ -49,14 +50,14 @@ Obtains detailed information about a system error code.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| errno | number | Yes | Error code generated. | | errno | number | Yes| Error code generated.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| string | Detailed information about the error code. | | string | Detailed information about the error code.|
**Example** **Example**
```js ```js
...@@ -76,14 +77,14 @@ Calls back an asynchronous function. In the callback, the first parameter indica ...@@ -76,14 +77,14 @@ Calls back an asynchronous function. In the callback, the first parameter indica
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| original | Function | Yes | Asynchronous function. | | original | Function | Yes| Asynchronous function.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| Function | Callback, in which the first parameter indicates the cause of the rejection (the value is **null** if the promise has been resolved) and the second parameter indicates the resolved value. | | Function | Callback, in which the first parameter indicates the cause of the rejection (the value is **null** if the promise has been resolved) and the second parameter indicates the resolved value.|
**Example** **Example**
```js ```js
...@@ -107,14 +108,14 @@ Processes an asynchronous function and returns a promise version. ...@@ -107,14 +108,14 @@ Processes an asynchronous function and returns a promise version.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| original | Function | Yes | Asynchronous function. | | original | Function | Yes| Asynchronous function.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| Function | Function in the error-first style (that is, **(err, value) =>...** is called as the last parameter) and the promise version. | | Function | Function in the error-first style (that is, **(err, value) =>...** is called as the last parameter) and the promise version.|
**Example** **Example**
```js ```js
...@@ -138,11 +139,11 @@ Processes an asynchronous function and returns a promise version. ...@@ -138,11 +139,11 @@ Processes an asynchronous function and returns a promise version.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
| Name | Type | Readable | Writable | Description | | Name| Type| Readable| Writable| Description|
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| encoding | string | Yes | No | Encoding format.<br>-&nbsp;Supported formats: utf-8, ibm866, iso-8859-2, iso-8859-3, iso-8859-4, iso-8859-5, iso-8859-6, iso-8859-7, iso-8859-8, iso-8859-8-i, iso-8859-10, iso-8859-13, iso-8859-14, iso-8859-15, koi8-r, koi8-u, macintosh, windows-874, windows-1250, windows-1251, windows-1252, windows-1253, windows-1254, windows-1255, windows-1256, windows-1257, windows-1258, x-mac-cyrilli, gbk, gb18030, big5, euc-jp, iso-2022-jp, shift_jis, euc-kr, utf-16be, utf-16le | | encoding | string | Yes| No| Encoding format.<br>- Supported formats: utf-8, ibm866, iso-8859-2, iso-8859-3, iso-8859-4, iso-8859-5, iso-8859-6, iso-8859-7, iso-8859-8, iso-8859-8-i, iso-8859-10, iso-8859-13, iso-8859-14, iso-8859-15, koi8-r, koi8-u, macintosh, windows-874, windows-1250, windows-1251, windows-1252, windows-1253, windows-1254, windows-1255, windows-1256, windows-1257, windows-1258, x-mac-cyrilli, gbk, gb18030, big5, euc-jp, iso-2022-jp, shift_jis, euc-kr, utf-16be, utf-16le|
| fatal | boolean | Yes | No | Whether to display fatal errors. | | fatal | boolean | Yes| No| Whether to display fatal errors.|
| ignoreBOM | boolean | Yes | No | Whether to ignore the byte order marker (BOM). The default value is **false**, which indicates that the result contains the BOM. | | ignoreBOM | boolean | Yes| No| Whether to ignore the byte order marker (BOM). The default value is **false**, which indicates that the result contains the BOM.|
### constructor ### constructor
...@@ -154,17 +155,17 @@ A constructor used to create a **TextDecoder** object. ...@@ -154,17 +155,17 @@ A constructor used to create a **TextDecoder** object.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| encoding | string | No | Encoding format. | | encoding | string | No| Encoding format.|
| options | Object | No | Encoding-related options, which include **fatal** and **ignoreBOM**. | | options | Object | No| Encoding-related options, which include **fatal** and **ignoreBOM**.|
**Table 1** options **Table 1** options
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| fatal | boolean | No | Whether to display fatal errors. | | fatal | boolean | No| Whether to display fatal errors.|
| ignoreBOM | boolean | No | Whether to ignore the BOM. | | ignoreBOM | boolean | No| Whether to ignore the BOM.|
**Example** **Example**
```js ```js
...@@ -181,21 +182,21 @@ Decodes the input content. ...@@ -181,21 +182,21 @@ Decodes the input content.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| input | Unit8Array | Yes | Uint8Array to decode. | | input | Unit8Array | Yes| Uint8Array to decode.|
| options | Object | No | Options related to decoding. | | options | Object | No| Options related to decoding.|
**Table 2** options **Table 2** options
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| stream | boolean | No | Whether to allow data blocks in subsequent **decode()**. If data is processed in blocks, set this parameter to **true**. If this is the last data block to process or data is not divided into blocks, set this parameter to **false**. The default value is **false**. | | stream | boolean | No| Whether to allow data blocks in subsequent **decode()**. If data is processed in blocks, set this parameter to **true**. If this is the last data block to process or data is not divided into blocks, set this parameter to **false**. The default value is **false**.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| string | Data decoded. | | string | Data decoded.|
**Example** **Example**
```js ```js
...@@ -219,9 +220,9 @@ Decodes the input content. ...@@ -219,9 +220,9 @@ Decodes the input content.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
| Name | Type | Readable | Writable | Description | | Name| Type| Readable| Writable| Description|
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| encoding | string | Yes | No | Encoding format. The default format is **utf-8**. | | encoding | string | Yes| No| Encoding format. The default format is **utf-8**.|
### constructor ### constructor
...@@ -247,14 +248,14 @@ Encodes the input content. ...@@ -247,14 +248,14 @@ Encodes the input content.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| input | string | Yes | String to encode. | | input | string | Yes| String to encode.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| Uint8Array | Encoded text. | | Uint8Array | Encoded text.|
**Example** **Example**
```js ```js
...@@ -274,15 +275,15 @@ Stores the UTF-8 encoded text. ...@@ -274,15 +275,15 @@ Stores the UTF-8 encoded text.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| input | string | Yes | String to encode. | | input | string | Yes| String to encode.|
| dest | Uint8Array | Yes | **Uint8Array** instance used to store the UTF-8 encoded text. | | dest | Uint8Array | Yes| **Uint8Array** instance used to store the UTF-8 encoded text.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| Uint8Array | Encoded text. | | Uint8Array | Encoded text.|
**Example** **Example**
```js ```js
...@@ -304,10 +305,10 @@ A constructor used to create a **RationalNumber** object. ...@@ -304,10 +305,10 @@ A constructor used to create a **RationalNumber** object.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| numerator | number | Yes | Numerator, which is an integer. | | numerator | number | Yes| Numerator, which is an integer.|
| denominator | number | Yes | Denominator, which is an integer. | | denominator | number | Yes| Denominator, which is an integer.|
**Example** **Example**
```js ```js
...@@ -324,14 +325,14 @@ Creates a **RationalNumber** object based on the given string. ...@@ -324,14 +325,14 @@ Creates a **RationalNumber** object based on the given string.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| rationalString | string | Yes | String used to create the **RationalNumber** object. | | rationalString | string | Yes| String used to create the **RationalNumber** object.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| object | **RationalNumber** object created. | | object | **RationalNumber** object created.|
**Example** **Example**
```js ```js
...@@ -349,17 +350,16 @@ Compares this **RationalNumber** object with a given object. ...@@ -349,17 +350,16 @@ Compares this **RationalNumber** object with a given object.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| another | RationalNumber | Yes | Object used to compare with this **RationalNumber** object. | | another | RationalNumber | Yes| Object used to compare with this **RationalNumber** object.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| number | Returns **0** if the two objects are equal; returns **1** if the given object is less than this object; return **-1** if the given object is greater than this object. | | number | Returns **0** if the two objects are equal; returns **1** if the given object is less than this object; return **-1** if the given object is greater than this object.|
**Example** **Example**
```js ```js
var rationalNumber = new util.RationalNumber(1,2); var rationalNumber = new util.RationalNumber(1,2);
var rational = rationalNumer.creatRationalFromString("3/4"); var rational = rationalNumer.creatRationalFromString("3/4");
...@@ -376,9 +376,9 @@ Obtains the value of this **RationalNumber** object as an integer or a floating- ...@@ -376,9 +376,9 @@ Obtains the value of this **RationalNumber** object as an integer or a floating-
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| number | An integer or a floating-point number. | | number | An integer or a floating-point number.|
**Example** **Example**
```js ```js
...@@ -396,14 +396,14 @@ Checks whether this **RationalNumber** object equals the given object. ...@@ -396,14 +396,14 @@ Checks whether this **RationalNumber** object equals the given object.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| object | Object | Yes | Object used to compare with this **RationalNumber** object. | | object | Object | Yes| Object used to compare with this **RationalNumber** object.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the two objects are equal; returns **false** otherwise. | | boolean | Returns **true** if the two objects are equal; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -422,15 +422,15 @@ Obtains the greatest common divisor of two specified integers. ...@@ -422,15 +422,15 @@ Obtains the greatest common divisor of two specified integers.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| number1 | number | Yes | The first integer used to get the greatest common divisor. | | number1 | number | Yes| The first integer used to get the greatest common divisor.|
| number2 | number | Yes | The second integer used to get the greatest common divisor. | | number2 | number | Yes| The second integer used to get the greatest common divisor.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| number | Greatest common divisor obtained. | | number | Greatest common divisor obtained.|
**Example** **Example**
```js ```js
...@@ -449,9 +449,9 @@ Obtains the numerator of this **RationalNumber** object. ...@@ -449,9 +449,9 @@ Obtains the numerator of this **RationalNumber** object.
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| number | Numerator of this **RationalNumber** object. | | number | Numerator of this **RationalNumber** object.|
**Example** **Example**
```js ```js
...@@ -469,9 +469,9 @@ Obtains the denominator of this **RationalNumber** object. ...@@ -469,9 +469,9 @@ Obtains the denominator of this **RationalNumber** object.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| number | Denominator of this **RationalNumber** object. | | number | Denominator of this **RationalNumber** object.|
**Example** **Example**
```js ```js
...@@ -482,16 +482,16 @@ Obtains the denominator of this **RationalNumber** object. ...@@ -482,16 +482,16 @@ Obtains the denominator of this **RationalNumber** object.
### isZero<sup>8+</sup> ### isZero<sup>8+</sup>
isZero​(): boolean isZero​():boolean
Checks whether this **RationalNumber** object is **0**. Checks whether this **RationalNumber** object is **0**.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the value of this **RationalNumber** object is **0**; returns **false** otherwise. | | boolean | Returns **true** if the value of this **RationalNumber** object is **0**; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -509,9 +509,9 @@ Checks whether this **RationalNumber** object is a Not a Number (NaN). ...@@ -509,9 +509,9 @@ Checks whether this **RationalNumber** object is a Not a Number (NaN).
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if this **RationalNumber** object is a NaN (the denominator and numerator are both **0**); returns **false** otherwise. | | boolean | Returns **true** if this **RationalNumber** object is a NaN (the denominator and numerator are both **0**); returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -522,16 +522,16 @@ Checks whether this **RationalNumber** object is a Not a Number (NaN). ...@@ -522,16 +522,16 @@ Checks whether this **RationalNumber** object is a Not a Number (NaN).
### isFinite<sup>8+</sup> ### isFinite<sup>8+</sup>
isFinite​(): boolean isFinite​():boolean
Checks whether this **RationalNumber** object represents a finite value. Checks whether this **RationalNumber** object represents a finite value.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if this **RationalNumber** object represents a finite value (the denominator is not **0**); returns **false** otherwise. | | boolean | Returns **true** if this **RationalNumber** object represents a finite value (the denominator is not **0**); returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -549,9 +549,9 @@ Obtains the string representation of this **RationalNumber** object. ...@@ -549,9 +549,9 @@ Obtains the string representation of this **RationalNumber** object.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| string | Returns **NaN** if the numerator and denominator of this object are both **0**; returns a string in Numerator/Denominator format otherwise, for example, **3/5**. | | string | Returns **NaN** if the numerator and denominator of this object are both **0**; returns a string in Numerator/Denominator format otherwise, for example, **3/5**.|
**Example** **Example**
```js ```js
...@@ -565,9 +565,9 @@ Obtains the string representation of this **RationalNumber** object. ...@@ -565,9 +565,9 @@ Obtains the string representation of this **RationalNumber** object.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
| Name | Type | Readable | Writable | Description | | Name| Type| Readable| Writable| Description|
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| length | number | Yes | No | Total number of values in this buffer. | | length | number | Yes| No| Total number of values in this buffer.|
**Example** **Example**
```js ```js
...@@ -587,9 +587,9 @@ A constructor used to create an **LruBuffer** instance. The default capacity of ...@@ -587,9 +587,9 @@ A constructor used to create an **LruBuffer** instance. The default capacity of
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| capacity | number | No | Capacity of the **LruBuffer** to create. | | capacity | number | No| Capacity of the **LruBuffer** to create.|
**Example** **Example**
```js ```js
...@@ -606,9 +606,9 @@ Changes the **LruBuffer** capacity. If the new capacity is less than or equal to ...@@ -606,9 +606,9 @@ Changes the **LruBuffer** capacity. If the new capacity is less than or equal to
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| newCapacity | number | Yes | New capacity of the **LruBuffer**. | | newCapacity | number | Yes| New capacity of the **LruBuffer**.|
**Example** **Example**
```js ```js
...@@ -626,9 +626,9 @@ Obtains the string representation of this **LruBuffer** object. ...@@ -626,9 +626,9 @@ Obtains the string representation of this **LruBuffer** object.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| string | String representation of this **LruBuffer** object. | | string | String representation of this **LruBuffer** object.|
**Example** **Example**
```js ```js
...@@ -649,9 +649,9 @@ Obtains the capacity of this buffer. ...@@ -649,9 +649,9 @@ Obtains the capacity of this buffer.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| number | Capacity of this buffer. | | number | Capacity of this buffer.|
**Example** **Example**
```js ```js
...@@ -686,9 +686,9 @@ Obtains the number of return values for **createDefault()**. ...@@ -686,9 +686,9 @@ Obtains the number of return values for **createDefault()**.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| number | Number of return values for **createDefault()**. | | number | Number of return values for **createDefault()**.|
**Example** **Example**
```js ```js
...@@ -707,9 +707,9 @@ Obtains the number of times that the queried values are mismatched. ...@@ -707,9 +707,9 @@ Obtains the number of times that the queried values are mismatched.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| number | Number of times that the queried values are mismatched. | | number | Number of times that the queried values are mismatched.|
**Example** **Example**
```js ```js
...@@ -729,9 +729,9 @@ Obtains the number of removals from this buffer. ...@@ -729,9 +729,9 @@ Obtains the number of removals from this buffer.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| number | Number of removals from the buffer. | | number | Number of removals from the buffer.|
**Example** **Example**
```js ```js
...@@ -752,9 +752,9 @@ Obtains the number of times that the queried values are matched. ...@@ -752,9 +752,9 @@ Obtains the number of times that the queried values are matched.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| number | Number of times that the queried values are matched. | | number | Number of times that the queried values are matched.|
**Example** **Example**
```js ```js
...@@ -774,9 +774,9 @@ Obtains the number of additions to this buffer. ...@@ -774,9 +774,9 @@ Obtains the number of additions to this buffer.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| number | Number of additions to the buffer. | | number | Number of additions to the buffer.|
**Example** **Example**
```js ```js
...@@ -795,9 +795,9 @@ Checks whether this buffer is empty. ...@@ -795,9 +795,9 @@ Checks whether this buffer is empty.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the buffer does not contain any value. | | boolean | Returns **true** if the buffer does not contain any value.|
**Example** **Example**
```js ```js
...@@ -816,14 +816,14 @@ Obtains the value of the specified key. ...@@ -816,14 +816,14 @@ Obtains the value of the specified key.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| key | K | Yes | Key based on which the value is queried. | | key | K | Yes| Key based on which the value is queried.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| V&nbsp;\ |&nbsp;undefind | Returns the value of the key if a match is found in the buffer; returns **undefined** otherwise. | | V \| undefind | Returns the value of the key if a match is found in the buffer; returns **undefined** otherwise.|
**Example** **Example**
```js ```js
...@@ -842,15 +842,15 @@ Adds a key-value pair to this buffer. ...@@ -842,15 +842,15 @@ Adds a key-value pair to this buffer.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| key | K | Yes | Key of the key-value pair to add. | | key | K | Yes| Key of the key-value pair to add.|
| value | V | Yes | Value of the key-value pair to add. | | value | V | Yes| Value of the key-value pair to add.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| V | Returns the existing value if the key already exists; returns the value added otherwise. If the key or value is null, an exception will be thrown. | | V | Returns the existing value if the key already exists; returns the value added otherwise. If the key or value is null, an exception will be thrown. |
**Example** **Example**
```js ```js
...@@ -868,9 +868,9 @@ Obtains all values in this buffer, listed from the most to the least recently ac ...@@ -868,9 +868,9 @@ Obtains all values in this buffer, listed from the most to the least recently ac
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| V&nbsp;[] | All values in the buffer, listed from the most to the least recently accessed. | | V [] | All values in the buffer, listed from the most to the least recently accessed.|
**Example** **Example**
```js ```js
...@@ -891,9 +891,9 @@ Obtains all keys in this buffer, listed from the most to the least recently acce ...@@ -891,9 +891,9 @@ Obtains all keys in this buffer, listed from the most to the least recently acce
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| K&nbsp;[] | All keys in the buffer, listed from the most to the least recently accessed. | | K [] | All keys in the buffer, listed from the most to the least recently accessed.|
**Example** **Example**
```js ```js
...@@ -912,14 +912,14 @@ Removes the specified key and its value from this buffer. ...@@ -912,14 +912,14 @@ Removes the specified key and its value from this buffer.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| key | K | Yes | Key to remove. | | key | K | Yes| Key to remove.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| V&nbsp;\ |&nbsp;undefind | Returns an **Optional** object containing the removed key-value pair if the key exists in the buffer; returns an empty **Optional** object otherwise. If the key is null, an exception will be thrown. | | V \| undefind | Returns an **Optional** object containing the removed key-value pair if the key exists in the buffer; returns an empty **Optional** object otherwise. If the key is null, an exception will be thrown.|
**Example** **Example**
```js ```js
...@@ -938,12 +938,12 @@ Performs subsequent operations after a value is removed. ...@@ -938,12 +938,12 @@ Performs subsequent operations after a value is removed.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| isEvict | boolean | No | Whether the buffer capacity is insufficient. If the value is **true**, this method is called due to insufficient capacity. | | isEvict | boolean | No| Whether the buffer capacity is insufficient. If the value is **true**, this method is called due to insufficient capacity.|
| key | K | Yes | Key removed. | | key | K | Yes| Key removed.|
| value | V | Yes | Value removed. | | value | V | Yes| Value removed.|
| newValue | V | No | New value for the key if the **put()** method is called and the key to be added already exists. In other cases, this parameter is left blank. | | newValue | V | No| New value for the key if the **put()** method is called and the key to be added already exists. In other cases, this parameter is left blank.|
**Example** **Example**
```js ```js
...@@ -983,14 +983,14 @@ Checks whether this buffer contains the specified key. ...@@ -983,14 +983,14 @@ Checks whether this buffer contains the specified key.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| key | K | Yes | Key to check. | | key | K | Yes| Key to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the buffer contains the specified key; returns **false** otherwise. | | boolean | Returns **true** if the buffer contains the specified key; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -1009,14 +1009,14 @@ Creates a value if the value of the specified key is not available. ...@@ -1009,14 +1009,14 @@ Creates a value if the value of the specified key is not available.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| key | K | Yes | Key of which the value is missing. | | key | K | Yes| Key of which the value is missing.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| V | Value of the key. | | V | Value of the key.|
**Example** **Example**
```js ```js
...@@ -1034,9 +1034,9 @@ Obtains a new iterator object that contains all key-value pairs in this object. ...@@ -1034,9 +1034,9 @@ Obtains a new iterator object that contains all key-value pairs in this object.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| [K,&nbsp;V] | Iterable array. | | [K, V] | Iterable array.|
**Example** **Example**
```js ```js
...@@ -1055,9 +1055,9 @@ Obtains a two-dimensional array in key-value pairs. ...@@ -1055,9 +1055,9 @@ Obtains a two-dimensional array in key-value pairs.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| [K,&nbsp;V] | Two-dimensional array in key-value pairs. | | [K, V] | Two-dimensional array in key-value pairs.|
**Example** **Example**
```js ```js
...@@ -1090,6 +1090,8 @@ Example ...@@ -1090,6 +1090,8 @@ Example
```js ```js
class Temperature{ class Temperature{
constructor(value){ constructor(value){
// If TS is used for development, add the following code:
// private readonly _temp: Temperature;
this._temp = value; this._temp = value;
} }
comapreTo(value){ comapreTo(value){
...@@ -1114,10 +1116,10 @@ A constructor used to create a **Scope** object with the specified upper and low ...@@ -1114,10 +1116,10 @@ A constructor used to create a **Scope** object with the specified upper and low
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| lowerObj | [ScopeType](#scopetype8) | Yes | Lower limit of the **Scope** object. | | lowerObj | [ScopeType](#scopetype8) | Yes| Lower limit of the **Scope** object.|
| upperObj | [ScopeType](#scopetype8) | Yes | Upper limit of the **Scope** object. | | upperObj | [ScopeType](#scopetype8) | Yes| Upper limit of the **Scope** object.|
**Example** **Example**
```js ```js
...@@ -1136,9 +1138,9 @@ Obtains a string representation that contains this **Scope**. ...@@ -1136,9 +1138,9 @@ Obtains a string representation that contains this **Scope**.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| string | String representation containing the **Scope**. | | string | String representation containing the **Scope**.|
**Example** **Example**
```js ```js
...@@ -1158,14 +1160,14 @@ Obtains the intersection of this **Scope** and the given **Scope**. ...@@ -1158,14 +1160,14 @@ Obtains the intersection of this **Scope** and the given **Scope**.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| range | [Scope](#scope8) | Yes | **Scope** specified. | | range | [Scope](#scope8) | Yes| **Scope** specified.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| [Scope](#scope8) | Intersection of this **Scope** and the given **Scope**. | | [Scope](#scope8) | Intersection of this **Scope** and the given **Scope**.|
**Example** **Example**
```js ```js
...@@ -1181,22 +1183,22 @@ Obtains the intersection of this **Scope** and the given **Scope**. ...@@ -1181,22 +1183,22 @@ Obtains the intersection of this **Scope** and the given **Scope**.
### intersect<sup>8+</sup> ### intersect<sup>8+</sup>
intersect(lowerObj: ScopeType,upperObj: ScopeType): Scope intersect(lowerObj:ScopeType,upperObj:ScopeType):Scope
Obtains the intersection of this **Scope** and the given lower and upper limits. Obtains the intersection of this **Scope** and the given lower and upper limits.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| lowerObj | [ScopeType](#scopetype8) | Yes | Lower limit. | | lowerObj | [ScopeType](#scopetype8) | Yes| Lower limit.|
| upperObj | [ScopeType](#scopetype8) | Yes | Upper limit. | | upperObj | [ScopeType](#scopetype8) | Yes| Upper limit.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| [Scope](#scope8) | Intersection of this **Scope** and the given lower and upper limits. | | [Scope](#scope8) | Intersection of this **Scope** and the given lower and upper limits.|
**Example** **Example**
```js ```js
...@@ -1219,9 +1221,9 @@ Obtains the upper limit of this **Scope**. ...@@ -1219,9 +1221,9 @@ Obtains the upper limit of this **Scope**.
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| [ScopeType](#scopetype8) | Upper limit of this **Scope**. | | [ScopeType](#scopetype8) | Upper limit of this **Scope**.|
**Example** **Example**
```js ```js
...@@ -1241,9 +1243,9 @@ Obtains the lower limit of this **Scope**. ...@@ -1241,9 +1243,9 @@ Obtains the lower limit of this **Scope**.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| [ScopeType](#scopetype8) | Lower limit of this **Scope**. | | [ScopeType](#scopetype8) | Lower limit of this **Scope**.|
**Example** **Example**
```js ```js
...@@ -1263,17 +1265,18 @@ Obtains the union set of this **Scope** and the given lower and upper limits. ...@@ -1263,17 +1265,18 @@ Obtains the union set of this **Scope** and the given lower and upper limits.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| lowerObj | [ScopeType](#scopetype8) | Yes | Lower limit. | | lowerObj | [ScopeType](#scopetype8) | Yes| Lower limit.|
| upperObj | [ScopeType](#scopetype8) | Yes | Upper limit. | | upperObj | [ScopeType](#scopetype8) | Yes| Upper limit.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| [Scope](#scope8) | Union set of this **Scope** and the given lower and upper limits. | | [Scope](#scope8) | Union set of this **Scope** and the given lower and upper limits.|
**Example** **Example**
```js ```js
var tempLower = new Temperature(30); var tempLower = new Temperature(30);
var tempUpper = new Temperature(40); var tempUpper = new Temperature(40);
...@@ -1286,21 +1289,21 @@ Obtains the union set of this **Scope** and the given lower and upper limits. ...@@ -1286,21 +1289,21 @@ Obtains the union set of this **Scope** and the given lower and upper limits.
### expand<sup>8+</sup> ### expand<sup>8+</sup>
expand(range:Scope):Scope expand(range: Scope): Scope
Obtains the union set of this **Scope** and the given **Scope**. Obtains the union set of this **Scope** and the given **Scope**.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| range | [Scope](#scope8) | Yes | **Scope** specified. | | range | [Scope](#scope8) | Yes| **Scope** specified.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| [Scope](#scope8) | Union set of this **Scope** and the given **Scope**. | | [Scope](#scope8) | Union set of this **Scope** and the given **Scope**.|
**Example** **Example**
```js ```js
...@@ -1323,14 +1326,14 @@ Obtains the union set of this **Scope** and the given value. ...@@ -1323,14 +1326,14 @@ Obtains the union set of this **Scope** and the given value.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | [ScopeType](#scopetype8) | Yes | Value specified. | | value | [ScopeType](#scopetype8) | Yes| Value specified.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| [Scope](#scope8) | Union set of this **Scope** and the given value. | | [Scope](#scope8) | Union set of this **Scope** and the given value.|
**Example** **Example**
```js ```js
...@@ -1351,14 +1354,14 @@ Checks whether a value is within this **Scope**. ...@@ -1351,14 +1354,14 @@ Checks whether a value is within this **Scope**.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | [ScopeType](#scopetype8) | Yes | Value specified. | | value | [ScopeType](#scopetype8) | Yes| Value specified.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the value is within this **Scope**; returns **false** otherwise. | | boolean | Returns **true** if the value is within this **Scope**; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -1379,14 +1382,14 @@ Checks whether a range is within this **Scope**. ...@@ -1379,14 +1382,14 @@ Checks whether a range is within this **Scope**.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| range | [Scope](#scope8) | Yes | **Scope** specified. | | range | [Scope](#scope8) | Yes| **Scope** specified.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the range is within this **Scope**; returns **false** otherwise. | | boolean | Returns **true** if the range is within this **Scope**; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -1409,14 +1412,14 @@ Limits a value to this **Scope**. ...@@ -1409,14 +1412,14 @@ Limits a value to this **Scope**.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | [ScopeType](#scopetype8) | Yes | Value specified. | | value | [ScopeType](#scopetype8) | Yes| Value specified.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| [ScopeType](#scopetype8) | Returns **lowerObj** if the specified value is less than the lower limit; returns **upperObj** if the specified value is greater than the upper limit; returns the specified value if it is within this **Scope**. | | [ScopeType](#scopetype8) | Returns **lowerObj** if the specified value is less than the lower limit; returns **upperObj** if the specified value is greater than the upper limit; returns the specified value if it is within this **Scope**.|
**Example** **Example**
```js ```js
...@@ -1454,14 +1457,14 @@ Encodes the input content. ...@@ -1454,14 +1457,14 @@ Encodes the input content.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| src | Uint8Array | Yes | Uint8Array to encode. | | src | Uint8Array | Yes| Uint8Array to encode.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| Uint8Array | Uint8Array encoded. | | Uint8Array | Uint8Array encoded.|
**Example** **Example**
```js ```js
...@@ -1480,14 +1483,14 @@ Encodes the input content. ...@@ -1480,14 +1483,14 @@ Encodes the input content.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| src | Uint8Array | Yes | Uint8Array to encode. | | src | Uint8Array | Yes| Uint8Array to encode.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| string | String encoded from the Uint8Array. | | string | String encoded from the Uint8Array.|
**Example** **Example**
```js ```js
...@@ -1506,14 +1509,14 @@ Decodes the input content. ...@@ -1506,14 +1509,14 @@ Decodes the input content.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| src | Uint8Array&nbsp;\ |&nbsp;string | Yes | Uint8Array or string to decode. | | src | Uint8Array \| string | Yes| Uint8Array or string to decode.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| Uint8Array | Uint8Array decoded. | | Uint8Array | Uint8Array decoded.|
**Example** **Example**
```js ```js
...@@ -1532,14 +1535,14 @@ Encodes the input content asynchronously. ...@@ -1532,14 +1535,14 @@ Encodes the input content asynchronously.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| src | Uint8Array | Yes | Uint8Array to encode asynchronously. | | src | Uint8Array | Yes| Uint8Array to encode asynchronously.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| Promise&lt;Uint8Array&gt; | Uint8Array obtained after asynchronous encoding. | | Promise&lt;Uint8Array&gt; | Uint8Array obtained after asynchronous encoding.|
**Example** **Example**
```js ```js
...@@ -1563,14 +1566,14 @@ Encodes the input content asynchronously. ...@@ -1563,14 +1566,14 @@ Encodes the input content asynchronously.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| src | Uint8Array | Yes | Uint8Array to encode asynchronously. | | src | Uint8Array | Yes| Uint8Array to encode asynchronously.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| Promise&lt;string&gt; | String obtained after asynchronous encoding. | | Promise&lt;string&gt; | String obtained after asynchronous encoding.|
**Example** **Example**
```js ```js
...@@ -1591,14 +1594,14 @@ Decodes the input content asynchronously. ...@@ -1591,14 +1594,14 @@ Decodes the input content asynchronously.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| src | Uint8Array&nbsp;\ |&nbsp;string | Yes | Uint8Array or string to decode asynchronously. | | src | Uint8Array \| string | Yes| Uint8Array or string to decode asynchronously.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| Promise&lt;Uint8Array&gt; | Uint8Array obtained after asynchronous decoding. | | Promise&lt;Uint8Array&gt; | Uint8Array obtained after asynchronous decoding.|
**Example** **Example**
```js ```js
...@@ -1620,7 +1623,7 @@ Decodes the input content asynchronously. ...@@ -1620,7 +1623,7 @@ Decodes the input content asynchronously.
constructor() constructor()
A constructor used to create a **types** object. A constructor used to create a **Types** object.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
...@@ -1639,14 +1642,14 @@ Checks whether the input value is of the **ArrayBuffer** type. ...@@ -1639,14 +1642,14 @@ Checks whether the input value is of the **ArrayBuffer** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **ArrayBuffer** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **ArrayBuffer** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -1666,14 +1669,14 @@ Checks whether the input value is of the **ArrayBufferView** type. ...@@ -1666,14 +1669,14 @@ Checks whether the input value is of the **ArrayBufferView** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **ArrayBufferView** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **ArrayBufferView** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -1691,14 +1694,14 @@ Checks whether the input value is of the **arguments** type. ...@@ -1691,14 +1694,14 @@ Checks whether the input value is of the **arguments** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **arguments** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **arguments** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -1719,14 +1722,14 @@ Checks whether the input value is of the **ArrayBuffer** type. ...@@ -1719,14 +1722,14 @@ Checks whether the input value is of the **ArrayBuffer** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **ArrayBuffer** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **ArrayBuffer** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -1744,14 +1747,14 @@ Checks whether the input value is an asynchronous function. ...@@ -1744,14 +1747,14 @@ Checks whether the input value is an asynchronous function.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is an asynchronous function; returns **false** otherwise. | | boolean | Returns **true** if the input value is an asynchronous function; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -1769,14 +1772,14 @@ Checks whether the input value is of the **Boolean** type. ...@@ -1769,14 +1772,14 @@ Checks whether the input value is of the **Boolean** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **Boolean** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **Boolean** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -1794,14 +1797,14 @@ Checks whether the input value is of the **Boolean**, **Number**, **String**, or ...@@ -1794,14 +1797,14 @@ Checks whether the input value is of the **Boolean**, **Number**, **String**, or
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **Boolean**, **Number**, **String**, or **Symbol** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **Boolean**, **Number**, **String**, or **Symbol** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -1819,14 +1822,14 @@ Checks whether the input value is of the **DataView** type. ...@@ -1819,14 +1822,14 @@ Checks whether the input value is of the **DataView** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **DataView** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **DataView** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -1845,14 +1848,14 @@ Checks whether the input value is of the **Date** type. ...@@ -1845,14 +1848,14 @@ Checks whether the input value is of the **Date** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **Date** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **Date** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -1870,14 +1873,14 @@ Checks whether the input value is of the **native external** type. ...@@ -1870,14 +1873,14 @@ Checks whether the input value is of the **native external** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **native external** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **native external** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -1896,14 +1899,14 @@ Checks whether the input value is of the **Float32Array** type. ...@@ -1896,14 +1899,14 @@ Checks whether the input value is of the **Float32Array** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **Float32Array** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **Float32Array** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -1921,14 +1924,14 @@ Checks whether the input value is of the **Float64Array** type. ...@@ -1921,14 +1924,14 @@ Checks whether the input value is of the **Float64Array** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **Float64Array** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **Float64Array** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -1946,14 +1949,14 @@ Checks whether the input value is a generator function. ...@@ -1946,14 +1949,14 @@ Checks whether the input value is a generator function.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is a generator function; returns **false** otherwise. | | boolean | Returns **true** if the input value is a generator function; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -1971,14 +1974,14 @@ Checks whether the input value is a generator object. ...@@ -1971,14 +1974,14 @@ Checks whether the input value is a generator object.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is a generator object; returns **false** otherwise. | | boolean | Returns **true** if the input value is a generator object; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -1998,14 +2001,14 @@ Checks whether the input value is of the **Int8Array** type. ...@@ -1998,14 +2001,14 @@ Checks whether the input value is of the **Int8Array** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **Int8Array** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **Int8Array** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -2023,14 +2026,14 @@ Checks whether the input value is of the **Int16Array** type. ...@@ -2023,14 +2026,14 @@ Checks whether the input value is of the **Int16Array** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **Int16Array** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **Int16Array** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -2048,14 +2051,14 @@ Checks whether the input value is of the **Int32Array** type. ...@@ -2048,14 +2051,14 @@ Checks whether the input value is of the **Int32Array** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **Int32Array** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **Int32Array** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -2073,14 +2076,14 @@ Checks whether the input value is of the **Map** type. ...@@ -2073,14 +2076,14 @@ Checks whether the input value is of the **Map** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **Map** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **Map** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -2098,14 +2101,14 @@ Checks whether the input value is of the **MapIterator** type. ...@@ -2098,14 +2101,14 @@ Checks whether the input value is of the **MapIterator** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **MapIterator** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **MapIterator** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -2124,14 +2127,14 @@ Checks whether the input value is of the **Error** type. ...@@ -2124,14 +2127,14 @@ Checks whether the input value is of the **Error** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **Error** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **Error** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -2149,14 +2152,14 @@ Checks whether the input value is a number object. ...@@ -2149,14 +2152,14 @@ Checks whether the input value is a number object.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is a number object; returns **false** otherwise. | | boolean | Returns **true** if the input value is a number object; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -2174,14 +2177,14 @@ Checks whether the input value is a promise. ...@@ -2174,14 +2177,14 @@ Checks whether the input value is a promise.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is a promise; returns **false** otherwise. | | boolean | Returns **true** if the input value is a promise; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -2199,14 +2202,14 @@ Checks whether the input value is a proxy. ...@@ -2199,14 +2202,14 @@ Checks whether the input value is a proxy.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is a proxy; returns **false** otherwise. | | boolean | Returns **true** if the input value is a proxy; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -2226,14 +2229,14 @@ Checks whether the input value is of the **RegExp** type. ...@@ -2226,14 +2229,14 @@ Checks whether the input value is of the **RegExp** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **RegExp** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **RegExp** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -2251,14 +2254,14 @@ Checks whether the input value is of the **Set** type. ...@@ -2251,14 +2254,14 @@ Checks whether the input value is of the **Set** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **Set** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **Set** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -2276,14 +2279,14 @@ Checks whether the input value is of the **SetIterator** type. ...@@ -2276,14 +2279,14 @@ Checks whether the input value is of the **SetIterator** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **SetIterator** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **SetIterator** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -2302,14 +2305,14 @@ Checks whether the input value is a string object. ...@@ -2302,14 +2305,14 @@ Checks whether the input value is a string object.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is a string object; returns **false** otherwise. | | boolean | Returns **true** if the input value is a string object; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -2327,14 +2330,14 @@ Checks whether the input value is a symbol object. ...@@ -2327,14 +2330,14 @@ Checks whether the input value is a symbol object.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is a symbol object; returns **false** otherwise. | | boolean | Returns **true** if the input value is a symbol object; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -2355,14 +2358,14 @@ Checks whether the input value is of the **TypedArray** type. ...@@ -2355,14 +2358,14 @@ Checks whether the input value is of the **TypedArray** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **TypedArray** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **TypedArray** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -2380,14 +2383,14 @@ Checks whether the input value is of the **Uint8Array** type. ...@@ -2380,14 +2383,14 @@ Checks whether the input value is of the **Uint8Array** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **Uint8Array** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **Uint8Array** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -2405,14 +2408,14 @@ Checks whether the input value is of the **Uint8ClampedArray** type. ...@@ -2405,14 +2408,14 @@ Checks whether the input value is of the **Uint8ClampedArray** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **Uint8ClampedArray** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **Uint8ClampedArray** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -2430,14 +2433,14 @@ Checks whether the input value is of the **Uint16Array** type. ...@@ -2430,14 +2433,14 @@ Checks whether the input value is of the **Uint16Array** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **Uint16Array** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **Uint16Array** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -2455,14 +2458,14 @@ Checks whether the input value is of the **Uint32Array** type. ...@@ -2455,14 +2458,14 @@ Checks whether the input value is of the **Uint32Array** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **Uint32Array** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **Uint32Array** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -2480,14 +2483,14 @@ Checks whether the input value is of the **WeakMap** type. ...@@ -2480,14 +2483,14 @@ Checks whether the input value is of the **WeakMap** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **WeakMap** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **WeakMap** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
...@@ -2505,14 +2508,14 @@ Checks whether the input value is of the **WeakSet** type. ...@@ -2505,14 +2508,14 @@ Checks whether the input value is of the **WeakSet** type.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | Object | Yes | Object to check. | | value | Object | Yes| Object to check.|
**Return value** **Return value**
| Type | Description | | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the input value is of the **WeakSet** type; returns **false** otherwise. | | boolean | Returns **true** if the input value is of the **WeakSet** type; returns **false** otherwise.|
**Example** **Example**
```js ```js
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册