# map-buffer

> Creates a new Buffer with the results of calling a provided function on every element in this Buffer (like Array.prototype.map but for buffers).

Latest version **1.0.1** (published 2016-02-03) · LSC license · 0 weekly downloads

## Install

```sh
npm install map-buffer
pnpm add map-buffer
yarn add map-buffer
bun add map-buffer
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-02-03 |
| First published | 2016-02-03 |
| Weekly downloads | 0 |
| License | LSC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.0.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Pablo Terradillos |
| Maintainers | tehsis |

## Links

- npm: https://www.npmjs.com/package/map-buffer
- Repository: https://github.com/tehsis/map-buffer
- Homepage: https://github.com/tehsis/map-buffer#readme
- Issues: https://github.com/tehsis/map-buffer/issues
- npm.io page: https://npm.io/package/map-buffer

## Recent versions

- 1.0.1 (latest) — 2016-02-03
- 1.0.0 — 2016-02-03

## README

# map-buffer [![Build Status](https://travis-ci.org/tehsis/map-buffer.svg?branch=master)](https://travis-ci.org/tehsis/map-buffer)

Creates a new Buffer with the results of calling a provided function on every element in this Buffer (ie. like Array.prototype.map but for buffers).

## Usage example

```js
const mapBuffer = require('map-buffer');

const buf = new Buffer([0x62,0x75,0x66,0x66,0x65,0x72]);

const new_buf = mapBuffer(buf, (value, index, original_buffer) => {
  return value === 0x62 ? 0x75 : value;
});

console.log(new_buf); // <Buffer 75 75 66 66 65 72>
```

---
_Source: https://npm.io/package/map-buffer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
