🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

bare-assert

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bare-assert - npm Package Compare versions

Comparing version
1.0.1
to
1.0.2
+18
index.d.ts
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 @@

{
"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"
}
}