# nv-repr-mat

> display mat in terminal

Latest version **1.0.0** (published 2021-01-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install nv-repr-mat
pnpm add nv-repr-mat
yarn add nv-repr-mat
bun add nv-repr-mat
```

## 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.0 |
| Published | 2021-01-19 |
| First published | 2021-01-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ihgazni2 |
| Keywords | show-mat, display-mat |

## Links

- npm: https://www.npmjs.com/package/nv-repr-mat
- npm.io page: https://npm.io/package/nv-repr-mat

## Dependencies (3)

- [nv-array-init](https://npm.io/package/nv-array-init.md) ^1.0.1
- [nv-repr-basic](https://npm.io/package/nv-repr-basic.md) ^1.0.1
- [nv-array-transform](https://npm.io/package/nv-array-transform.md) ^1.0.0

## Recent versions

- 1.0.0 (latest) — 2021-01-19

## README

nv-repr-mat
============
- nv-repr-mat is a simple util to display mat



install
=======
- npm install nv-repr-mat

usage
=====

examples
---------

    const repr_mat = require("nv-repr-mat");
    var m = [
       [123,"我们",'a',null],
       [undefined,'b',0,null],
       [undefined,'b','uuu',345],
    ]
    
    var name = "MYTABLE"
    var cnl = ['X','Y','Z','W']
    var rnl = ['-','-','-','-']
    var cfg ={name,cnl,rnl}
    
    console.log(repr_mat.repr(m,{with_color:false}))
    
    console.log(repr_mat.repr(m,cfg))
    
    console.log(repr_mat.repr(m))
    
    > console.log(repr_mat.repr(m,{with_color:false}))
     ──────────────────────────────────────────────
     │ ROWNUM │     col-0 │ col-1 │ col-2 │ col-3 │
     ──────────────────────────────────────────────
     │    0-> │       123 │  我们 │     a │  null │
     ──────────────────────────────────────────────
     │    1-> │ undefined │     b │     0 │  null │
     ──────────────────────────────────────────────
     │    2-> │ undefined │     b │   uuu │   345 │
     ──────────────────────────────────────────────
    undefined
    >


cfg format
----------
- cnl             column-names, default = 'col-'+<colnum>
- rvl             row-index-names,default = <rownum> + '->'
- name            table-name
- with\_color     enable ansi8-color

cfg
-----

    {
        name:"MYTABLE"
        cnl:['X','Y','Z','W'],
        rnl:['-','-','-','-']
    }


APIS
====
- repr\_mat.repr(m,cfg)
- repr\_mat.CONND 
- repr\_mat.COLORD



LICENSE
=======
- ISC

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