Skip to content

Commit

Permalink
Support require.addon() (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperisager authored Nov 17, 2023
1 parent 8419abb commit 03d493d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
package-lock.json
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if (typeof process.addon === 'function') { // if the platform supports native resolving prefer that
module.exports = process.addon.bind(process)
if (typeof require.addon === 'function') { // if the platform supports native resolving prefer that
module.exports = require.addon.bind(require)
} else { // else use the runtime version here
module.exports = require('./node-gyp-build.js')
}

0 comments on commit 03d493d

Please sign in to comment.