Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
filereader-stream
Advanced tools
Read an HTML5 File object (from e.g. HTML5 drag and drops) as a stream.
Given an HTML5 File object (from e.g. HTML5 drag and drops), turn it into a readable stream.
Use it with npm & browserify
$ npm install filereader-stream
var drop = require('drag-and-drop-files')
var concat = require('concat-stream')
var fileReaderStream = require('filereader-stream')
test('should read file when one is dropped', function(t) {
drop(document.body, function(files) {
var first = files[0]
fileReaderStream(first).pipe(concat(function(contents) {
// contents is the contents of the entire file
}))
})
})
var fileReaderStream = require('filereader-stream')
var readStream = fileReaderStream(file, [options])
fileReaderStream
is a Streams 2 Readable Stream, so you can do all the streamy things with it like .pipe
etc.
options
:
chunkSize
- default 1024 * 1024
(1MB) - How many bytes will be read at a timeoffset
- default 0
- Where in the file to start readingnpm install
npm test
then open your browser to the address provided, open your JS console, and drag and drop files onto the page until the test suite passes/fails
FAQs
Read an HTML5 File object (from e.g. HTML5 drag and drops) as a stream.
The npm package filereader-stream receives a total of 2,426 weekly downloads. As such, filereader-stream popularity was classified as popular.
We found that filereader-stream demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.