bare-assert
Advanced tools
+18
| declare function assert(value: any, message?: string | Error): void | ||
| declare namespace assert { | ||
| class AssertionError extends Error { | ||
| constructor(opts?: { | ||
| message?: string | ||
| actual?: any | ||
| expected?: any | ||
| operator?: string | ||
| }) | ||
| actual?: any | ||
| expected?: any | ||
| operator?: string | ||
| } | ||
| } | ||
| export = assert |
+2
-7
| class AssertionError extends Error { | ||
| constructor(opts = {}) { | ||
| const { | ||
| message = null, | ||
| actual, | ||
| expected, | ||
| operator, | ||
| } = opts | ||
| const { message = null, actual, expected, operator } = opts | ||
@@ -18,3 +13,3 @@ super(message) | ||
| module.exports = exports = function assert (value, message) { | ||
| module.exports = exports = function assert(value, message) { | ||
| if (value) return | ||
@@ -21,0 +16,0 @@ |
+14
-6
| { | ||
| "name": "bare-assert", | ||
| "version": "1.0.1", | ||
| "version": "1.0.2", | ||
| "description": "Assertion library for JavaScript", | ||
| "main": "index.js", | ||
| "exports": { | ||
| ".": { | ||
| "types": "./index.d.ts", | ||
| "default": "./index.js" | ||
| }, | ||
| "./package": "./package.json" | ||
| }, | ||
| "files": [ | ||
| "index.js" | ||
| "index.js", | ||
| "index.d.ts" | ||
| ], | ||
| "scripts": { | ||
| "test": "standard && bare test.js" | ||
| "test": "prettier . --check && bare test.js" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/holepunchto/bare-assert.git" | ||
| "url": "git+https://github.com/holepunchto/bare-assert.git" | ||
| }, | ||
@@ -24,4 +31,5 @@ "author": "Holepunch", | ||
| "brittle": "^3.1.1", | ||
| "standard": "^17.0.0" | ||
| "prettier": "^3.4.2", | ||
| "prettier-config-standard": "^7.0.0" | ||
| } | ||
| } |
13113
3.88%5
25%32
45.45%3
50%