diff options
| author | ruki <waruqi@gmail.com> | 2018-11-08 00:43:05 +0800 |
|---|---|---|
| committer | ruki <waruqi@gmail.com> | 2018-11-07 22:18:30 +0800 |
| commit | 89e95b3f143682ed9a006991bacf45c9dcba4818 (patch) | |
| tree | 4f44cf41b828577d583890bdd5a1c31e8491a6ba /node_modules/nanoassert | |
| parent | aa7f0199255277949790b41c56e8ec97dd4f0da4 (diff) | |
| download | xmake-docs-vuepress.tar.gz xmake-docs-vuepress.zip | |
remove node_modulesvuepress
Diffstat (limited to 'node_modules/nanoassert')
| -rw-r--r-- | node_modules/nanoassert/LICENSE | 13 | ||||
| -rw-r--r-- | node_modules/nanoassert/README.md | 49 | ||||
| -rw-r--r-- | node_modules/nanoassert/index.js | 22 | ||||
| -rw-r--r-- | node_modules/nanoassert/package.json | 31 | ||||
| -rw-r--r-- | node_modules/nanoassert/test.js | 27 |
5 files changed, 0 insertions, 142 deletions
diff --git a/node_modules/nanoassert/LICENSE b/node_modules/nanoassert/LICENSE deleted file mode 100644 index b45703b8..00000000 --- a/node_modules/nanoassert/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2017, Emil Bay <github@tixz.dk> - -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. diff --git a/node_modules/nanoassert/README.md b/node_modules/nanoassert/README.md deleted file mode 100644 index 799060a5..00000000 --- a/node_modules/nanoassert/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# `nanoassert` - -> Nanoscale assertion module - -## Usage - -```js -var assert = require('nanoassert') - -assert(a !== b, `${a} !== ${b}`) -``` - -## API - -### `assert(declaration, [message])` -### `assert.ok(declaration, [message])` - -Assert that `declaration` is truthy otherwise throw `Error` with -optional `message`, which defaults to `AssertionError`. -If you want friendlier messages you can use template strings to show the -assertion made like in the example above. - -### `assert.notOk(declaration, [message])` - -Assert that `declaration` is not truthy. - -### `assert.equal(a, b, [message])` - -Assert that `a` is loosely equal to `b`. Uses `==` for the comparison. - -### `assert.notEqual(a, b, [message])` - -Assert that `a` is loosely not equal to `b`. Uses `==` for the comparison. - -## Why - -I like to write public facing code very defensively, but have complaints about -the size incurred by the `assert` module. I only use the top-level `assert` -method anyway, so this should make everyone happy :) - -## Install - -```sh -npm install nanoassert -``` - -## License - -[ISC](LICENSE) diff --git a/node_modules/nanoassert/index.js b/node_modules/nanoassert/index.js deleted file mode 100644 index 49361a1f..00000000 --- a/node_modules/nanoassert/index.js +++ /dev/null @@ -1,22 +0,0 @@ -assert.notEqual = notEqual -assert.notOk = notOk -assert.equal = equal -assert.ok = assert - -module.exports = assert - -function equal (a, b, m) { - assert(a == b, m) // eslint-disable-line eqeqeq -} - -function notEqual (a, b, m) { - assert(a != b, m) // eslint-disable-line eqeqeq -} - -function notOk (t, m) { - assert(!t, m) -} - -function assert (t, m) { - if (!t) throw new Error(m || 'AssertionError') -} diff --git a/node_modules/nanoassert/package.json b/node_modules/nanoassert/package.json deleted file mode 100644 index 339a4433..00000000 --- a/node_modules/nanoassert/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "nanoassert", - "version": "1.1.0", - "description": "Nanoscale assertion module", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "tape": "^4.6.3" - }, - "scripts": { - "test": "tape test" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/emilbayes/nanoassert.git" - }, - "keywords": [ - "assert", - "unassert", - "power-assert", - "tiny", - "nano", - "pico" - ], - "author": "Emil Bay <github@tixz.dk>", - "license": "ISC", - "bugs": { - "url": "https://github.com/emilbayes/nanoassert/issues" - }, - "homepage": "https://github.com/emilbayes/nanoassert#readme" -} diff --git a/node_modules/nanoassert/test.js b/node_modules/nanoassert/test.js deleted file mode 100644 index 2aed76fb..00000000 --- a/node_modules/nanoassert/test.js +++ /dev/null @@ -1,27 +0,0 @@ -var assert = require('.') -var test = require('tape') - -test('test', function (t) { - try { - assert(true === true) // test that it doesn't throw - t.pass('does not throw on truthy') - } catch (e) { - t.fail() - } - - t.throws(assert.bind(null, false), 'throws on falsy') - - try { - assert(false) - } catch (e) { - t.equal(e.message, 'AssertionError', 'default message') - } - - try { - assert(false, 'hello world') - } catch (e) { - t.equal(e.message, 'hello world', 'custom message') - } - - t.end() -}) |
