This commit is contained in:
tatianamac
2019-11-26 14:50:43 -08:00
parent 8a55660ed0
commit 6d5445ecc5
13894 changed files with 2233957 additions and 0 deletions

4
node_modules/better-assert/.npmignore generated vendored Normal file
View File

@ -0,0 +1,4 @@
support
test
examples
*.sock

15
node_modules/better-assert/History.md generated vendored Normal file
View File

@ -0,0 +1,15 @@
1.0.0 / 2013-02-03
==================
* Stop using the removed magic __stack global getter
0.1.0 / 2012-10-04
==================
* add throwing of AssertionError for test frameworks etc
0.0.1 / 2010-01-03
==================
* Initial release

5
node_modules/better-assert/Makefile generated vendored Normal file
View File

@ -0,0 +1,5 @@
test:
@echo "populate me"
.PHONY: test

61
node_modules/better-assert/Readme.md generated vendored Normal file
View File

@ -0,0 +1,61 @@
# better-assert
Better c-style assertions using [callsite](https://github.com/visionmedia/callsite) for
self-documenting failure messages.
## Installation
$ npm install better-assert
## Example
By default assertions are enabled, however the __NO_ASSERT__ environment variable
will deactivate them when truthy.
```js
var assert = require('better-assert');
test();
function test() {
var user = { name: 'tobi' };
assert('tobi' == user.name);
assert('number' == typeof user.age);
}
AssertionError: 'number' == typeof user.age
at test (/Users/tj/projects/better-assert/example.js:9:3)
at Object.<anonymous> (/Users/tj/projects/better-assert/example.js:4:1)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
```
## License
(The MIT License)
Copyright (c) 2012 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
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.

10
node_modules/better-assert/example.js generated vendored Normal file
View File

@ -0,0 +1,10 @@
var assert = require('./');
test();
function test() {
var user = { name: 'tobi' };
assert('tobi' == user.name);
assert('number' == typeof user.age);
}

38
node_modules/better-assert/index.js generated vendored Normal file
View File

@ -0,0 +1,38 @@
/**
* Module dependencies.
*/
var AssertionError = require('assert').AssertionError
, callsite = require('callsite')
, fs = require('fs')
/**
* Expose `assert`.
*/
module.exports = process.env.NO_ASSERT
? function(){}
: assert;
/**
* Assert the given `expr`.
*/
function assert(expr) {
if (expr) return;
var stack = callsite();
var call = stack[1];
var file = call.getFileName();
var lineno = call.getLineNumber();
var src = fs.readFileSync(file, 'utf8');
var line = src.split('\n')[lineno-1];
var src = line.match(/assert\((.*)\)/)[1];
var err = new AssertionError({
message: src,
stackStartFunction: stack[0].getFunction()
});
throw err;
}

68
node_modules/better-assert/package.json generated vendored Normal file
View File

@ -0,0 +1,68 @@
{
"_args": [
[
"better-assert@1.0.2",
"/Users/tatiana/selfdefined"
]
],
"_from": "better-assert@1.0.2",
"_id": "better-assert@1.0.2",
"_inBundle": false,
"_integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=",
"_location": "/better-assert",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "better-assert@1.0.2",
"name": "better-assert",
"escapedName": "better-assert",
"rawSpec": "1.0.2",
"saveSpec": null,
"fetchSpec": "1.0.2"
},
"_requiredBy": [
"/parseqs",
"/parseuri"
],
"_resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz",
"_spec": "1.0.2",
"_where": "/Users/tatiana/selfdefined",
"author": {
"name": "TJ Holowaychuk",
"email": "tj@vision-media.ca"
},
"bugs": {
"url": "https://github.com/visionmedia/better-assert/issues"
},
"contributors": [
{
"name": "TonyHe",
"email": "coolhzb@163.com"
},
{
"name": "ForbesLindesay"
}
],
"dependencies": {
"callsite": "1.0.0"
},
"description": "Better assertions for node, reporting the expr, filename, lineno etc",
"engines": {
"node": "*"
},
"homepage": "https://github.com/visionmedia/better-assert#readme",
"keywords": [
"assert",
"stack",
"trace",
"debug"
],
"main": "index",
"name": "better-assert",
"repository": {
"type": "git",
"url": "git+https://github.com/visionmedia/better-assert.git"
},
"version": "1.0.2"
}