Mayank Agarwal has Published 380 Articles

Node.js – util.types.isArgumentsObject() Method

Mayank Agarwal

Mayank Agarwal

Updated on 17-Aug-2021 12:23:49

46 Views

The util.types.isArgumentsObject() method checks whether the passed value is an arguments object or not. If the above condition is satisfied, it returns True, else False.Syntaxutil.types.isArgumentsObject( value )Parametersvalue − This input parameter takes input for the required parameter and checks if it's an arguments object or not.It returns True or False based ... Read More

Node.js – Reading Path Parameters from URL

Mayank Agarwal

Mayank Agarwal

Updated on 17-Aug-2021 12:22:58

2K+ Views

We can embed path variables into the URL and then use these path parameters to retrieve info from resources. These API endpoints have different values with respect to different values passed inside them.Example 1Create a file named "index.js" and copy the following code snippet. After creating the file, use the ... Read More

Node.js – v8.serializer.writeUint32() Method

Mayank Agarwal

Mayank Agarwal

Updated on 17-Aug-2021 12:22:18

84 Views

The v8.serializer.writeUint32() method is used for writing a raw 32-bit unsigned integer. This function is mainly used inside the custom serializer._writeHostObject().Syntaxv8.serializer.writeUint32(value)Parametersvalue − This parameter takes input for the 32-bit integer that will be written inside the internal buffer.The function does not return anything, instead it writes the passed value to the ... Read More

Node.js – util.types.isGeneratorObject() Method

Mayank Agarwal

Mayank Agarwal

Updated on 17-Aug-2021 12:21:40

53 Views

The util.types.isGeneratorObject() method checks whether the passed value is a built-in generator object or not. If the above condition is satisfied, it returns True, else False. The return value may differ from the original source code if a transpilation tool is used.Syntaxutil.types.isGeneratorObject(value)Parametersvalue − This input value takes input for the required ... Read More

Node.js – util.types.isDataView() Method

Mayank Agarwal

Mayank Agarwal

Updated on 17-Aug-2021 12:20:37

56 Views

The util.types.isDataView() method checks whether the passed value is a built-in DataView instance or not. If the above condition is satisfied, it returns True, else False.Syntaxutil.types.isDataView(value)Parametersvalue − This input value takes input for the required parameter and checks if it's a Data View instance or not.It returns True or False based ... Read More

Node.js – util.types.isBigInt64Array() Method

Mayank Agarwal

Mayank Agarwal

Updated on 17-Aug-2021 12:20:14

50 Views

The util.types.isBigInt64Array() method checks whether the passed value is a BigInt64Array instance or not. If the above condition is satisfied, it returns True, else False.Syntaxutil.types.isBigInt64Array(value)Parametersvalue − This input value takes input for the required parameter and checks if it's a BigInt64 array instance or not.It returns True or False based upon ... Read More

Node.js – util.isDeepStrictEqual() Method

Mayank Agarwal

Mayank Agarwal

Updated on 17-Aug-2021 12:19:35

570 Views

The util.isDeepStrictEqual() method as the name suggests, is used for checking whether the two values are deep strict equal or not. If both the values are deep strict equal, true is returned else it returns false.Syntaxutil.isDeepStrictEqual(val1, val2)Parametersval1 & val2 – Both the input parameters can accept class, function, object or a JavaScript primitive ... Read More

Node.js – forEach() Method

Mayank Agarwal

Mayank Agarwal

Updated on 17-Aug-2021 12:18:55

4K+ Views

The forEach() method in Node.js is used for iterating over a set of given array items. One can iterate over all the values of the array one-by-one using the forEach array loop.SyntaxarrayName.forEach(function)Parametersfunction − The function takes input for the method that will be executed.arrayName − Array that will be iterated.Example 1Create a ... Read More

Node.js – hmac.update() Method

Mayank Agarwal

Mayank Agarwal

Updated on 17-Aug-2021 12:18:14

481 Views

The Hmac class is one of the many utility classes that is used for creating the cryptographic HMAC digests. The Hmac.update() method is used for updating the Hmac content with the data passed. If encoding is not provided and the data is in string format, then the default encoding 'utf8' ... Read More

Node.js – util.deprecate() method

Mayank Agarwal

Mayank Agarwal

Updated on 17-Aug-2021 12:12:43

262 Views

The util.deprecate() method wraps fn (that may be a function or class) in such a way that it is marketed as a deprecated method. The util.deprecate() method returns a function that emits a DeprecationWarning. This warning is printed to the stderr when the function is called the first time. The ... Read More

Advertisements