How to use the readable-web-to-node-stream.ReadableWebToNodeStream function in readable-web-to-node-stream

To help you get started, we’ve selected a few readable-web-to-node-stream examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sindresorhus / file-type / browser.js View on Github external
async function fromStream(stream) {
	const readableWebToNodeStream = new ReadableWebToNodeStream(stream);
	const fileType = await core.fromStream(readableWebToNodeStream);
	await readableWebToNodeStream.close();
	return fileType;
}
github Borewit / music-metadata-browser / lib / index.ts View on Github external
export async function parseReadableStream(stream: ReadableStream, contentType, options?: IOptions): Promise {
  const ns = new ReadableWebToNodeStream(stream);
  const res = await parseNodeStream(ns, contentType, options);
  debug(`Completed parsing from stream bytesRead=${ns.bytesRead} / fileSize=${options && options.fileSize ? options.fileSize : '?'}`);
  await ns.close();
  return res;
}

readable-web-to-node-stream

Converts a Web-API readable-stream into a Node readable-stream.

MIT
Latest version published 3 years ago

Package Health Score

65 / 100
Full package analysis

Popular readable-web-to-node-stream functions