• This project
    • Loading...
  • Sign in

POC / webcabin_wcdocker

Imgpsh fullsize
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • webcabin_wcdocker
  • bower_components
  • lodash-compat
  • array
  • initial.js
  • Sujeet Kumar's avatar
    initial commit · 43a4a9d4
    43a4a9d4
    Sujeet Kumar authored 2017-10-04 17:45:40 +0530
initial.js 411 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
define(['./dropRight'], function(dropRight) {

  /**
   * Gets all but the last element of `array`.
   *
   * @static
   * @memberOf _
   * @category Array
   * @param {Array} array The array to query.
   * @returns {Array} Returns the slice of `array`.
   * @example
   *
   * _.initial([1, 2, 3]);
   * // => [1, 2]
   */
  function initial(array) {
    return dropRight(array, 1);
  }

  return initial;
});