Skip to content

Commit

Permalink
add promise/pink
Browse files Browse the repository at this point in the history
  • Loading branch information
chee committed Jul 13, 2017
1 parent 26f5bf0 commit 569d652
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions play/promise/pink.js
@@ -0,0 +1,8 @@
const {discover, setColor, pair, stop = process.exit} = require('../..')

const setColorWithDispatch = (...color) => dispatch => dispatch(setColor(...color, 0xff))

discover()
.then(pair)
.then(setColorWithDispatch(0xff, 0x2a, 0x50))
.then(stop)

0 comments on commit 569d652

Please sign in to comment.