node/benchmark/fixtures/require-cachable.js
Joyee Cheung e1d55a0cbc
src: port bootstrap/cache.js to C++
This allows us to query the categories of modules in C++
so we can implement the code cache generator in C++ that
does not depend on a Node.js binary.

PR-URL: https://github.com/nodejs/node/pull/27046
Refs: https://github.com/nodejs/node/issues/21563
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2019-04-04 11:16:10 +08:00

10 lines
215 B
JavaScript

'use strict';
const { internalBinding } = require('internal/test/binding');
const {
moduleCategories: { canBeRequired }
} = internalBinding('native_module');
for (const key of canBeRequired) {
require(key);
}