# @nornagon/put

> Pack multibyte binary values into buffers

Latest version **0.0.8** (published 2019-04-18) · MIT/X11 license · 0 weekly downloads

## Install

```sh
npm install @nornagon/put
pnpm add @nornagon/put
yarn add @nornagon/put
bun add @nornagon/put
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2019-04-18 |
| First published | 2019-04-18 |
| Weekly downloads | 0 |
| License | MIT/X11 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.3.0 |
| Dependencies | 0 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | nornagon |
| Keywords | put, pack, binary |

## Links

- npm: https://www.npmjs.com/package/@nornagon/put
- Repository: https://github.com/nornagon/node-put
- Homepage: https://github.com/nornagon/node-put#readme
- Issues: https://github.com/nornagon/node-put/issues
- npm.io page: https://npm.io/package/@nornagon/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.8 (latest) — 2019-04-18
- 0.0.7 — 2019-04-18

## 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/@nornagon/put · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
