(item)
| 265 | // array functions |
| 266 | |
| 267 | function __toArray(item) { |
| 268 | if (item == null) { |
| 269 | return []; |
| 270 | } else if (Array.isArray(item)) { |
| 271 | return item; |
| 272 | } else { |
| 273 | return [item]; |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | // a version of Array.map that doesn't require an array, i.e. works on arrays and scalars. |
| 278 | function __map(items, fn, includeNull) { |
no outgoing calls
no test coverage detected