The v8 module exposes APIs that are specific to the version of V8 built into the Node.js binary.

Note: The APIs and implementation are subject to change at any time.

Static methods

staticgetHeapSpaceStatistics():Array<V8HeapSpaceStatistics>

Returns statistics about the V8 heap spaces, i.e. the segments which make up the V8 heap. Neither the ordering of heap spaces, nor the availability of a heap space can be guaranteed as the statistics are provided via the V8 GetHeapSpaceStatistics function and may change from one V8 version to the next.

staticsetFlagsFromString(string:String):Void

This method can be used to programmatically set V8 command line flags. This method should be used with care. Changing settings after the VM has started may result in unpredictable behavior, including crashes and data loss; or it may simply do nothing.

The V8 options available for a version of Node.js may be determined by running node --v8-options.