1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 19:42:01 +02:00

Refactoring ADB add keys to its own directive so it can be shared.

This commit is contained in:
Gunther Brunner 2014-09-26 20:13:08 +09:00
parent a83ecd43ed
commit 13d40a4649
11 changed files with 153 additions and 28 deletions

View file

@ -0,0 +1,12 @@
module.exports = function AdbKeysServiceFactory() {
var service = {}
service.hostNameFromKey = function (key) {
if (key.match(/.+= (.+)/)) {
return key.replace(/.+= (.+)/g, '$1').replace(/(\.local)?/g, '')
}
return ''
}
return service
}