Add node_modules

This commit is contained in:
Anton Medvedev 2023-01-10 16:49:41 +01:00
parent e1f786311a
commit 554eb0b122
994 changed files with 195567 additions and 0 deletions

6
node_modules/duplexer/.travis.yml generated vendored Normal file
View file

@ -0,0 +1,6 @@
language: node_js
node_js:
- "0.11"
- "0.10"
- "0.8"
- "0.6"

19
node_modules/duplexer/LICENCE generated vendored Normal file
View file

@ -0,0 +1,19 @@
Copyright (c) 2012 Raynos.
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.

49
node_modules/duplexer/README.md generated vendored Normal file
View file

@ -0,0 +1,49 @@
# duplexer
[![build status][1]][2] [![dependency status][3]][4]
[![browser support][5]][6]
Creates a duplex stream
Taken from [event-stream][7]
## duplex (writeStream, readStream)
Takes a writable stream and a readable stream and makes them appear as a readable writable stream.
It is assumed that the two streams are connected to each other in some way.
## Example
```js
var cp = require('child_process')
, duplex = require('duplexer')
, grep = cp.exec('grep Stream')
duplex(grep.stdin, grep.stdout)
```
## Installation
`npm install duplexer`
## Tests
`npm test`
## Contributors
- Dominictarr
- Raynos
- samccone
## MIT Licenced
[1]: https://secure.travis-ci.org/Raynos/duplexer.png
[2]: https://travis-ci.org/Raynos/duplexer
[3]: https://david-dm.org/Raynos/duplexer.png
[4]: https://david-dm.org/Raynos/duplexer
[5]: https://ci.testling.com/Raynos/duplexer.png
[6]: https://ci.testling.com/Raynos/duplexer
[7]: https://github.com/dominictarr/event-stream#duplex-writestream-readstream

87
node_modules/duplexer/index.js generated vendored Normal file
View file

@ -0,0 +1,87 @@
var Stream = require("stream")
var writeMethods = ["write", "end", "destroy"]
var readMethods = ["resume", "pause"]
var readEvents = ["data", "close"]
var slice = Array.prototype.slice
module.exports = duplex
function forEach (arr, fn) {
if (arr.forEach) {
return arr.forEach(fn)
}
for (var i = 0; i < arr.length; i++) {
fn(arr[i], i)
}
}
function duplex(writer, reader) {
var stream = new Stream()
var ended = false
forEach(writeMethods, proxyWriter)
forEach(readMethods, proxyReader)
forEach(readEvents, proxyStream)
reader.on("end", handleEnd)
writer.on("drain", function() {
stream.emit("drain")
})
writer.on("error", reemit)
reader.on("error", reemit)
stream.writable = writer.writable
stream.readable = reader.readable
return stream
function proxyWriter(methodName) {
stream[methodName] = method
function method() {
return writer[methodName].apply(writer, arguments)
}
}
function proxyReader(methodName) {
stream[methodName] = method
function method() {
stream.emit(methodName)
var func = reader[methodName]
if (func) {
return func.apply(reader, arguments)
}
reader.emit(methodName)
}
}
function proxyStream(methodName) {
reader.on(methodName, reemit)
function reemit() {
var args = slice.call(arguments)
args.unshift(methodName)
stream.emit.apply(stream, args)
}
}
function handleEnd() {
if (ended) {
return
}
ended = true
var args = slice.call(arguments)
args.unshift("end")
stream.emit.apply(stream, args)
}
function reemit(err) {
stream.emit("error", err)
}
}

42
node_modules/duplexer/package.json generated vendored Normal file
View file

@ -0,0 +1,42 @@
{
"name": "duplexer",
"version": "0.1.2",
"description": "Creates a duplex stream",
"keywords": [],
"author": "Raynos <raynos2@gmail.com>",
"repository": "git://github.com/Raynos/duplexer.git",
"main": "index",
"homepage": "https://github.com/Raynos/duplexer",
"contributors": [
{
"name": "Jake Verbaten"
}
],
"bugs": {
"url": "https://github.com/Raynos/duplexer/issues",
"email": "raynos2@gmail.com"
},
"devDependencies": {
"tape": "0.3.3",
"through": "~0.1.4"
},
"license": "MIT",
"scripts": {
"test": "node test"
},
"testling": {
"files": "test/index.js",
"browsers": [
"ie/8..latest",
"firefox/16..latest",
"firefox/nightly",
"chrome/22..latest",
"chrome/canary",
"opera/12..latest",
"opera/next",
"safari/5.1..latest",
"ipad/6.0..latest",
"iphone/6.0..latest"
]
}
}

31
node_modules/duplexer/test/index.js generated vendored Normal file
View file

@ -0,0 +1,31 @@
var through = require("through")
var test = require("tape")
var duplex = require("../index")
var readable = through()
var writable = through(write)
var written = 0
var data = 0
var stream = duplex(writable, readable)
function write() {
written++
}
stream.on("data", ondata)
function ondata() {
data++
}
test("emit and write", function(t) {
t.plan(2)
stream.write()
readable.emit("data")
t.equal(written, 1, "should have written once")
t.equal(data, 1, "should have received once")
})