UNPKG

hoff

Version:

A collection of higher order functions you may find useful

21 lines (15 loc) 432 B
'use strict'; // return first element of an array // without any array packing Object.defineProperty(exports, '__esModule', { value: true }); function _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); } var unwrap = function unwrap(_ref) { var _ref2 = _toArray(_ref); var first = _ref2[0]; var rest = _ref2.slice(1); return first; }; exports['default'] = unwrap; module.exports = exports['default'];