I hereby claim:
- I am reconbot on github.
- I am reconbot (https://keybase.io/reconbot) on keybase.
- I have a public key whose fingerprint is 44E1 DFA3 5E53 69A1 6B1E 30BB 3820 C498 CBDB 3B45
To claim this, I am signing this object:
import AWS from 'aws-sdk' | |
import aws4 from 'aws4' | |
import bole from 'bole' | |
import got from 'got' | |
import Promise from 'bluebird' | |
import config from './config' | |
const logger = bole('es-client') | |
const { region, host } = config |
// This is what elastic search wants for promises, bluebird says it's horrible | |
// https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/configuration.html#config-defer | |
// http://bluebirdjs.com/docs/api/deferred-migration.html | |
function defer () { | |
let resolve, reject | |
var promise = new Promise(function makeDefer () { | |
resolve = arguments[0] | |
reject = arguments[1] | |
}) | |
return { |
'use strict'; | |
var SerialPort = require('./'); | |
var port = process.env.TEST_PORT; | |
if (!port) { | |
console.error('Please pass TEST_PORT environment variable'); | |
process.exit(1); | |
} |
var five = require("johnny-five"); | |
var board = new five.Board(); | |
board.on("ready", function() { | |
// Create an Led on pin 13 and strobe it on/off | |
var led = new five.Led(13) | |
// Optionally set the speed; defaults to 100ms | |
led.strobe(100); | |
}); |
I hereby claim:
To claim this, I am signing this object:
var boards = new five.Boards([ | |
{ id: "arduino-or-whatever" }, | |
{ id: "a", io: new Esp({ id: "a"}) }, | |
{ id: "b", io: new Esp({ id: "b"}) }, | |
]); | |
boards.on("ready", function() { | |
var [arduino, a, b] = this; | |
// which is the same as... | |
// var arduino = this[0]; |
var five = require("johnny-five"); | |
var Twitter = require("twitter"); | |
var board = new five.Board(); | |
//var client = new Twitter({ /*... accessKeys */ }); | |
board.on("ready", function() { | |
var led = new five.Led(13); | |
function blinkLed(){ |
CommonJS Require Mapping
+-----------------+
| MODULE | +------------------+
| A | | MODULE |
+----------+------+ | C |
| +-------+----------+
| |
| |
+--v----------------+ |
// CommonJS to ES modules test cases | |
// Importing | |
var foo = require('bar'); | |
// becomes | |
import foo from 'bar'; | |
require('bar')(foo); | |
// becomes |