# tm-utils

> This is the accumulated reused functions for TM30 global

Latest version **0.1.18** (published 2020-08-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install tm-utils
pnpm add tm-utils
yarn add tm-utils
bun add tm-utils
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.18 |
| Published | 2020-08-12 |
| First published | 2020-01-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 15.6 KB |
| Known vulnerabilities | 0 (+4 in 2 direct dependencies) |
| Install scripts | no |
| Author | TM30 |
| Maintainers | tm30tech |
| Keywords | tm-utils, utils, tm, tm30 |

## Links

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

## Dependencies (8)

- [jest](https://npm.io/package/jest.md) ^24.9.0
- [dotenv](https://npm.io/package/dotenv.md) ^8.1.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [graylog2](https://npm.io/package/graylog2.md) ^0.2.1
- [@hapi/joi](https://npm.io/package/@hapi/joi.md) ^17.1.1
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^8.5.1
- [tm-timestamp](https://npm.io/package/tm-timestamp.md) ^1.0.0
- [libphonenumber-js](https://npm.io/package/libphonenumber-js.md) ^1.7.53

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.1.18 (latest) — 2020-08-12
- 0.1.17 — 2020-08-12
- 0.1.16 — 2020-08-12
- 0.1.15 — 2020-08-12
- 0.1.14 — 2020-08-12
- 0.1.13 — 2020-06-23
- 0.1.12 — 2020-05-18
- 0.1.11 — 2020-03-03
- 0.1.10 — 2020-02-12
- 0.1.9 — 2020-02-07
- 0.1.8 — 2020-02-07
- 0.1.7 — 2020-02-07
- 0.1.6 — 2020-02-07
- 0.1.5 — 2020-02-07
- 0.1.4 — 2020-02-07
- … 4 more at https://npm.io/package/tm-utils/versions

## README

tm-utils
===========
tm-utils - This is a utility package for reused component

## Installation
```json
"dependencies": {
  "tm-utils": "~0.1.18" // see the "releases" section
}
```
```npm install tm-utils```
## Requirements
```javascript
const utils = require('tm-utils');
```

### Phone Number Formatter (Single)
- To format a single phone number
```javascript
let phoneNumber = "08012345678";
phoneNumber = utils.formatPhoneNumber(phoneNumber, "NG");
console.log(phoneNumber); //2348012345678
```

### Phone Number Formatter (Multiple)
- To format an array of phone numbers
```javascript
let phoneNumbers = ["08012345678", "08012345679"];
phoneNumbers = utils.formatPhoneNumber(phoneNumbers, "NG");
console.log(phoneNumbers); //['2348012345678','2348012345679']
```

### Bank Account LookUp 
- To get Bank List Suggestion for an account number
```javascript
let accountnumber = "0005516510";
let banklist = utils.accountNumberLookup(accountnumber);
console.log(banklist); // [{ bankName: 'DIAMOND BANK',code: '063', bankCode: '000005', bankId: 4 }, { bankName: 'PARALLEX', code: '502', bankCode: '090004', bankId: 21 ] 
```

### Tests
#### Cli
```bash
npm install
npm test
```

#### Contributors

- [Micheal Akinwonmi](https://github.com/blackhades)
- [Ezeibe Sandra](https://github.com/sandysci)

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