a cleaner way would be 
```js
Array.isArray(paths) ? paths : [paths];
```