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

@stdlib/fs-write-file

Package Overview
Dependencies
Maintainers
4
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stdlib/fs-write-file - npm Package Compare versions

Comparing version 0.0.8 to 0.1.0

CITATION.cff

2

docs/types/index.d.ts

@@ -19,3 +19,3 @@ /*

// TypeScript Version: 2.0
// TypeScript Version: 4.1

@@ -22,0 +22,0 @@ /// <reference types="node"/>

@@ -49,3 +49,3 @@ /**

var setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );
var writeFile = require( './main.js' );
var main = require( './main.js' );
var sync = require( './sync.js' );

@@ -56,3 +56,3 @@

setReadOnly( writeFile, 'sync', sync );
setReadOnly( main, 'sync', sync );

@@ -62,2 +62,2 @@

module.exports = writeFile;
module.exports = main;
{
"name": "@stdlib/fs-write-file",
"version": "0.0.8",
"version": "0.1.0",
"description": "Write data to a file.",

@@ -16,5 +16,2 @@ "license": "Apache-2.0",

],
"bin": {
"write-file": "./bin/cli"
},
"main": "./lib",

@@ -44,19 +41,9 @@ "directories": {

"dependencies": {
"@stdlib/cli-ctor": "^0.0.x",
"@stdlib/fs-read-file": "^0.0.x",
"@stdlib/process-cwd": "^0.0.x",
"@stdlib/process-read-stdin": "^0.0.x",
"@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x"
"@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.0"
},
"devDependencies": {
"@stdlib/assert-is-browser": "^0.0.x",
"@stdlib/assert-is-windows": "^0.0.x",
"@stdlib/bench": "^0.0.x",
"@stdlib/buffer-from-string": "^0.0.x",
"@stdlib/process-exec-path": "^0.0.x",
"@stdlib/string-replace": "^0.0.x",
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
"proxyquire": "^2.0.0",
"istanbul": "^0.4.1",
"tap-spec": "5.x.x"
"tap-min": "git+https://github.com/Planeshifter/tap-min.git"
},

@@ -93,5 +80,5 @@ "engines": {

"funding": {
"type": "patreon",
"url": "https://www.patreon.com/athan"
"type": "opencollective",
"url": "https://opencollective.com/stdlib"
}
}

@@ -21,2 +21,13 @@ <!--

<details>
<summary>
About stdlib...
</summary>
<p>We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.</p>
<p>The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.</p>
<p>When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.</p>
<p>To join us in bringing numerical computing to the web, get started by checking us out on <a href="https://github.com/stdlib-js/stdlib">GitHub</a>, and please consider <a href="https://opencollective.com/stdlib">financially supporting stdlib</a>. We greatly appreciate your continued support!</p>
</details>
# Write File

@@ -174,70 +185,4 @@

* * *
<section class="cli">
## CLI
<section class="installation">
## Installation
To use the module as a general utility, install the module globally
```bash
npm install -g @stdlib/fs-write-file
```
</section>
<!-- CLI usage documentation. -->
<section class="usage">
### Usage
```text
Usage: write-file [options] <filepath>
Options:
-h, --help Print this message.
-V, --version Print the package version.
--enc, --encoding encoding Encoding. Default: 'utf8'.
--flag flag Flag. Default: 'r'.
--mode mode Mode. Default: 0o666.
```
</section>
<!-- /.usage -->
<section class="notes">
### Notes
- Relative output file paths are resolved relative to the current working directory.
- Errors are written to `stderr`.
- File contents should be provided over `stdin` as part of a [standard stream][standard-stream] pipeline.
</section>
<!-- /.notes -->
<section class="examples">
### Examples
```bash
$ printf 'beep boop\n' | write-file ./examples/fixtures/file.txt
```
</section>
<!-- /.examples -->
</section>
<!-- /.cli -->
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->

@@ -247,8 +192,7 @@

* * *
## See Also
- <span class="package-name">[`@stdlib/fs/exists`][@stdlib/fs/exists]</span><span class="delimiter">: </span><span class="description">test whether a path exists on the filesystem.</span>
- <span class="package-name">[`@stdlib/fs/read-file`][@stdlib/fs/read-file]</span><span class="delimiter">: </span><span class="description">read the entire contents of a file.</span>
- <span class="package-name">[`@stdlib/fs-write-file-cli`][@stdlib/fs-write-file-cli]</span><span class="delimiter">: </span><span class="description">CLI package for use as a command-line utility.</span>
- <span class="package-name">[`@stdlib/fs-exists`][@stdlib/fs/exists]</span><span class="delimiter">: </span><span class="description">test whether a path exists on the filesystem.</span>
- <span class="package-name">[`@stdlib/fs-read-file`][@stdlib/fs/read-file]</span><span class="delimiter">: </span><span class="description">read the entire contents of a file.</span>

@@ -285,3 +229,3 @@ </section>

Copyright &copy; 2016-2022. The Stdlib [Authors][stdlib-authors].
Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].

@@ -296,7 +240,9 @@ </section>

[@stdlib/fs-write-file-cli]: https://www.npmjs.com/package/@stdlib/fs-write-file-cli
[npm-image]: http://img.shields.io/npm/v/@stdlib/fs-write-file.svg
[npm-url]: https://npmjs.org/package/@stdlib/fs-write-file
[test-image]: https://github.com/stdlib-js/fs-write-file/actions/workflows/test.yml/badge.svg
[test-url]: https://github.com/stdlib-js/fs-write-file/actions/workflows/test.yml
[test-image]: https://github.com/stdlib-js/fs-write-file/actions/workflows/test.yml/badge.svg?branch=v0.1.0
[test-url]: https://github.com/stdlib-js/fs-write-file/actions/workflows/test.yml?query=branch:v0.1.0

@@ -313,2 +259,13 @@ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/fs-write-file/main.svg

[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
[chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
[stdlib]: https://github.com/stdlib-js/stdlib
[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
[cli-section]: https://github.com/stdlib-js/fs-write-file#cli
[cli-url]: https://github.com/stdlib-js/fs-write-file/tree/cli
[@stdlib/fs-write-file]: https://github.com/stdlib-js/fs-write-file/tree/main
[umd]: https://github.com/umdjs/umd

@@ -320,10 +277,4 @@ [es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules

[esm-url]: https://github.com/stdlib-js/fs-write-file/tree/esm
[branches-url]: https://github.com/stdlib-js/fs-write-file/blob/main/branches.md
[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
[chat-url]: https://gitter.im/stdlib-js/stdlib/
[stdlib]: https://github.com/stdlib-js/stdlib
[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/fs-write-file/main/LICENSE

@@ -335,3 +286,3 @@

[standard-stream]: http://en.wikipedia.org/wiki/Pipeline_%28Unix%29
[standard-stream]: https://en.wikipedia.org/wiki/Pipeline_%28Unix%29

@@ -338,0 +289,0 @@ <!-- <related-links> -->

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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