Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
atomic-file-rw
Advanced tools
This module is meant as a replacement for atomic-file as it has better error handling on node and is faster in the browser.
The library is written to handle writing to a few number of files in a
safe manner. Concurrent writes to the same file are completed in the
order they are started. A temporary file with the same filename as the
original — with a suffix ~
— is employed to ensure atomicity.
Write a buffer to file and read it again:
const atomic = require('atomic-file-rw')
atomic.writeFile("test.txt", Buffer.from('GREETINGS'), (err, x) => {
atomic.readFile("test.txt", (err, buf) => {
console.log(buf.toString())
})
})
atomic.readFile(path[, options], callback)
Same arguments as Node.js's fs.readFile
, but in the browser the
options
is ignored.
atomic.writeFile(file, data[, options], callback)
Same arguments as Node.js's fs.writeFile
, but in the browser the
options
is ignored.
atomic.deleteFile(file, callback)
Same arguments as Node.js's fs.unlink
.
FAQs
<!-- SPDX-FileCopyrightText: 2021 Anders Rune Jensen
The npm package atomic-file-rw receives a total of 2 weekly downloads. As such, atomic-file-rw popularity was classified as not popular.
We found that atomic-file-rw 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.