tools/node_bootstrap.js
function bootstrap(lovefieldBinary) {
  // Setting "window" to be Node's global context.
  global.window = global;

  // Setting "self" to be Node's global context. This must be placed after
  // global.window.
  global.self = global;

  // Setting "document" to a dummy object, even though it is not actually used,
  // because it results in a runtime error when using lovefield.min.js.
  global.document = {};

  vmMod.runInThisContext(fsMod.readFileSync(lovefieldBinary), lovefieldBinary);
}
function bootstrap(lovefieldBinary) {
  // Setting "window" to be Node's global context.
  global.window = global;

  // Setting "self" to be Node's global context. This must be placed after
  // global.window.
  global.self = global;

  // Setting "document" to a dummy object, even though it is not actually used,
  // because it results in a runtime error when using lovefield.min.js.
  global.document = {};

  vmMod.runInThisContext(fsMod.readFileSync(lovefieldBinary), lovefieldBinary);
}
function bootstrap ( lovefieldBinary ) { // Setting "window" to be Node's global context. global . window = global ; // Setting "self" to be Node's global context. This must be placed after // global.window. global . self = global ; // Setting "document" to a dummy object, even though it is not actually used, // because it results in a runtime error when using lovefield.min.js. global . document = { } ; vmMod . runInThisContext ( fsMod . readFileSync ( lovefieldBinary ) , lovefieldBinary ) ; }
Bootstraps a lovefield binary such that is runnable in nodejs.
@param {string} lovefieldBinary The aboslute path of the binary file.
Bootstraps a lovefield binary such that is runnable in nodejs .