New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

copy-file-content

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

copy-file-content - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

0

bin/index.js

@@ -0,0 +0,0 @@ #!/usr/bin/env node

2

bin/version.js

@@ -1,1 +0,1 @@

export const VERSION = '1.0.0';
export const VERSION = '1.0.1';

@@ -0,0 +0,0 @@ import { copy } from 'copy-paste';

{
"name": "copy-file-content",
"version": "1.0.0",
"version": "1.0.1",
"description": "Copy file content to clipboard",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -0,0 +0,0 @@ import { readFile, writeFile } from 'fs/promises';

@@ -25,9 +25,10 @@ # copy-file-content

```
```shell
copy-file-content file.html
```
After this, the file content will be avaiable in the clipboard
### Using the package as a dependency
Add the package as a dependency
```
```shell
pnpm add copy-file-content

@@ -43,2 +44,3 @@ ```

```
After this, the file content will be avaiable in the clipboard

@@ -51,6 +53,19 @@ ## Arguments

You can also use the arguments as options in the second arguments of the exported function `copyFileContent`
You can also use the arguments as options in the second argument of the exported function `copyFileContent`, like this:
```typescript
import { copyFileContent } from 'copy-file-content';
await copyFileContent('file.html', { encoding: 'utf-16' });
```
## Requirements
Node.js version 16 or superior
Node.js version 16 or superior
## Notes
- This package only works in a Node.js environments, it was not tested in the browser
- This package is ESM only, it was not tested with CommonJS
- This package only works with text files. It will not copy the content of a .xlsx, for example
- This package does not validate how big the file is, I made it to be used with small files

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