v8-profiler-n-api
Version:
node bindings for the v8 profiler
17 lines (12 loc) • 428 B
JavaScript
;
const nodeVersionLessThan = require('./utils').nodeVersionLessThan;
let binding;
if (nodeVersionLessThan(12)) {
binding = require('../build/Release/profiler.node');
} else {
const path = require('path');
const binary = require('@mapbox/node-pre-gyp');
const bindingPath = binary.find(path.resolve(path.join(__dirname, '../package.json')));
binding = require(bindingPath);
}
module.exports = binding;