# nv-error-basic

> nv-error-basic =============== - two simple function for error to/from json

Latest version **1.0.1** (published 2022-01-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install nv-error-basic
pnpm add nv-error-basic
yarn add nv-error-basic
bun add nv-error-basic
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-01-20 |
| First published | 2022-01-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ihgazni2 |

## Links

- npm: https://www.npmjs.com/package/nv-error-basic
- npm.io page: https://npm.io/package/nv-error-basic

## Dependencies (1)

- [nv-facutil-basic](https://npm.io/package/nv-facutil-basic.md) ^1.1.8

## Recent versions

- 1.0.1 (latest) — 2022-01-20

## README

nv-error-basic
===============
- two simple function for error to/from json 

install
=======
- npm install nv-error-basic 

usage
=====
    const {from_json,to_json} = require("nv-error-basic")
   
    
example
-------

        var err = new SyntaxError("test")
        var J = to_json(err)

        > J
        {
          code: null,
          mts: '1642644488473',
          name: 'SyntaxError',
          message: 'test',
          stack: [
            'SyntaxError: test',
            '    at REPL5:1:11',
            '    at Script.runInThisContext (node:vm:129:12)',
            '    at REPLServer.defaultEval (node:repl:562:29)',
            '    at bound (node:domain:421:15)',
            '    at REPLServer.runBound [as eval] (node:domain:432:12)',
            '    at REPLServer.onLine (node:repl:889:10)',
            '    at REPLServer.emit (node:events:402:35)',
            '    at REPLServer.emit (node:domain:475:12)',
            '    at REPLServer.Interface._onLine (node:readline:487:10)',
            '    at REPLServer.Interface._line (node:readline:864:8)'
          ],
          signed_keys: [ 'code', 'name', 'message' ],
          sign: '97a7bad79664cdee2c911a23db0a9306782cb906'
        }
        > from_json(J)
        SyntaxError: test
            at REPL5:1:11
            at Script.runInThisContext (node:vm:129:12)
            at REPLServer.defaultEval (node:repl:562:29)
            at bound (node:domain:421:15)
            at REPLServer.runBound [as eval] (node:domain:432:12)
            at REPLServer.onLine (node:repl:889:10)
            at REPLServer.emit (node:events:402:35)
            at REPLServer.emit (node:domain:475:12)
            at REPLServer.Interface._onLine (node:readline:487:10)
            at REPLServer.Interface._line (node:readline:864:8) {
          code: null,
          mts: '1642644488473',
          sign: '97a7bad79664cdee2c911a23db0a9306782cb906',
          signed_keys: [ 'code', 'name', 'message' ]
        }
        >



APIS
=======
- to\_json(err,signed\_keys=['code','name','message'])
- from\_json(J):Error


LICENSE
=======
- ISC

---
_Source: https://npm.io/package/nv-error-basic · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
