
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
browser-readablestream-to-it
Advanced tools
Turns a browser readble stream into an async iterator
Allows treating a browser readable stream as an async iterator.
import toIt from 'browser-readablestream-to-it'
import all from 'it-all'
const content = [0, 1, 2, 3, 4]
const stream = new ReadableStream({
start(controller) {
for (let i = 0; i < content.length; i++) {
controller.enqueue(content[i])
}
controller.close()
}
})
const arr = await all(toIt(stream))
console.info(arr) // 0, 1, 2, 3, 4
By default a readable stream will have .cancel called on it once it has ended or reading has stopped prematurely.
To prevent this behaviour, pass preventCancel: true
as an option:
const arr = await all(toIt(stream, { preventCancel: true }))
console.info(arr) // 0, 1, 2, 3, 4
$ npm i browser-readablestream-to-it
<script>
tagLoading this module through a script tag will make its exports available as BrowserReadablestreamToIt
in the global namespace.
<script src="https://unpkg.com/browser-readablestream-to-it/dist/index.min.js"></script>
Licensed under either of
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
FAQs
Turns a browser readble stream into an async iterator
The npm package browser-readablestream-to-it receives a total of 84,967 weekly downloads. As such, browser-readablestream-to-it popularity was classified as popular.
We found that browser-readablestream-to-it demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.