Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

defekt

Package Overview
Dependencies
Maintainers
3
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

defekt - npm Package Compare versions

Comparing version 6.0.1 to 6.0.2

build/lib/formatErrorMessage.d.ts

7

build/lib/defekt.js
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.defekt = void 0;
const humanize_string_1 = __importDefault(require("humanize-string"));
const formatErrorMessage_1 = require("./formatErrorMessage");
const defekt = function (errorDefinitions) {

@@ -17,3 +14,3 @@ var _a;

/* eslint-disable default-param-last */
constructor(message = `${humanize_string_1.default(errorName)}.`, { cause, data } = {}) {
constructor(message = formatErrorMessage_1.formatErrorMessage({ errorName }), { cause, data } = {}) {
/* eslint-enable default-param-last */

@@ -20,0 +17,0 @@ super();

@@ -0,1 +1,8 @@

## [6.0.2](https://github.com/thenativeweb/defekt/compare/6.0.1...6.0.2) (2021-01-20)
### Bug Fixes
* Replace humanize string with own implementation. ([#250](https://github.com/thenativeweb/defekt/issues/250)) ([da09278](https://github.com/thenativeweb/defekt/commit/da092783b1651a8d537a6e1952d1b890bfadbac2))
## [6.0.1](https://github.com/thenativeweb/defekt/compare/6.0.0...6.0.1) (2020-11-26)

@@ -2,0 +9,0 @@

import { CustomError } from './CustomError';
import { ErrorConstructors } from './ErrorConstructors';
import humanizeString from 'humanize-string';
import { formatErrorMessage } from './formatErrorMessage';

@@ -29,3 +29,3 @@ const defekt = function <TErrorDefinition extends Record<string, { code?: string }>>

/* eslint-disable default-param-last */
public constructor (message = `${humanizeString(errorName)}.`, {
public constructor (message = formatErrorMessage({ errorName }), {
cause,

@@ -32,0 +32,0 @@ data

The MIT License (MIT)
Copyright (c) 2015-2020 the native web.
Copyright (c) 2015-2021 the native web.

@@ -4,0 +4,0 @@ 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:

{
"name": "defekt",
"version": "6.0.1",
"version": "6.0.2",
"description": "defekt is custom errors made simple.",

@@ -21,2 +21,10 @@ "contributors": [

"email": "hannes.leutloff@thenativeweb.io"
},
{
"name": "Alexander Kampf",
"email": "alexander.kampf@thenativeweb.io"
},
{
"name": "Noah Hummel",
"email": "noah.hummel@thenativeweb.io"
}

@@ -26,9 +34,7 @@ ],

"types": "build/lib/index.d.ts",
"dependencies": {
"humanize-string": "2.1.0"
},
"dependencies": {},
"devDependencies": {
"assertthat": "5.2.1",
"roboter": "11.5.14",
"semantic-release-configuration": "1.0.28"
"roboter": "11.6.4",
"semantic-release-configuration": "1.0.30"
},

@@ -35,0 +41,0 @@ "repository": {

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