Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dionyziz/stream.js
A tiny stand-alone Javascript library for streams
https://github.com/dionyziz/stream.js
Last synced: about 2 months ago
JSON representation
A tiny stand-alone Javascript library for streams
- Host: GitHub
- URL: https://github.com/dionyziz/stream.js
- Owner: dionyziz
- Created: 2011-09-11T01:12:02.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2018-09-15T09:06:44.000Z (about 6 years ago)
- Last Synced: 2024-05-08T16:20:38.585Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 141 KB
- Stars: 555
- Watchers: 15
- Forks: 65
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# stream.js [![Build Status](https://travis-ci.org/dionyziz/stream.js.svg?branch=master)](https://travis-ci.org/dionyziz/stream.js) [![codecov.io](https://codecov.io/github/dionyziz/stream.js/coverage.svg?branch=master)](https://codecov.io/github/dionyziz/stream.js?branch=master)
stream.js is a tiny Javascript library that unlocks a new data structure for you: streams.
Go to https://dionyziz.github.io/stream.js-website/ to read all about what streams are and how they can make your
code better and your soul happier.## Installation
In nodejs:
```
npm install https://github.com/dionyziz/stream.js.git
```In bower:
```
bower install stream.js
```As per [bower.json specification](https://github.com/bower/spec/blob/master/json.md#main),
we have defined the source file for stream.js and not a minified version. You can get a
minified version from [jsDelivr](https://www.jsdelivr.com/projects/stream.js).## Usage
In nodejs:```js
var Stream = require('stream.js');
var s1 = Stream.make(1,2,3);
var s2 = new Stream();
s2.append(1).append(2).append(3);
```In the browser:
```html
var s1 = Stream.make(1,2,3);
var s2 = new Stream();
s2.append(1).append(2).append(3);```
or with AMD:
```js
define(function(require) {
var Stream = require("stream.js");
Stream.make(1,2,3).print();
});
```