
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
binary-fetch
Advanced tools
Fetch incremental binary packets from a browser
Currently, the only way to access the progress from a request or upload in a browser is with the XMLHttpRequest API. However, the the progress data from the XMLHttpRequest API does not give you access to the actual binary data that has been recieved.
Binary fetch solves this problem by giving you immediate access to the binary data while it is being recieved.
Binary fetch is loosely based on the JavaScript fetch API.
npm install --save binary-fetch
import binaryFetch from 'binary-fetch';
binaryFetch('http://example.com/file.binary', {
method: 'GET'
}, (res) => { // fires 1 or more times during request
return res.arrayBuffer().then((body) => {
console.log('binary data recieved so far =>');
console.log(body);
});
}).then((res) => { // fires when request is finished
return res.arrayBuffer().then((body) => {
console.log('all binary data recieved =>');
console.log(body);
});
});
FAQs
Fetch incremental binary packets from a browser
The npm package binary-fetch receives a total of 4 weekly downloads. As such, binary-fetch popularity was classified as not popular.
We found that binary-fetch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.