| var initial = require('./initial.js'); | |
| // Get the first element of an array. Passing **n** will return the first N | |
| // values in the array. The **guard** check allows it to work with `_.map`. | |
| function first(array, n, guard) { | |
| if (array == null || array.length < 1) return n == null || guard ? void 0 : []; | |
| if (n == null || guard) return array[0]; | |
| return initial(array, array.length - n); | |
| } | |
| module.exports = first; | |
Xet Storage Details
- Size:
- 421 Bytes
- Xet hash:
- debf2135da71eab0a46b0e060f869cc49dc8c202b2f29b7b8f315468578acec4
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.