0.1.1 • Published 3 years ago

@annexe/array.tail v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@annexe/tail

A utility function that returns all but the first element of an array by default. You can also provide an index to where you want it to stop at as a second argument.

Installation

To install @annexe/tail:

Yarn

yarn add @annexe/tail

NPM

npm install @annexe/tail

Usage

import { tail } from '@annexe/tail';

const myArray = [1, 2, 3, 4, 5];

console.log(tail<number>(myArray)); // logs [2, 3, 4, 5]