src/nodejs/jsv8

    Dark Mode
Search:
Group by:

Example:

import src/nodejs/jsv8
requireV8()
doAssert cachedDataVersionTag() is cint
# takeCoverage()
# stopCoverage()
echo writeHeapSnapshot("file.txt".cstring)

Procs

func cachedDataVersionTag(): cint {.importjs: "v8.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/v8.html#v8_v8_cacheddataversiontag
func getHeapCodeStatistics(): JsObject {.importjs: "v8.$1()", ...raises: [],
    tags: [].}
https://nodejs.org/api/v8.html#v8_v8_getheapcodestatistics
func getHeapSpaceStatistics(): JsObject {.importjs: "v8.$1()", ...raises: [],
    tags: [].}
https://nodejs.org/api/v8.html#v8_v8_getheapspacestatistics
func getHeapStatistics(): JsObject {.importjs: "v8.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/v8.html#v8_v8_getheapstatistics
func importV8() {.importjs: "import * as v8 from \'v8\'@", ...raises: [], tags: [].}
Alias for import * as module_name from 'module_name';. Must be called once before using the module
func requireV8() {.importjs: "const v8 = require(\'v8\')@", ...raises: [], tags: [].}
Alias for const module_name = require('module_name');. Must be called once before using the module
func setFlagsFromString(flags: cstring) {.importjs: "v8.$1()", ...raises: [],
    tags: [].}
https://nodejs.org/api/v8.html#v8_v8_setflagsfromstring_flags
func stopCoverage() {.importjs: "v8.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/v8.html#v8_v8_stopcoverage
func takeCoverage() {.importjs: "v8.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/v8.html#v8_v8_takecoverage
func writeHeapSnapshot(filename: cstring): cstring {.importjs: "v8.$1(#)",
    ...raises: [], tags: [].}
https://nodejs.org/api/v8.html#v8_v8_writeheapsnapshot_filename