schnee effeckt und fehler Korektur

This commit is contained in:
2023-08-14 17:52:24 +02:00
parent 4a843d4936
commit 79af4e9907
6813 changed files with 343821 additions and 356128 deletions

104
node_modules/exec-buffer/readme.md generated vendored
View File

@@ -2,82 +2,80 @@
> Run a Buffer through a child process
## Install
```ba
$ npm install --save exec-buffer
```
$ npm install exec-buffer
```
## Usage
```js
var ExecBuffer = require('exec-buffer');
var fs = require('fs');
var gifsicle = require('gifsicle').path;
const fs = require('fs');
const execBuffer = require('exec-buffer');
const gifsicle = require('gifsicle').path;
var execBuffer = new ExecBuffer();
execBuffer.use(gifsicle, ['-o', execBuffer.dest(), execBuffer.src()]);
execBuffer.run(fs.readFileSync('test.gif'), function (err, data) {
if (err) {
throw err;
}
console.log(data);
//=> <Buffer 47 49 46 38 37 61 ...>
});
execBuffer({
input: fs.readFileSync('test.gif'),
bin: gifsicle,
args: ['-o', execBuffer.output, execBuffer.input]
}).then(data => {
console.log(data);
//=> <Buffer 47 49 46 38 37 61 ...>
});
```
## API
### new ExecBuffer()
### execBuffer(options)
Creates a new `ExecBuffer` instance.
#### options
### .use(bin, args)
Type: `Object`
#### bin
Type: `String`
Path to the binary.
#### args
Type: `Array`
Arguments to run the binary with.
### .src(path)
#### path
Type: `String`
Set or get the temporary source path.
### .dest(path)
#### path
Type: `String`
Set or get the temporary destination path.
### .run(buf, cb)
#### buf
##### input
Type: `Buffer`
The `Buffer` to be ran through the child process.
#### cb(err, data, stderr)
##### bin
Type: `Function`
Type: `string`
Path to the binary.
##### args
Type: `Array`
Arguments to run the binary with.
#### inputPath
Type: `string`<br>
Default: `tempfile()`
Where `input` will be written to. In most cases you don't need to set this.
#### outputPath
Type: `string`<br>
Default: `tempfile()`
Where output file will be written to. In most cases you don't need to set this.
### execBuffer.input
Returns a temporary path to where the input file will be written.
### execBuffer.output
Returns a temporary path to where the output file will be written.
Returns a `Buffer` with the new `data` and any `stderr` output.
## License