diff --git a/package.json b/package.json index e890a6b..df82d19 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "commander": "^2.9.0", "debug": "^2.1.1", "es6-promise": "^3.1.2", - "nan": "~2.2.1", + "nan": "^2.3.2", "node-pre-gyp": "^0.6.26", "object.assign": "^4.0.3" }, @@ -66,7 +66,6 @@ "grunt": "^1.0.0", "grunt-mocha-test": "^0.12.7", "gruntify-eslint": "^2.0.0", - "memwatch-next": "^0.3.0", "mocha": "^2.4.5", "node-pre-gyp-github": "^1.1.2", "sandboxed-module": "^2.0.3", diff --git a/src/serialport_poller.cpp b/src/serialport_poller.cpp index 8427ad1..b1d2a84 100644 --- a/src/serialport_poller.cpp +++ b/src/serialport_poller.cpp @@ -61,12 +61,10 @@ void SerialportPoller::Init(Handle target) { // Prototype // SerialportPoller.close() - Nan::SetPrototypeTemplate(tpl, "close", - Nan::GetFunction(Nan::New(Close)).ToLocalChecked()); + Nan::SetPrototypeMethod(tpl, "close", Close); // SerialportPoller.start() - Nan::SetPrototypeTemplate(tpl, "start", - Nan::GetFunction(Nan::New(Start)).ToLocalChecked()); + Nan::SetPrototypeMethod(tpl, "start", Start); serialportpoller_constructor.Reset(tpl);