New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

misfit-bolt

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

misfit-bolt - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

.travis.yml

8

index.js
'use strict';
var debug = require('debug')(require('./package').name);
var noble = require('noble');
var noble = require('./noble');
var Peripheral = require('noble/lib/peripheral');

@@ -12,4 +12,4 @@

function isOn(value) {
var str = ',100';
return value.substr(value.length - str.length, str.length) === str;
var str = ',0';
return value.substr(value.length - str.length, str.length) !== str;
}

@@ -56,2 +56,3 @@

if (this._connected) {
debug('already connected');
this.getLight(done);

@@ -74,2 +75,3 @@ } else {

if (!this._connected) {
debug('already disconnected');
return done();

@@ -76,0 +78,0 @@ }

@@ -501,2 +501,24 @@ /*jshint expr: true*/

describe('when light brightness is set', () => {
before((done) => {
spy = sinon.sandbox.stub(bolt, 'get', (cb) => {
cb(undefined, '255,255,255,1');
});
bolt.getState((error, value) => {
returnedValue = value;
done();
});
});
it('calls #get method', () => {
chai.expect(spy.called).to.be.true;
});
it('return `true`', () => {
chai.expect(returnedValue).to.be.true;
});
});
});

@@ -503,0 +525,0 @@

{
"name": "misfit-bolt",
"version": "1.0.4",
"version": "1.0.5",
"description": "Misfit Bolt Javascript Interface",

@@ -5,0 +5,0 @@ "keywords": [

@@ -1,3 +0,4 @@

# Misfit Bolt Javascript Interface
# Misfit Bolt Javascript Interface ![Build status](https://travis-ci.org/flochtililoch/misfit-bolt.svg)
Thin wrapper around [sandeepmistry/noble](https://github.com/sandeepmistry/noble), that helps [Misfit Bolt](https://misfit.com/products/bolt) bulbs discovery, and allows turning them on/off and changing their color and brightness, as well as reading their currently set values.

@@ -255,3 +256,3 @@ Currently support setting color and brightness via [RGBA](https://en.wikipedia.org/wiki/RGBA_color_space).

```javascript
Bolt = require('misfit-bolt');
Bolt = require('.');

@@ -258,0 +259,0 @@ // Discover every nearby Bolt

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