Regenerating node_modules
This commit is contained in:
parent
09b4a82c83
commit
c96f84308a
5488 changed files with 487362 additions and 60779 deletions
52
node_modules/get-stdin/index.js
generated
vendored
Normal file
52
node_modules/get-stdin/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
'use strict';
|
||||
const stdin = process.stdin;
|
||||
|
||||
module.exports = () => {
|
||||
let ret = '';
|
||||
|
||||
return new Promise(resolve => {
|
||||
if (stdin.isTTY) {
|
||||
resolve(ret);
|
||||
return;
|
||||
}
|
||||
|
||||
stdin.setEncoding('utf8');
|
||||
|
||||
stdin.on('readable', () => {
|
||||
let chunk;
|
||||
|
||||
while ((chunk = stdin.read())) {
|
||||
ret += chunk;
|
||||
}
|
||||
});
|
||||
|
||||
stdin.on('end', () => {
|
||||
resolve(ret);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.buffer = () => {
|
||||
const ret = [];
|
||||
let len = 0;
|
||||
|
||||
return new Promise(resolve => {
|
||||
if (stdin.isTTY) {
|
||||
resolve(Buffer.concat([]));
|
||||
return;
|
||||
}
|
||||
|
||||
stdin.on('readable', () => {
|
||||
let chunk;
|
||||
|
||||
while ((chunk = stdin.read())) {
|
||||
ret.push(chunk);
|
||||
len += chunk.length;
|
||||
}
|
||||
});
|
||||
|
||||
stdin.on('end', () => {
|
||||
resolve(Buffer.concat(ret, len));
|
||||
});
|
||||
});
|
||||
};
|
||||
9
node_modules/get-stdin/license
generated
vendored
Normal file
9
node_modules/get-stdin/license
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
35
node_modules/get-stdin/package.json
generated
vendored
Normal file
35
node_modules/get-stdin/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"name": "get-stdin",
|
||||
"version": "6.0.0",
|
||||
"description": "Get stdin as a string or buffer",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/get-stdin",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava test.js test-buffer.js && echo unicorns | node test-real.js"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"std",
|
||||
"stdin",
|
||||
"stdio",
|
||||
"concat",
|
||||
"buffer",
|
||||
"stream",
|
||||
"process",
|
||||
"read"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
}
|
||||
}
|
||||
55
node_modules/get-stdin/readme.md
generated
vendored
Normal file
55
node_modules/get-stdin/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
# get-stdin [](https://travis-ci.org/sindresorhus/get-stdin)
|
||||
|
||||
> Get [stdin](https://nodejs.org/api/process.html#process_process_stdin) as a string or buffer
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install get-stdin
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// example.js
|
||||
const getStdin = require('get-stdin');
|
||||
|
||||
getStdin().then(str => {
|
||||
console.log(str);
|
||||
//=> 'unicorns'
|
||||
});
|
||||
```
|
||||
|
||||
```
|
||||
$ echo unicorns | node example.js
|
||||
unicorns
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
Both methods returns a promise that is resolved when the `end` event fires on the `stdin` stream, indicating that there is no more data to be read.
|
||||
|
||||
### getStdin()
|
||||
|
||||
Get `stdin` as a `string`.
|
||||
|
||||
In a TTY context, a promise that resolves to an empty string is returned.
|
||||
|
||||
### getStdin.buffer()
|
||||
|
||||
Get `stdin` as a `Buffer`.
|
||||
|
||||
In a TTY context, a promise that resolves to an empty buffer is returned.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [get-stream](https://github.com/sindresorhus/get-stream) - Get a stream as a string or buffer
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
Loading…
Add table
Add a link
Reference in a new issue