https://github.com/pyramation/uuid-stream
A Transform stream that generates RFC-compliant UUID v5.
https://github.com/pyramation/uuid-stream
node-module npm stream uuid
Last synced: about 1 month ago
JSON representation
A Transform stream that generates RFC-compliant UUID v5.
- Host: GitHub
- URL: https://github.com/pyramation/uuid-stream
- Owner: pyramation
- License: mit
- Created: 2018-10-15T03:31:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-10-01T00:22:17.000Z (over 5 years ago)
- Last Synced: 2025-05-08T05:48:55.860Z (about 1 year ago)
- Topics: node-module, npm, stream, uuid
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# UUID Stream 
A Transform stream that generates RFC-compliant UUID v5.
## Installation
```sh
npm install uuid-stream
```
## Usage
```js
const UuidStream = require('uuid-stream');
const stream = new UuidStream();
const readstream = getReadStreamSomehow();
let result = null;
stream
.on('error', e => {
reject(e);
})
.on('uuid', data => {
result = data.toString();
})
.on('data', data => {
// data passes through if you need to do more!
})
.on('finish', () => {
resolve(result);
});
readstream.pipe(stream);
```
Just like [node-uuid](https://github.com/kelektiv/node-uuid) for uuid v5, but removed the need to have all contents in-memory to be compatible with streams.