getUuidForDevice()

This commit is contained in:
Dan Motzenbecker 2015-11-14 18:17:38 -05:00
parent fceb75dd31
commit 262f8cc5e6
1 changed files with 8 additions and 0 deletions

View File

@ -65,6 +65,14 @@ pluckUuid = (line) ->
line.match(/\[(.+)\]/)[1]
getUuidForDevice = (deviceName) ->
device = getDeviceList().find (line) -> line.match deviceName
unless device
logErr "Cannot find device `#{deviceName}`"
pluckUuid device
toUnderscored = (s) ->
s.replace(camelRx, '$1_$2').toLowerCase()