Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

write-file-atomic

Package Overview
Dependencies
Maintainers
6
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

write-file-atomic - npm Package Compare versions

Comparing version 3.0.3 to 4.0.0

lib/index.js

36

package.json
{
"name": "write-file-atomic",
"version": "3.0.3",
"version": "4.0.0",
"description": "Write files in an atomic fashion w/configurable ownership",
"main": "index.js",
"main": "./lib/index.js",
"scripts": {
"test": "tap",
"posttest": "npm run lint",
"lint": "standard",
"postlint": "rimraf chowncopy good nochmod nochown nofsync nofsyncopt noopen norename \"norename nounlink\" nowrite",
"lint": "eslint '**/*.js'",
"postlint": "npm-template-check",
"preversion": "npm test",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags"
"prepublishOnly": "git push origin --follow-tags",
"lintfix": "npm run lint -- --fix",
"snap": "tap"
},

@@ -23,3 +25,3 @@ "repository": {

],
"author": "Rebecca Turner <me@re-becca.org> (http://re-becca.org)",
"author": "GitHub Inc.",
"license": "ISC",

@@ -34,17 +36,21 @@ "bugs": {

"signal-exit": "^3.0.2",
"typedarray-to-buffer": "^3.1.5"
"typedarray-to-buffer": "^4.0.0"
},
"devDependencies": {
"mkdirp": "^0.5.1",
"require-inject": "^1.4.4",
"rimraf": "^2.6.3",
"standard": "^14.3.1",
"tap": "^14.10.6"
"@npmcli/template-oss": "^2.5.1",
"mkdirp": "^1.0.4",
"rimraf": "^3.0.2",
"tap": "^15.1.6"
},
"files": [
"index.js"
"bin",
"lib"
],
"tap": {
"100": true
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16"
},
"templateOSS": {
"windowsCI": false,
"version": "2.5.1"
}
}

@@ -7,4 +7,10 @@ write-file-atomic

### var writeFileAtomic = require('write-file-atomic')<br>writeFileAtomic(filename, data, [options], [callback])
### `writeFileAtomic(filename, data, [options], [callback])`
#### Description:
Atomically and asynchronously writes data to a file, replacing the file if it already
exists. data can be a string or a buffer.
#### Options:
* filename **String**

@@ -22,5 +28,9 @@ * data **String** | **Buffer**

Atomically and asynchronously writes data to a file, replacing the file if it already
exists. data can be a string or a buffer.
#### Usage:
```js
var writeFileAtomic = require('write-file-atomic')
writeFileAtomic(filename, data, [options], [callback])
```
The file is initially named `filename + "." + murmurhex(__filename, process.pid, ++invocations)`.

@@ -72,4 +82,13 @@ Note that `require('worker_threads').threadId` is used in addition to `process.pid` if running inside of a worker thread.

### var writeFileAtomicSync = require('write-file-atomic').sync<br>writeFileAtomicSync(filename, data, [options])
### `writeFileAtomicSync(filename, data, [options])`
#### Description:
The synchronous version of **writeFileAtomic**.
#### Usage:
```js
var writeFileAtomicSync = require('write-file-atomic').sync
writeFileAtomicSync(filename, data, [options])
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc