📁 File Manager Pro
v10.0.3 | PHP: 8.2.31
Server: LiteSpeed
2026-06-29 09:00:29
📂
/ (Root)
/
home
/
orkouolp
/
nodevenv
/
node_js
/
orkofarms.com
/
18
/
lib
/
node_modules
/
underscore
/
modules
📍 /home/orkouolp/nodevenv/node_js/orkofarms.com/18/lib/node_modules/underscore/modules
🔄 Refresh
✏️
Editing: first.js
Writable
import initial from './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`. export default 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); }
💾 Save Changes
❌ Cancel