Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
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 45 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
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.