# ttni

> get function name from stacktrace for node

Latest version **1.0.9** (published 2022-09-18) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2022-09-18 |
| First published | 2014-08-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 26 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | bbln |
| Maintainers | jsmatik |

## Links

- npm: https://www.npmjs.com/package/ttni
- Repository: https://github.com/gitbbln/ttni
- Homepage: https://github.com/gitbbln/ttni#readme
- Issues: https://github.com/gitbbln/ttni/issues
- npm.io page: https://npm.io/package/ttni

## Recent versions

- 1.0.9 (latest) — 2022-09-18
- 1.0.8 — 2022-09-18
- 1.0.7 — 2022-08-25
- 1.0.6 — 2022-07-22
- 1.0.5 — 2022-07-21
- 1.0.4 — 2022-07-01
- 1.0.3 — 2022-07-01
- 1.0.2 — 2022-07-01
- 0.0.4 — 2022-03-16
- 0.0.3 — 2014-08-03

## README

# ttni 1.0.8

Get function name  from stacktrace for node 

## Download

```bash
git clone https://github.com/gitbbln/ttni
```

```JavaScript
import { TTNI } from 'TTNI'
```

## --------common part----------

```JavaScript
let ttni = new TTNI();
let ni = ttni.ni.bind(ttni);
let ne = ttni.ne.bind(ttni);


ttni.logs = { test0: true, test1: !true }
Object.assign(ttni, { bHtml: false, bShowTimer: true, bCaller: false, bTrace: true, logs: undefined, maxColorsLevel: 4 })

class Test2Class {
  test3() {
    ni()
    new Test1Class().test2();
    ne()
  }
  test4() {
    ni()
    this.test3();
    ne()
  }
  test5() {
    ni()
    this.test4();
    ne()
  }
}
class Test1Class {
  test1() {
    ni()
    ne()
  }
  test2() {
    ni()
    this.test1();
    ne()
  }

  //ttni.bLogsIgnore = !false;
}

function test3() {
  ni()
  new Test1Class().test2();
  ne()
}

function test4() {
  ni()
  test3();
  ne()
}

function test5() {
  ni()
  test4();
  ne()
}
const test1 = () => {
  ni()
  ne()
}
const test2 = () => {
  ni()
  test1();
  ne()
}

const p1 = new Test1Class();
//const p = new Test2Class();

function testExit(...nu) {
  ni(nu)
  ttni.shAt();

  //process.exit()

  ne()

}
testExit(['exit no', true]);
ttni.shTimer();
ttni.shStack();
```


### Show in terminal console

```JavaScript
 
 ->testExit(exit no,true)
items at: {
  fn: 'testExit ',
  caller: 'ModuleJob.run ',
  path: 'file:///J:/group-ttni/sample-ttni/index-node.js',
  file: 'index-node.js'
}
  <-testExit()
:38 ms
stack= Error
    at TTNI.ne (J:\group-ttni\sample-ttni\node_modules\ttni\dist\index.js:308:46)
    at testExit (file:///J:/group-ttni/sample-ttni/index-node.js:77:3)
    at file:///J:/group-ttni/sample-ttni/index-node.js:81:1
    at ModuleJob.run (node:internal/modules/esm/module_job:185:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
    at async loadESM (node:internal/process/esm_loader:88:5)
    at async handleMainPromise (node:internal/modules/run_main:65:12)
```

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