Skip to content

Commit

Permalink
Add support for debug builds (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt-Esch authored Feb 4, 2023
1 parent cddc468 commit 2325f1e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
'use strict';

const farmhash = require('./build/Release/farmhash.node');
const farmhash = (function farmhashBinding () {
try {
return require('./build/Release/farmhash.node');
} catch (e) {
return require('./build/Debug/farmhash.node');
}
}());

// Input validation
function verifyInteger (input) {
Expand Down

0 comments on commit 2325f1e

Please sign in to comment.