# @writetome51/array-replace-middle

> This function replaces items in the middle of the array

Latest version **1.0.2** (published 2018-10-10) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @writetome51/array-replace-middle
pnpm add @writetome51/array-replace-middle
yarn add @writetome51/array-replace-middle
bun add @writetome51/array-replace-middle
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2018-10-10 |
| First published | 2018-10-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Steve Thompson |
| Maintainers | writetome51 |
| Keywords | array, manipulation, replace, middle, items |

## Links

- npm: https://www.npmjs.com/package/@writetome51/array-replace-middle
- npm.io page: https://npm.io/package/@writetome51/array-replace-middle

## Dependencies (2)

- [basic-data-handling](https://npm.io/package/basic-data-handling.md) latest
- [@writetome51/array-replace-adjacent-items](https://npm.io/package/@writetome51/array-replace-adjacent-items.md) latest

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2018-10-10
- 1.0.1 — 2018-10-08
- 1.0.0 — 2018-10-08

## README

This function replaces items in the middle of the array and returns void.

Example: if array is [1,2,3,4,5,6,7] , and you call replaceMiddle(2, [9,10], array) ,
the result will be [1,2,9,10,6,7] .  It preserves the first 2 items and
the last 2.  newValues doesn't have to be same length as number of items
it's replacing.

Usage:

replaceMiddle(numItemsToPreserveAtEachEnd, newValues, arrayToModify);

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