Socket
Book a DemoInstallSign in
Socket

@duskit/error

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@duskit/error

[![Duskit CI](https://github.com/dusk-network/duskit/actions/workflows/ci.yml/badge.svg)](https://github.com/dusk-network/duskit/actions/workflows/ci.yml) [![NPM version](https://img.shields.io/npm/v/@duskit/error.svg)](https://www.npmjs.com/package/@dusk

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
0
Created
Source

@duskit/error

Duskit CI NPM version

Functions for creating and managing errors.

TOC

Dev environment

The dev environment assumes that you have at least Node.js v22.11.0 installed. The LTS version is 22.11.0 at the time of writing.

This package is part of the Duskit monorepo. Please refer to the main README for monorepo usage, changeset management and installation of dependencies.

[back to TOC]

Installation and usage

Install it with your favourite package manager:

npm install @duskit/error --save

Import the functions you need:

import { getErrorFrom } from "@duskit/error";

getErrorFrom("invalid data"); // => Error: invalid data

[back to TOC]

NPM scripts

  • npm run checks - runs all health checks (formatting, linting, type checking, tests)
  • npm run clean - removes the coverage, docs and node_modules folders
  • npm run docs - generates the HTML documentation in the docs folder
  • npm run format - fixes the formatting in all files
  • npm run format:check - performs the formatting check
  • npm run lint - performs the linting check
  • npm run lint:fix - fixes, where possible, linting errors
  • npm run test - runs the test suite
  • npm run test:coverage - runs the test suite and generates the code coverage report in the coverage folder
  • npm run test:watch - runs the test suite in watch mode
  • npm run typecheck - runs the type checker
  • npm run typecheck:watch - runs the type checker in watch mode

[back to TOC]

FAQs

Package last updated on 31 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts