balena-cli/lib/device/device.coffee
2014-11-19 08:50:11 -04:00

9 lines
208 B
CoffeeScript

_ = 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'