balena-cli/lib/device/device.coffee

9 lines
208 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'