You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
407 B

var bindings
try {
bindings = require('../build/Release/weakref.node')
} catch (e) {
if (e.code === 'MODULE_NOT_FOUND') {
bindings = require('../build/Debug/weakref.node')
} else {
throw e
}
}
module.exports = bindings.create
// backwards-compat with node-weakref
bindings.weaken = bindings.create
Object.keys(bindings).forEach(function (name) {
module.exports[name] = bindings[name]
})