balena-cli/lib/device/device.coffee

12 lines
271 B
CoffeeScript
Raw Normal View History

_ = require('lodash')
DEVICE_NAMES = require('./device-names.json')
exports.getDisplayName = (device) ->
for key, value of DEVICE_NAMES
if _.indexOf(value, device) isnt -1
return key
return 'Unknown'
2014-11-24 12:25:45 +00:00
exports.getSupportedDevices = ->
return _.keys(DEVICE_NAMES)