File: device.coffee

Defined in: lib/resin/device

Method Summary

Method Details

~ (String) getDisplayName(device)

Get display name for a device

For a list of supported devices, see getSupportedDevices()

console.log resin.device.getDisplayName('raspberry-pi') # Raspberry Pi
console.log resin.device.getDisplayName('rpi') # Raspberry Pi

Parameters:

  • device ( String ) device name

Returns:

  • ( String ) — device display name or 'Unknown'

~ (String) getDeviceSlug(device)

Get device slug

console.log resin.device.getDeviceSlug('Raspberry Pi') # raspberry-pi

Parameters:

  • device ( String ) device name

Returns:

  • ( String ) — device slug or 'unknown'

~ (Array<String>) getSupportedDevices()

Get a list of supported devices

devices = resin.device.getSupportedDevices()
console.log(devices)

Returns:

  • ( Array<String> ) — a list of all supported devices, by their display names

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: