aboutsummaryrefslogtreecommitdiff
path: root/node_modules/better-assert
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/better-assert')
-rw-r--r--node_modules/better-assert/.npmignore4
-rw-r--r--node_modules/better-assert/History.md15
-rw-r--r--node_modules/better-assert/Makefile5
-rw-r--r--node_modules/better-assert/Readme.md61
-rw-r--r--node_modules/better-assert/example.js10
-rw-r--r--node_modules/better-assert/index.js38
-rw-r--r--node_modules/better-assert/package.json27
7 files changed, 0 insertions, 160 deletions
diff --git a/node_modules/better-assert/.npmignore b/node_modules/better-assert/.npmignore
deleted file mode 100644
index f1250e584..000000000
--- a/node_modules/better-assert/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-support
-test
-examples
-*.sock
diff --git a/node_modules/better-assert/History.md b/node_modules/better-assert/History.md
deleted file mode 100644
index cbb579bea..000000000
--- a/node_modules/better-assert/History.md
+++ /dev/null
@@ -1,15 +0,0 @@
-
-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
diff --git a/node_modules/better-assert/Makefile b/node_modules/better-assert/Makefile
deleted file mode 100644
index 36a3ed7d0..000000000
--- a/node_modules/better-assert/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-test:
- @echo "populate me"
-
-.PHONY: test \ No newline at end of file
diff --git a/node_modules/better-assert/Readme.md b/node_modules/better-assert/Readme.md
deleted file mode 100644
index d8d3a63b6..000000000
--- a/node_modules/better-assert/Readme.md
+++ /dev/null
@@ -1,61 +0,0 @@
-
-# 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. \ No newline at end of file
diff --git a/node_modules/better-assert/example.js b/node_modules/better-assert/example.js
deleted file mode 100644
index 688c29e8a..000000000
--- a/node_modules/better-assert/example.js
+++ /dev/null
@@ -1,10 +0,0 @@
-
-var assert = require('./');
-
-test();
-
-function test() {
- var user = { name: 'tobi' };
- assert('tobi' == user.name);
- assert('number' == typeof user.age);
-} \ No newline at end of file
diff --git a/node_modules/better-assert/index.js b/node_modules/better-assert/index.js
deleted file mode 100644
index fd1c9b7d1..000000000
--- a/node_modules/better-assert/index.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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;
-}
diff --git a/node_modules/better-assert/package.json b/node_modules/better-assert/package.json
deleted file mode 100644
index ae0463507..000000000
--- a/node_modules/better-assert/package.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "name": "better-assert",
- "version": "1.0.2",
- "description": "Better assertions for node, reporting the expr, filename, lineno etc",
- "keywords": [
- "assert",
- "stack",
- "trace",
- "debug"
- ],
- "author": "TJ Holowaychuk <tj@vision-media.ca>",
- "contributors": [
- "TonyHe <coolhzb@163.com>",
- "ForbesLindesay"
- ],
- "dependencies": {
- "callsite": "1.0.0"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/visionmedia/better-assert.git"
- },
- "main": "index",
- "engines": {
- "node": "*"
- }
-}