Skip to content

Commit 2c3896b

Browse files
committed
chore: use bindings module to load bindings
1 parent 5cedaed commit 2c3896b

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const contacts = require('./build/Release/contacts.node')
1+
const contacts = require('bindings')('contacts.node')
22

33
function getContactsByName(name) {
44
if (typeof name !== 'string') throw new TypeError('name must be a string')

package-lock.json

Lines changed: 14 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-mac-contacts",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "A native module that allows you to access and manipulate macOS contacts",
55
"main": "index.js",
66
"scripts": {
@@ -31,6 +31,7 @@
3131
"node-gyp": "^5.0.3"
3232
},
3333
"dependencies": {
34+
"bindings": "^1.5.0",
3435
"node-addon-api": "^1.7.1"
3536
}
3637
}

0 commit comments

Comments
 (0)