mirror of
https://github.com/bcomnes/deploy-to-neocities.git
synced 2026-01-21 00:46:29 +00:00
commit node_modules
This commit is contained in:
18
node_modules/nanoassert/index.js
generated
vendored
Normal file
18
node_modules/nanoassert/index.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
module.exports = assert
|
||||
|
||||
class AssertionError extends Error {}
|
||||
AssertionError.prototype.name = 'AssertionError'
|
||||
|
||||
/**
|
||||
* Minimal assert function
|
||||
* @param {any} t Value to check if falsy
|
||||
* @param {string=} m Optional assertion error message
|
||||
* @throws {AssertionError}
|
||||
*/
|
||||
function assert (t, m) {
|
||||
if (!t) {
|
||||
var err = new AssertionError(m)
|
||||
if (Error.captureStackTrace) Error.captureStackTrace(err, assert)
|
||||
throw err
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user