UNPKG
lasercat-workshop
Version:
latest (1.3.1)
1.3.1
1.3.0
1.2.0
1.1.0
1.0.0
0.2.0
0.1.0
Cats & Lasers & johnny-five
github.com/tableflip/lasercat-workshop
tableflip/lasercat-workshop
lasercat-workshop
/
lib
/
hardware-finder.js
16 lines
(12 loc)
•
252 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module
.exports =
function
(five, type, pin)
{
if
(!five[
type
] || !five[
type
].instances) {
return
null } var
output
five[
type
].instances.forEach(
function
(thing)
{
if
(thing.pin == pin) {
output
= thing } })
return
output
}