# through2-sync

> Synchronous through2 transforms.

Latest version **0.2.2** (published 2015-05-25) · Unlicense license · 0 weekly downloads

## Install

```sh
npm install through2-sync
pnpm add through2-sync
yarn add through2-sync
bun add through2-sync
```

## 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.2.2 |
| Published | 2015-05-25 |
| First published | 2015-02-22 |
| Weekly downloads | 0 |
| License | Unlicense |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Valérian Galliat |
| Maintainers | valeriangalliat |

## Links

- npm: https://www.npmjs.com/package/through2-sync
- Repository: https://github.com/valeriangalliat/through2-sync
- Issues: https://github.com/valeriangalliat/through2-sync/issues
- npm.io page: https://npm.io/package/through2-sync

## Dependencies (1)

- [through2](https://npm.io/package/through2.md) ^0.6.3

## Recent versions

- 0.2.2 (latest) — 2015-05-25
- 0.2.1 — 2015-03-11
- 0.2.0 — 2015-02-22
- 0.1.1 — 2015-02-22
- 0.1.0 — 2015-02-22

## README

# through2-sync [![npm version](http://img.shields.io/npm/v/through2-sync.svg?style=flat-square)](https://www.npmjs.org/package/through2-sync)

> Synchronous [through2] transforms.

[through2]: https://github.com/rvagg/through2

Description
-----------

The API is the same as [through2][] (including the `through.obj`
helper), but the callback function is synchronous.

Example
-------

```js
const Stream = require('stream')
const through = require('through2-sync')

const stream = new Stream.Readable()
stream._read = () => {}

stream
  .pipe(through(
    chunk => chunk.toString().toUpperCase(),
    () => 'last chunk\n'
  ))
  .pipe(process.stdout)

stream.push('hello\n') // HELLO
stream.push('world\n') // WORLD
stream.push(null) // last chunk
```

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