# all files / lib/ arrays.js

100% Statements 16/16
83.33% Branches 5/6
100% Functions 4/4
100% Lines 14/14

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28

    1×

    1×
    1×
    1×

    1×

    1×

    1×

    1×
    64×

    1×
    76×

    67×

    1×
    6×
     'use strict';

    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.copy = copy;
    exports.from = from;
    exports.fromFirst = fromFirst;

    var _lodash = require('lodash');

    var _lodash2 = _interopRequireDefault(_lodash);

    function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

    function copy(array) {
      return _lodash2.default.cloneDeep(array);
    }

    function from(_arguments) {
      if (_lodash2.default.isArray(_arguments[0])) return _arguments[0];

      return Array.prototype.slice.call(_arguments);
    }

    function fromFirst(_arguments) {
      return [_arguments[0]];
    }