| Conditions | 3 |
| Paths | 2 |
| Total Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | 'use strict' |
||
| 14 | .end(function (response) { |
||
| 15 | if (response.error || !response.body) { |
||
| 16 | stopSpinner(response.error) |
||
| 17 | process.exit() |
||
| 18 | } |
||
| 19 | |||
| 20 | stopSpinner() |
||
| 21 | var list = response.body.items.map(function (item) { |
||
| 22 | return item.name.replace(/^starter-/, '') |
||
| 23 | }).sort(function (a, b) { |
||
| 24 | if (a === 'basic') { |
||
| 25 | return -1 |
||
| 26 | } |
||
| 27 | if (b === 'basic') { |
||
| 28 | return 1 |
||
| 29 | } |
||
| 30 | return a > b ? 1 : -1 |
||
| 31 | }) |
||
| 32 | |||
| 33 | callback(list) |
||
| 34 | }) |
||
| 35 | } |
||
| 38 |