# @writetome51/array-remove-all-before

> 2 functions that remove all items that come before a certain value in the array.

Latest version **1.0.0** (published 2019-03-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @writetome51/array-remove-all-before
pnpm add @writetome51/array-remove-all-before
yarn add @writetome51/array-remove-all-before
bun add @writetome51/array-remove-all-before
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-03-01 |
| First published | 2019-03-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Steve Thompson |
| Maintainers | writetome51 |
| Keywords | array, manipulation, remove, everything, all, after, before, value |

## Links

- npm: https://www.npmjs.com/package/@writetome51/array-remove-all-before
- Repository: https://github.com/writetome51/array-remove-all-before
- Homepage: https://github.com/writetome51/array-remove-all-before#readme
- Issues: https://github.com/writetome51/array-remove-all-before/issues
- npm.io page: https://npm.io/package/@writetome51/array-remove-all-before

## Dependencies (1)

- [@writetome51/array-get-and-remove-all-before](https://npm.io/package/@writetome51/array-get-and-remove-all-before.md) ~1.1.2

## Recent versions

- 1.0.0 (latest) — 2019-03-01

## README

# removeAllBeforeFirst(value, array):void

Removes everything before first instance of `value` in `array`.

# removeAllBeforeLast(value, array): void

Removes everything before last instance of `value` in `array`.

For both, the parameter `value` cannot be an object.  It can be an array.


## Examples
```
let arr = [5, 10, 15, [20,22], 10, 50, [20,22], 60];  
removeAllBeforeFirst([20,22], arr);  
// arr is now [[20,22],10,50,[20,22],60]  

let arr = [5, 10, 15, [20,22], 10, 50, [20,22], 60]; 
removeAllBeforeLast([20,22], arr);  
// arr is now [[20,22], 60]  
```

## Installation
`npm i  @writetome51/array-remove-all-before`


## Loading
```
// if using TypeScript:
import {removeAllBeforeFirst, removeAllBeforeLast}  from '@writetome51/array-remove-all-before';
// if using ES5 JavaScript:
var removeAllBeforeFirst = 
	require('@writetome51/array-remove-all-before').removeAllBeforeFirst;
var removeAllBeforeLast = 
	require('@writetome51/array-remove-all-before').removeAllBeforeLast;
```

---
_Source: https://npm.io/package/@writetome51/array-remove-all-before · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
