# k-toolbelt

> Combination of various node tools used for quick prototyping

Latest version **4.0.0** (published 2018-01-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install k-toolbelt
pnpm add k-toolbelt
yarn add k-toolbelt
bun add k-toolbelt
```

## 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 | 4.0.0 |
| Published | 2018-01-11 |
| First published | 2017-06-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kevin M Ashton |
| Maintainers | aashtonk |
| Keywords | logging, postgres, mysql, prototyping |

## Links

- npm: https://www.npmjs.com/package/k-toolbelt
- Repository: https://github.com/kevin-ashton/k-toolbelt
- Homepage: https://github.com/kevin-ashton/k-toolbelt#readme
- Issues: https://github.com/kevin-ashton/k-toolbelt/issues
- npm.io page: https://npm.io/package/k-toolbelt

## Dependencies (3)

- [pg](https://npm.io/package/pg.md) ^7.4.0
- [mysql](https://npm.io/package/mysql.md) ^2.15.0
- [colors](https://npm.io/package/colors.md) ^1.1.2

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 4.0.0 (latest) — 2018-01-11
- 3.0.3 — 2018-01-07
- 3.0.2 — 2018-01-07
- 3.0.1 — 2018-01-07
- 3.0.0 — 2018-01-07
- 2.0.0 — 2017-12-18
- 1.1.1 — 2017-06-29
- 1.1.0 — 2017-06-29
- 1.0.0 — 2017-06-29

## README

# k-toolbelt
Combination of various node tools used for quick prototyping

# Install
`npm install --save k-toolbelt`

# Data Sources

## Postgres
```typescript
import { pg } from 'k-toolbelt';

function main() {
  await pg.initDB('name1', {
    host: '',
    database: '',
    user: '',
    password: ''
  });
  
  let db = pg.getDB('name1');
  let res = await db.query(`select * from foo where id = $1`, [5]);
  res.forEach(r => console.log(r.id);)
  db.disconnect();
}
```

## MySQL
```typescript
import { mysql } from 'k-toolbelt';

function main() {
  await mysql.initDB('name1', {
     host: '',
     database: '',
     user: '',
     password: ''
  });
  
  let db = mysql.getDB('name1');
  let res = await db.query(`select * from foo where id = ?`, [5]);
  res.forEach(r => console.log(r.id);)
  db.disconnect();
}
```

# Logging
```typescript
import { log } from 'k-node-tools';
log.setLevel('debug');

log.info('foo');
log.error('bar');


```

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