Skip to content

Commit c397c8f

Browse files
committed
Update deps
1 parent 4822102 commit c397c8f

File tree

5 files changed

+5529
-5328
lines changed

5 files changed

+5529
-5328
lines changed

.github/workflows/check.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: check
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
name: Test
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Check out code
17+
uses: actions/checkout@v3
18+
- name: Set up Node
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: latest
22+
check-latest: true
23+
cache: npm
24+
- name: Install deps
25+
run: npm ci --include dev
26+
- name: Run tests
27+
run: npm test

.travis.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

README.md

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# stream-string
22

3-
[![Build Status](https://img.shields.io/travis/jamescostian/stream-string.svg?style=flat)](https://travis-ci.org/jamescostian/stream-string)
4-
[![Coverage Status](https://img.shields.io/coveralls/jamescostian/stream-string.svg?style=flat)](https://coveralls.io/r/jamescostian/stream-string?branch=master)
3+
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/jamescostian/stream-string/check.yaml?branch=main)](https://github.com/jamescostian/stream-string/actions?query=workflow%3Acheck)
54
[![License](https://img.shields.io/npm/l/stream-string.svg?style=flat)](https://github.com/jamescostian/stream-string/blob/master/LICENSE)
65
[![NPM Version](https://img.shields.io/npm/v/stream-string.svg?style=flat)](https://www.npmjs.com/package/stream-string)
76
[![Downloads/Month](https://img.shields.io/npm/dm/stream-string.svg?style=flat)](https://www.npmjs.com/package/stream-string)
@@ -21,40 +20,45 @@ npm install --save stream-string
2120
### Promises
2221

2322
```js
24-
const fs = require('fs')
25-
const ss = require('stream-string')
23+
const fs = require("fs");
24+
const ss = require("stream-string");
2625

2726
// Make a gzip stream (just for this example)
28-
const myStream = fs.createReadStream('./file').pipe(require('zlib').createGzip())
29-
30-
ss(myStream).then(data => {
31-
// myStream was converted to a string, and that string is stored in data
32-
console.log(data)
33-
}).catch(err => {
34-
// myStream emitted an error event (err), so the promise from stream-string was rejected
35-
throw err
36-
})
27+
const myStream = fs
28+
.createReadStream("./file")
29+
.pipe(require("zlib").createGzip());
30+
31+
ss(myStream)
32+
.then((data) => {
33+
// myStream was converted to a string, and that string is stored in data
34+
console.log(data);
35+
})
36+
.catch((err) => {
37+
// myStream emitted an error event (err), so the promise from stream-string was rejected
38+
throw err;
39+
});
3740
```
3841

3942
### Callbacks
4043

4144
```js
42-
const fs = require('fs')
43-
const ss = require('stream-string')
45+
const fs = require("fs");
46+
const ss = require("stream-string");
4447

4548
// Make a gzip stream (just for this example)
46-
const myStream = fs.createReadStream('./file').pipe(require('zlib').createGzip())
49+
const myStream = fs
50+
.createReadStream("./file")
51+
.pipe(require("zlib").createGzip());
4752

4853
ss(myStream, (err, data) => {
4954
if (err) {
5055
// myStream emitted an error event (err), which was passed to the callback
51-
throw err
52-
}
53-
else {
56+
throw err;
57+
} else {
5458
// myStream was converted to a string, and that string is stored in data
55-
console.log(data)
59+
console.log(data);
5660
}
57-
})
61+
});
5862
```
5963

6064
## Contributing

0 commit comments

Comments
 (0)