added unit testing, and started implementing unit tests...phew

This commit is contained in:
Josh Burman
2019-03-12 22:28:02 -04:00
parent 74aad4a957
commit e8c2539f1b
3489 changed files with 464813 additions and 88 deletions

5
node_modules/browser-stdout/LICENSE generated vendored Normal file
View File

@ -0,0 +1,5 @@
Copyright 2018 kumavis
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

40
node_modules/browser-stdout/README.md generated vendored Normal file
View File

@ -0,0 +1,40 @@
### wat?
`process.stdout` in your browser.
### wai?
iono. cuz hakz.
### hau?
```js
var BrowserStdout = require('browser-stdout')
myStream.pipe(BrowserStdout())
```
### monkey
You can monkey-patch `process.stdout` for your dependency graph like this:
```
process.stdout = require('browser-stdout')()
var coolTool = require('module-that-uses-stdout-somewhere-in-its-depths')
```
### opts
opts are passed directly to `stream.Writable`.
additionally, a label arg can be used to label console output.
```js
BrowserStdout({
objectMode: true,
label: 'dataz',
})
```
### ur doin it rong
i accept pr's.

25
node_modules/browser-stdout/index.js generated vendored Normal file
View File

@ -0,0 +1,25 @@
var WritableStream = require('stream').Writable
var inherits = require('util').inherits
module.exports = BrowserStdout
inherits(BrowserStdout, WritableStream)
function BrowserStdout(opts) {
if (!(this instanceof BrowserStdout)) return new BrowserStdout(opts)
opts = opts || {}
WritableStream.call(this, opts)
this.label = (opts.label !== undefined) ? opts.label : 'stdout'
}
BrowserStdout.prototype._write = function(chunks, encoding, cb) {
var output = chunks.toString ? chunks.toString() : chunks
if (this.label === false) {
console.log(output)
} else {
console.log(this.label+':', output)
}
process.nextTick(cb)
}

46
node_modules/browser-stdout/package.json generated vendored Normal file
View File

@ -0,0 +1,46 @@
{
"_from": "browser-stdout@1.3.1",
"_id": "browser-stdout@1.3.1",
"_inBundle": false,
"_integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
"_location": "/browser-stdout",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "browser-stdout@1.3.1",
"name": "browser-stdout",
"escapedName": "browser-stdout",
"rawSpec": "1.3.1",
"saveSpec": null,
"fetchSpec": "1.3.1"
},
"_requiredBy": [
"/mocha"
],
"_resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
"_shasum": "baa559ee14ced73452229bad7326467c61fabd60",
"_spec": "browser-stdout@1.3.1",
"_where": "/Users/josh.burman/Projects/braid/node_modules/mocha",
"author": {
"name": "kumavis"
},
"bugs": {
"url": "https://github.com/kumavis/browser-stdout/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "`process.stdout` in your browser.",
"homepage": "https://github.com/kumavis/browser-stdout#readme",
"license": "ISC",
"main": "index.js",
"name": "browser-stdout",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/kumavis/browser-stdout.git"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "1.3.1"
}