Socket
Book a DemoInstallSign in
Socket

@cnpmjs/errors

Package Overview
Dependencies
Maintainers
5
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cnpmjs/errors

cnpm errors

1.0.2
latest
Source
npmnpm
Version published
Maintainers
5
Created
Source

What

cnpm errors. A framework aiming at automatically fixing user falsies.

Why

Normally when coming across a misuse of framework, the framework developer tends to print a message to inform users the right way.

This framework provides a way to automatically fix misuses. Both framework developers and users should save their lives when things could be done with codes.

Installation

npm i -S @cnpmjs/errors

Usage

  • JS Code sample
const { ErrorRunner, ErrorEnum } = require('@cnpmjs/errors');
const error = new ErrorRunner({
  path: path.join('/path/to/your/error/folder'), // error config folders
  lang: 'zh-cn', // i18n
  loglevel: ErrorEnum.Info, // global error level
});

// run customized error
await error.test(new CustomizedError());
  • Error configuration Checkout the example folders or integration tests for full usage showcase.

Keywords

cnpm

FAQs

Package last updated on 27 Sep 2022

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.