Installations
npm install write-yaml-file
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=16.14
Node Version
16.20.0
NPM Version
9.6.4
Releases
Unable to fetch releases
Contributors
Languages
JavaScript (77.07%)
TypeScript (22.93%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
zkochan
Download Statistics
Total Downloads
65,896,562
Last Day
5,895
Last Week
5,895
Last Month
1,520,174
Last Year
24,993,517
GitHub Statistics
101 Stars
428 Commits
29 Forks
4 Watching
31 Branches
21 Contributors
Bundle Size
43.62 kB
Minified
14.55 kB
Minified + Gzipped
Package Meta Information
Latest Version
5.0.0
Package Id
write-yaml-file@5.0.0
Unpacked Size
3.94 kB
Size
2.07 kB
File Count
5
NPM Version
9.6.4
Node Version
16.20.0
Publised On
27 Apr 2023
Total Downloads
Cumulative downloads
Total Downloads
65,896,562
Last day
0%
5,895
Compared to previous day
Last week
-98.3%
5,895
Compared to previous week
Last month
-8.2%
1,520,174
Compared to previous month
Last year
13.3%
24,993,517
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
Dev Dependencies
1
write-yaml-file
Stringify and write YAML to a file atomically
Creates directories for you as needed.
Installation
<pnpm|yarn|npm> add write-yaml-file
Usage
1const writeYamlFile = require('write-yaml-file') 2 3writeYamlFile('foo.yaml', {foo: true}).then(() => { 4 console.log('done') 5})
API
writeYamlFile(filepath, data, [options])
Returns a promise.
writeYamlFile.sync(filepath, data, [options])
options
Same options that can be passed in to js-yaml
mode
Type: number
Default 438
(0666 in octal)
Mode used when writing the file.
makeDir
Type: boolean
Default: true
Creates the directory to which the YAML file is written.
Related
- load-yaml-file - Read and parse a YAML file
License
MIT © Zoltan Kochan
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 9/30 approved changesets -- score normalized to 3
Reason
2 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 2
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/ci.yml:1
- Info: no jobLevel write permissions found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/zkochan/packages/ci.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/zkochan/packages/ci.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/zkochan/packages/ci.yml/main?enable=pin
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 third-party GitHubAction dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 9 are checked with a SAST tool
Reason
32 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-v9mx-4pqq-h232
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9
- Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g
- Warn: Project is vulnerable to: GHSA-hj9c-8jmm-8c52
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-w5p7-h5w8-2hfq
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
- Warn: Project is vulnerable to: GHSA-4w2j-2rg4-5mjw
- Warn: Project is vulnerable to: GHSA-mrgp-mrhc-5jrq
- Warn: Project is vulnerable to: GHSA-7jxr-cg7f-gpgv
- Warn: Project is vulnerable to: GHSA-xj72-wvfv-8985
- Warn: Project is vulnerable to: GHSA-ch3r-j5x3-6q2m
- Warn: Project is vulnerable to: GHSA-p5gc-c584-jj6v
- Warn: Project is vulnerable to: GHSA-whpj-8f3w-67p5
- Warn: Project is vulnerable to: GHSA-cchq-frgv-rjh5
- Warn: Project is vulnerable to: GHSA-g644-9gfx-q4q4
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Score
3
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to write-yaml-file
write-yaml
Write YAML. Converts JSON to YAML writes it to the specified file.
write-data
Write a YAML or JSON file to disk. Automatically detects the format to write based on extension. Or pass `ext` on the options.
@visulima/fs
Human friendly file system utilities for Node.js
smart-fs
Abstraction Layer for File Management.