# put

> Pack multibyte binary values into buffers

Latest version **0.0.6** (published 2011-11-15) · MIT/X11 license · 0 weekly downloads

## Install

```sh
npm install put
pnpm add put
yarn add put
bun add put
```

## Health

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

Warnings: low downloads; no types; no esm support; has vulnerabilities; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2011-11-15 |
| First published | 2011-02-25 |
| Weekly downloads | 0 |
| License | MIT/X11 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.3.0 |
| Dependencies | 0 |
| Known vulnerabilities | 1 |
| Install scripts | no |
| Maintainers | substack |
| Keywords | put, pack, binary |

## Links

- npm: https://www.npmjs.com/package/put
- Repository: https://github.com/substack/node-put
- npm.io page: https://npm.io/package/put

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 0.0.6 (latest) — 2011-11-15
- 0.0.5 — 2011-05-11
- 0.0.4 — 2011-04-21
- 0.0.1 — 2011-02-25
- 0.0.3 — 2011-02-25

## README

Put
===

Pack multibyte binary values into buffers with specific endiannesses.

Installation
============

To install with [npm](http://github.com/isaacs/npm):
 
    npm install put

To run the tests with [expresso](http://github.com/visionmedia/expresso):

    expresso

Examples
========

buf.js
------

Build a buffer

    #!/usr/bin/env node

    var Put = require('put');
    var buf = Put()
        .word16be(1337)
        .word8(1)
        .pad(5)
        .put(new Buffer('pow', 'ascii'))
        .word32le(9000)
        .buffer()
    ;
    console.log(buf);

Output:
    <Buffer 05 39 01 00 00 00 00 00 70 6f 77 28 23 00 00>

stream.js
---------

Send a buffer to a writeable stream

    #!/usr/bin/env node

    var Put = require('put');
    Put()
        .word16be(24930)
        .word32le(1717920867)
        .word8(103)
        .write(process.stdout)
    ;

Output:
    abcdefg

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