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

node-blink

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-blink - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

4

CHANGELOG.md

@@ -0,1 +1,5 @@

## 0.0.2
* setRGB is now just set
## 0.0.1

@@ -2,0 +6,0 @@

@@ -5,2 +5,3 @@ var blink = require('../');

blink(function(err, b) {
if (err) throw err;
// blink from #ff0000 to #000000 every 1000ms

@@ -7,0 +8,0 @@ // or 1s

4

examples/colors.js

@@ -5,7 +5,9 @@ var blink = require('../');

blink(function(err, b) {
if (err) throw err;
var colors = ['cyan', 'yellow', 'magenta'], i = 0;
setInterval(function() {
if (++i > colors.length - 1) i = 0;
b.setRGB(colors[i]);
b.set(colors[i]);
}, 1000);
});

@@ -5,3 +5,5 @@ var blink = require('../');

blink(function(err, b) {
b.setRGB('#ace');
if (err) throw err;
b.set('#ace');
});

@@ -5,8 +5,10 @@ var blink = require('../');

blink(function(err, b) {
if (err) throw err;
var angle = 0;
setInterval(function() {
if (++angle > 360) angle = 0;
b.setRGB('hsl(' + angle + ', 100%, 50%)');
b.set('hsl(' + angle + ', 100%, 50%)');
}, 100);
});

@@ -5,3 +5,5 @@ var blink = require('../');

blink(function(err, b) {
if (err) throw err;
b.on();
});

@@ -5,2 +5,4 @@ var blink = require('../');

blink(function(err, b) {
if (err) throw err;
// start with pure white

@@ -23,4 +25,4 @@ var color = [255, 255, 255];

color = color.map(wander);
b.setRGB(color, 1000);
b.set(color, 1000);
}, 1000);
});
var blink = require('../');
blink(function(err, b) {
if (err) throw err;
// set to #ff00ff instantly
b.setRGB([255,0,255]);
b.set([255,0,255]);
});

@@ -5,3 +5,5 @@ var blink = require('../');

blink(function(err, b) {
if (err) throw err;
console.log(b.version());
});

@@ -61,3 +61,3 @@ var HID = require('HID'),

// otherwise it is faded two with the blink(1)'s internal functionality
b.setRGB = function(rgb, ms) {
b.set = function(rgb, ms) {
b.connection.write(wRGB(rgb, ms || 0));

@@ -68,4 +68,4 @@ return b;

// simple on & off shortcuts
b.on = function() { b.setRGB(white); };
b.off = function() { b.setRGB(black); };
b.on = function() { b.set(white); };
b.off = function() { b.set(black); };

@@ -72,0 +72,0 @@ // get the blink's version number. mine is 100. this bit of code

{
"name": "node-blink",
"version": "0.0.1",
"version": "0.0.2",
"description": "blink(1) support for node",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -20,15 +20,15 @@ # node-blink

// fade to an rgb color
b.setRGB([0, 10, 50], 1000);
b.set([0, 10, 50], 1000);
// set an rgb color instantly
b.setRGB([255, 0, 100]);
b.set([255, 0, 100]);
// even use hex colors
b.setRGB('#ace');
b.set('#ace');
// named css colors
b.setRGB('cyan');
b.set('cyan');
// and hsl!
b.setRGB('hsl(35, 100%, 50%)');
b.set('hsl(35, 100%, 50%)');

@@ -48,3 +48,3 @@ // just turn it on (white)

if (++angle > 360) angle = 0;
b.setRGB('hsl(' + angle + ', 100%, 50%)');
b.set('hsl(' + angle + ', 100%, 50%)');
}, 100);

@@ -51,0 +51,0 @@ });

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