'use strict';

const fs = require("fs");

if (fs.existsSync('./build/Release/cppmap.node')) {
    module.exports = require('./build/Release/cppmap').WeakValueMap;
} else if (fs.existsSync('./build/Debug/cppmap.node')) {
    console.log("weak-value-map loaded debug build");
    module.exports = require('./build/Debug/cppmap').WeakValueMap;
} else {
    console.error("weak-value-map not built!");
    process.exit(1);
}

@@ -31,37 +31,86 @@
 ire(
-%22fs%22);%0A%0Aif (fs.existsSync('./
+'fs');%0Aconst path = require('path');%0A%0Aif (fs.existsSync(path.join(__dirname, '
 buil
@@ -129,24 +129,25 @@
 pmap.node'))
+)
  %7B%0A    modul
@@ -231,19 +231,38 @@
 stsSync(
-'./
+path.join(__dirname, '
 build/De
@@ -279,16 +279,17 @@
 .node'))
+)
  %7B%0A    c

Fix bug introduced in a353681