Mayank Agarwal has Published 380 Articles

Node.js – v8.getHeapStatistics() Method

Mayank Agarwal

Mayank Agarwal

Updated on 18-Aug-2021 09:22:25

777 Views

The v8.getHeapStatistics() method returns the statistics about a heap. The getHeapStatistics() method is a part of the v8 module that returns the details about the heap and size of the v8. The getHeapSpaceStatistics() gives stats based upon the spaces in a system, whereas the getHeapStatistics() method gives stats about the ... Read More

Setting the font color & style of the console in Node.js

Mayank Agarwal

Mayank Agarwal

Updated on 18-Aug-2021 09:20:38

718 Views

You can use the chalk module to customize the statements printed on the console.By using it, one can change the text font-color to any color. One can also change the font-style to Bold, Italic or Underlined. Also, you can highlight the printed text.Syntaxnpm install chalkExample 1Create a file "color.js" and ... Read More

Determining the User IP Address in Node

Mayank Agarwal

Mayank Agarwal

Updated on 18-Aug-2021 09:18:27

387 Views

Node.js is a completely open source technology that runs on JavaScript runtime environment. When the users want to access a website or link, they connect with the link using their system IP. We can use the dns.lookup() method in Node to find the IP address of the current user.Syntaxdns.lookup(hostname, [options], ... Read More

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

Mayank Agarwal

Mayank Agarwal

Updated on 18-Aug-2021 09:05:45

39 Views

The util.types.isUint16Array() method checks whether the passed value is a builtin Uint16Array instance or not. If the above condition is satisfied, it returns True, else False.Syntaxutil.types.isUint16Array(value)ParametersIt takes a single parameter −value − This input value takes input for the required parameter and checks if it's a Uint16Array instance or not.It ... Read More

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

Mayank Agarwal

Mayank Agarwal

Updated on 18-Aug-2021 09:03:01

85 Views

The util.types.isNativeError() method checks whether the passed value is a built-in error type or not. If the above condition is satisfied, it returns True, else False. The error can be of any type.Syntaxutil.types.isNativeError(value)ParametersIt takes a single parameter −value − This input value takes input for the required parameter and checks ... Read More

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

Mayank Agarwal

Mayank Agarwal

Updated on 18-Aug-2021 08:57:53

41 Views

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

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

Mayank Agarwal

Mayank Agarwal

Updated on 18-Aug-2021 08:54:57

49 Views

The util.types.isAnyArrayBuffer() checks whether the passed value is an ArrayBuffer or a SharedArrayBuffer instance. It returns True if the above condition holds, else False.Syntaxutil.types.isAnyArrayBuffer(value)ParametersIt takes a single parameter −value − This input parameter takes input for the required datatype and checks if it's an ArrayBuffer or SharedArrayBuffer instance.It returns True ... Read More

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

Mayank Agarwal

Mayank Agarwal

Updated on 18-Aug-2021 08:51:07

39 Views

The util.types.isFloat32Array() method checks whether the passed value is a builtin Float32Array instance or not. If the above condition is satisfied, it returns True, else False.Syntaxutil.types.isFloat32Array(value)ParametersIt takes a single parameter −value − This input value takes input for the required parameter and checks if it's a Float32-Array instance or not.It ... Read More

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

Mayank Agarwal

Mayank Agarwal

Updated on 18-Aug-2021 08:45:58

461 Views

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

Node.js – util.getSystemErrorName() Method

Mayank Agarwal

Mayank Agarwal

Updated on 18-Aug-2021 08:40:25

60 Views

The util.getSystemErrorName() method is used for returning the string name of the numeric error code that is returned from the Node.js API. There is a mapping between the error codes and error names which is platform-dependent.Syntaxutil.getSystemErrorName(err)ParametersIt takes a single parameter −err −This parameter takes input as a numeric value that ... Read More

Advertisements