https://github.com/e2fyi/streams
A library of custom NodeJS streams to do various things.
https://github.com/e2fyi/streams
auto-increment mongoose nodejs stream stream-processing
Last synced: about 2 months ago
JSON representation
A library of custom NodeJS streams to do various things.
- Host: GitHub
- URL: https://github.com/e2fyi/streams
- Owner: e2fyi
- License: apache-2.0
- Created: 2017-12-13T05:59:08.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-15T01:34:14.000Z (over 7 years ago)
- Last Synced: 2025-03-17T22:17:42.265Z (2 months ago)
- Topics: auto-increment, mongoose, nodejs, stream, stream-processing
- Language: JavaScript
- Size: 415 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.hbs
- License: LICENSE
Awesome Lists containing this project
README
@e2fyi/streams
======================
[](https://github.com/e2fyi/streams/releases)
[](https://travis-ci.org/e2fyi/streams)
[](https://coveralls.io/github/e2fyi/streams?branch=master)
[](https://snyk.io/test/github/e2fyi/streams)
[](https://github.com/prettier/prettier)This NodeJS library provides custom [NodeJS streams](https://nodejs.org/api/stream.html)
for specific use cases.Currently, the following streams are available:
- [`DocumentTagger`](#module_@e2fyi/streams.DocumentTagger): A Transform stream to tag an auto-increment field to each object in the stream. Can also mutate the stream objects through a function or default Object.
- [`MongooseStream`](#module_@e2fyi/streams.MongooseStream): A Transform stream which will bulk write the objects in the stream to mongodb via a [mongoose model](http://mongoosejs.com/docs/models.html).
## ChangeLog
- v1.0.0: new streams: `DocumentTagger`, `MongooseStream`.## Quick start
Using CommonJS module
```js
// importing DocumentTagger and MongooseStream
const {DocumentTagger, MongooseStream} = require('@e2fyi/streams');
```## API reference
The API documentation is also available at [https://e2fyi.github.io/streams/](https://e2fyi.github.io/streams/).{{#modules}}
{{>docs}}
{{/modules}}## Development
Unit testing
```
npm test
```Build documentation
```
npm run build
```