Initial
This commit is contained in:
21
resources/app/node_modules/module-error/LICENSE
generated
vendored
Normal file
21
resources/app/node_modules/module-error/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Vincent Weevers
|
||||
|
||||
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.
|
||||
22
resources/app/node_modules/module-error/index.js
generated
vendored
Normal file
22
resources/app/node_modules/module-error/index.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = class ModuleError extends Error {
|
||||
/**
|
||||
* @param {string} message Error message
|
||||
* @param {{ code?: string, cause?: Error, expected?: boolean, transient?: boolean }} [options]
|
||||
*/
|
||||
constructor (message, options) {
|
||||
super(message || '')
|
||||
|
||||
if (typeof options === 'object' && options !== null) {
|
||||
if (options.code) this.code = String(options.code)
|
||||
if (options.expected) this.expected = true
|
||||
if (options.transient) this.transient = true
|
||||
if (options.cause) this.cause = options.cause
|
||||
}
|
||||
|
||||
if (Error.captureStackTrace) {
|
||||
Error.captureStackTrace(this, this.constructor)
|
||||
}
|
||||
}
|
||||
}
|
||||
26
resources/app/node_modules/module-error/package.json
generated
vendored
Normal file
26
resources/app/node_modules/module-error/package.json
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "module-error",
|
||||
"version": "1.0.2",
|
||||
"description": "Create errors with code and cause properties",
|
||||
"license": "MIT",
|
||||
"author": "Vincent Weevers",
|
||||
"types": "./index.d.ts",
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"CHANGELOG.md"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@types/node": "^17.0.6",
|
||||
"@voxpelli/tsconfig": "^3.0.0",
|
||||
"hallmark": "^4.0.0",
|
||||
"standard": "^16.0.4",
|
||||
"tape": "^5.3.1",
|
||||
"typescript": "^4.4.4"
|
||||
},
|
||||
"repository": "vweevers/module-error",
|
||||
"homepage": "https://github.com/vweevers/module-error",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user