UNPKG

etsed

Version:

Expose GC at runtime without access to command node flags in command line for TS apps

12 lines (8 loc) 195 B
import v8 from "v8" import vm from "vm" v8.setFlagsFromString('--expose_gc'); /** * Starts the garbage collector */ export const gc: () => void = vm.runInNewContext('gc'); export default gc