mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
13 lines
324 B
TypeScript
13 lines
324 B
TypeScript
import getStream = require("get-stream");
|
|
|
|
import * as fs from 'fs';
|
|
|
|
getStream(fs.createReadStream('foo'))
|
|
.then(str => str.toLowerCase());
|
|
|
|
getStream.array<string>(fs.createReadStream('foo'))
|
|
.then(values => values.join(', '));
|
|
|
|
getStream.buffer(fs.createReadStream('foo'))
|
|
.then(buffer => buffer.byteLength);
|