(source?: T | T[])
| 7 | import { promisify } from 'util'; |
| 8 | |
| 9 | function toArray<T>(source?: T | T[]): T[] { |
| 10 | if (typeof source === 'undefined' || source === null) { |
| 11 | return []; |
| 12 | } else if (!Array.isArray(source)) { |
| 13 | return [source]; |
| 14 | } |
| 15 | return source; |
| 16 | } |
| 17 | |
| 18 | /** |
| 19 | * adds arguments as properties to obj |
no outgoing calls
no test coverage detected
searching dependent graphs…