1-liners
Version:
Useful oneliners and shorthand functions
24 lines (21 loc) • 349 B
JavaScript
/**
* @module 1-liners/head
*
* @description
*
* Returns the first item of an array.
*
* @example
*
* const head = require('1-liners/head');
*
* head([1, 2, 3]); // => 1
*
*/
;
exports.__esModule = true;
exports["default"] = function (_ref) {
var head = _ref[0];
return head;
};
module.exports = exports["default"];