Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-blink1

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-blink1 - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

8

blink1.js

@@ -249,2 +249,10 @@ var HID = require('node-hid');

Blink1.prototype.close = function(callback) {
this.hidDevice.close();
if(this._isValidCallback(callback)) {
callback();
}
};
Blink1.devices = devices;

@@ -251,0 +259,0 @@

2

package.json
{
"name": "node-blink1",
"description": "A node.js library for the blink(1).",
"version": "0.1.1",
"version": "0.1.2",
"author": {

@@ -6,0 +6,0 @@ "name": "Sandeep Mistry",

@@ -94,3 +94,6 @@ node-blink1

Close (the underlying HID device):
blink1.close([callback]);
License

@@ -97,0 +100,0 @@ ========

@@ -33,2 +33,3 @@

var recvFeatureReport;
var closed = false;

@@ -42,2 +43,6 @@ var mockHIDdevice = {

return ((id === FEATURE_REPORT_ID ) && (length === FEATURE_REPORT_LENGTH)) ? recvFeatureReport : null;
},
close: function() {
closed = true;
}

@@ -748,2 +753,21 @@ };

});
describe('#Blink1.close', function() {
beforeEach(setupBlink1);
afterEach(teardownBlink1);
it('should close HID device', function(done) {
blink1.close(done);
closed.should.eql(true);
});
it('should callback', function(done) {
blink1.close(function() {
closed.should.eql(true);
done();
});
});
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc