New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@perfective/error

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@perfective/error - npm Package Compare versions

Comparing version 0.2.0-alpha.3 to 0.2.0-alpha.4

dist/cjs/error/error.d.ts

15

package.json
{
"name": "@perfective/error",
"version": "0.2.0-alpha.3",
"version": "0.2.0-alpha.4",
"description": "Functions for the Error and other types to handle exceptions",

@@ -21,4 +21,9 @@ "keywords": [

"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"main": "dist/cjs/index.js",
"module": "dist/mjs/index.mjs",
"types": "dist/mjs/index.d.ts",
"exports": {
"import": "dist/mjs/index.mjs",
"require": "dist/cjs/index.cjs"
},
"files": [

@@ -29,4 +34,6 @@ "dist"

"scripts": {
"build": "tsc --project ./tsconfig.build.json",
"build": "npm run build:cjs && npm run build:mjs",
"build:clean": "npm run clean && npm run build",
"build:cjs": "tsc --project tsconfig.build.cjs.json",
"build:mjs": "tsc --project ./tsconfig.build.mjs.json && mv dist/mjs/index.js dist/mjs/index.mjs",
"clean": "rm -rf dist && rm -f *.tsbuildinfo",

@@ -33,0 +40,0 @@ "lint": "npm run lint:eslint; npm run lint:tslint",

@@ -15,6 +15,6 @@ # Error

— outputs the stack of all error messages.
* `exception(message: string, context: ExceptionContext = {}): Exception`
— creates a new `Exception` without a previous error.
* `causedBy(previous: Error, message: string, context: ExceptionContext = {}): Exception`
— creates a new `Exception` with a previous error.
* `exception(message: string, tokens: ExceptionTokens = {}, context: ExceptionContext = {}): Exception`
— creates an `Exception` without a previous error.
* `causedBy(previous: Error, message: string, tokens: ExceptionTokens = {}, context: ExceptionContext = {}): Exception`
— creates an `Exception` with a previous error.
* `isException<T>(value: Exception | T): value is Exception`

@@ -28,2 +28,7 @@ — returns `true` when value is an `Exception`.

— returns the first error in the chain.
* `ExceptionMessage`:
* `exceptionMessage(template: string, tokens?: ExceptionTokens): ExceptionMessage`
— creates an `ExceptionMessage` with an empty tokens object if the argument not provided.
* `exceptionMessageOutput(message: ExceptionMessage): string`
— creates a string to output an `ExceptionMessage`.
* Throwing errors:

@@ -30,0 +35,0 @@ * `throws<E extends Error>(error: E): never`

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc