first commit

This commit is contained in:
s.golasch
2023-08-01 13:49:46 +02:00
commit 1fc239fd54
20238 changed files with 3112246 additions and 0 deletions

43
build/node_modules/read-chunk/index.js generated vendored Normal file
View File

@@ -0,0 +1,43 @@
'use strict';
var fs = require('fs');
module.exports = function (filepath, pos, len, cb) {
var buf = new Buffer(len);
fs.open(filepath, 'r', function (err, fd) {
if (err) {
return cb(err);
}
fs.read(fd, buf, 0, len, pos, function (err, bytesRead, buf) {
if (err) {
return cb(err);
}
fs.close(fd, function (err) {
if (err) {
return cb(err);
}
if (bytesRead < len) {
buf = buf.slice(0, bytesRead);
}
cb(null, buf);
});
});
});
};
module.exports.sync = function (filepath, pos, len) {
var buf = new Buffer(len);
var fd = fs.openSync(filepath, 'r');
var bytesRead = fs.readSync(fd, buf, 0, len, pos);
fs.closeSync(fd);
if (bytesRead < len) {
buf = buf.slice(0, bytesRead);
}
return buf;
};

73
build/node_modules/read-chunk/package.json generated vendored Normal file
View File

@@ -0,0 +1,73 @@
{
"_args": [
[
"read-chunk@1.0.1",
"/Users/asciidisco/Desktop/asciidisco.com/build"
]
],
"_from": "read-chunk@1.0.1",
"_id": "read-chunk@1.0.1",
"_inBundle": false,
"_integrity": "sha1-X2jKswfmY/GZk1J9m1icrORmEZQ=",
"_location": "/read-chunk",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "read-chunk@1.0.1",
"name": "read-chunk",
"escapedName": "read-chunk",
"rawSpec": "1.0.1",
"saveSpec": null,
"fetchSpec": "1.0.1"
},
"_requiredBy": [
"/jimp"
],
"_resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-1.0.1.tgz",
"_spec": "1.0.1",
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "http://sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/read-chunk/issues"
},
"description": "Read a chunk from a file",
"devDependencies": {
"mocha": "*"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/sindresorhus/read-chunk#readme",
"keywords": [
"read",
"file",
"readfile",
"fs",
"chunk",
"slice",
"part",
"head",
"tail",
"buffer",
"fd",
"open"
],
"license": "MIT",
"name": "read-chunk",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/read-chunk.git"
},
"scripts": {
"test": "mocha"
},
"version": "1.0.1"
}

61
build/node_modules/read-chunk/readme.md generated vendored Normal file
View File

@@ -0,0 +1,61 @@
# read-chunk [![Build Status](https://travis-ci.org/sindresorhus/read-chunk.svg?branch=master)](https://travis-ci.org/sindresorhus/read-chunk)
> Read a chunk from a file
Because the built-in way is too much boilerplate.
## Install
```sh
$ npm install --save read-chunk
```
## Usage
```js
var readChunk = require('read-chunk');
// foo.txt => hello
readChunk.sync('foo.txt', 1, 3);
//=> ell
```
## API
### readChunk(filepath, position, length, callback)
#### filepath
Type: `string`
#### position
Type: `number`
Position to start reading.
#### length
Type: `number`
Number of bytes to read.
#### callback(error, buffer)
Type: `function`
### readChunk.sync(filepath, start, length)
Same arguments as `readChunk` except the callback.
Returns a buffer.
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)