UNPKG
mls-elo
Version:
latest (0.3.1)
0.3.1
0.3.0
0.2.0
0.1.0
0.0.1
Calculate ELO rankings for Major League Soccer
github.com/doug-wade/mls-elo
doug-wade/mls-elo
mls-elo
/
lib
/
StringWritableStream.js
19 lines
(15 loc)
•
285 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module.exports =
class
StringWritableStream
{
constructor
() {
this
.chunks = []; } write (buffer) {
this
.chunks.push(buffer); } end () {
const
buffer = Buffer.concat(
this
.chunks);
this
.str = buffer.toString(); } toString() {
return
this
.str; } }