source: node_modules/ramda-adjunct/src/sliceFrom.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 761 bytes
Line 
1import { __, slice } from 'ramda';
2
3/**
4 * Returns the elements of the given list or string (or object with a slice method)
5 * from fromIndex (inclusive).
6 * Dispatches to the slice method of the second argument, if present.
7 *
8 * @func sliceFrom
9 * @memberOf RA
10 * @since {@link https://char0n.github.io/ramda-adjunct/1.16.0|v1.16.0}
11 * @category List
12 * @sig Number -> [a] -> [a]
13 * @param {number} fromIndex The start index (inclusive)
14 * @param {Array|string} list The list or string to slice
15 * @return {Array|string} The sliced list or string
16 * @see {@link http://ramdajs.com/docs/#slice|R.slice}, {@link RA.sliceTo|sliceTo}
17 * @example
18 *
19 * RA.sliceFrom(1, [1, 2, 3]); //=> [2, 3]
20 */
21const sliceFrom = slice(__, Infinity);
22
23export default sliceFrom;
Note: See TracBrowser for help on using the repository browser.