# nvdtb

> small table utils

Latest version **1.0.4** (published 2020-11-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install nvdtb
pnpm add nvdtb
yarn add nvdtb
bun add nvdtb
```

## 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.4 |
| Published | 2020-11-04 |
| First published | 2020-11-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ihgazni2 |
| Keywords | table, config, small-json-table |

## Links

- npm: https://www.npmjs.com/package/nvdtb
- npm.io page: https://npm.io/package/nvdtb

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2020-11-04
- 1.0.3 — 2020-11-04
- 1.0.2 — 2020-11-04
- 1.0.1 — 2020-11-02
- 1.0.0 — 2020-11-02

## README

nvdtb
============
- nvdtb is a simple util for small-table ,such as config or init some const 

install
=======
- npm install nvdtb

usage
=====

###cvc

    const nvdtb = require(nvdtb);
    const Dtb = nvdtb.Cudtb


    var dtb = new Dtb(4,'state','anti_state','key','anti_key')
    dtb.state = ['undefined','pending','resolved','rejected']
    dtb.anti_state = ['undefined','pending','rejeted','resolved']
    dtb.key = ['undefined','pending','rslt','exception']
    dtb.anti_key = ['undefined','pending','exception','rslt']


    > dtb
        state | anti_state |       key |  anti_key
    ----------------------------------------------
    undefined |  undefined | undefined | undefined
    ----------------------------------------------
      pending |    pending |   pending |   pending
    ----------------------------------------------
     resolved |    rejeted |      rslt | exception
    ----------------------------------------------
     rejected |   resolved | exception |      rslt
    ----------------------------------------------


    > dtb.cvc('state','resolved','anti_key')
    'exception'



###sort

    const Dtb = require("./index").Cudtb
    var dtb = new Dtb(3,'name','class','year')
    dtb.name = ['john','jane','dave']
    dtb.class = ['A','B','B']
    dtb.year = [15,12,10]
    
    > dtb
    name | class | year
    -------------------
    john |     A |   15
    -------------------
    jane |     B |   12
    -------------------
    dave |     B |   10
    -------------------
    >
    
    dtb.sort()                 default use the compare sequence of inited: ['name','class','year']
    > dtb                  
    name | class | year
    -------------------
    dave |     B |   10
    -------------------
    jane |     B |   12
    -------------------
    john |     A |   15
    -------------------
    >
    
    
    dtb.sort(["year","class","name"])
    
    > dtb
    name | class | year
    -------------------
    dave |     B |   10
    -------------------
    jane |     B |   12
    -------------------
    john |     A |   15
    -------------------
    >


APIS
====

    {
      cmmn: {
        kvl_to_entries: [Function: kvl_to_entries],
        entries_to_kvl: [Function: entries_to_kvl],
        kvl_to_dict: [Function: kvl_to_dict],
        dict_to_kvl: [Function: dict_to_kvl],
        entries_to_dict: [Function: entries_to_dict],
        dict_to_entries: [Function: dict_to_entries],
        is_list_unique: [Function: is_list_unique],
        prepend_str: [Function: prepend_str]
      },
      basic: {
        init_row: [Function: init_row],
        init_dtb: [Function: init_dtb],
        dtb_to_cols: [Function: dtb_to_cols],
        cols_to_dtb: [Function: cols_to_dtb],
        dtb_to_mat: [Function: dtb_to_mat],
        dtb_to_tmat: [Function: dtb_to_tmat],
        unzip: [Function: unzip],
        zip: [Function: zip],
        transform: [Function: transform],
        creat_row: [Function: creat_row],
        get_cnl: [Function: get_cnl],
        get_colnum: [Function: get_colnum],
        get_cnl_from_dtb: [Function: get_cnl_from_dtb],
        get_cnl_from_cols: [Function: get_cnl_from_cols],
        get_row: [Function: get_row],
        get_col: [Function: get_col],
        get_val: [Function: get_val],
        get_cvl: [Function: get_cvl],
        get_rvl: [Function: get_rvl],
        set_row: [Function: set_row],
        prepend_row: [Function: prepend_row],
        insert_row: [Function: insert_row],
        append_row: [Function: append_row],
        del_row: [Function: del_row],
        set_col: [Function: set_col],
        prepend_col: [Function: prepend_col],
        insert_col: [Function: insert_col],
        append_col: [Function: append_col],
        del_col: [Function: del_col]
      },
      unicol: {
        is_cvl_unique: [Function: is_cvl_unique],
        is_col_unique: [Function: is_col_unique],
        'is_dtb_col$unique': [Function: is_dtb_col$unique],
        get_rn_with_cvl: [Function: get_rn_with_cvl],
        get_rn_with_col: [Function: get_rn_with_col],
        cvc: [Function: cvc],
        Dtb: [Function: Dtb]
      },
      Cudtb: [Function: Dtb]
    }

RESTRICT
========
- each column elements must be unique to each other
- for full support , refer to the below python projects
- https://github.com/ihgazni2/dtable
- https://github.com/ihgazni2/qtable

LICENSE
=======
- ISC

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