# node-caps

> An easy-to-use module to capitalise an string or array

Latest version **1.3.6** (published 2022-01-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-caps
pnpm add node-caps
yarn add node-caps
bun add node-caps
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.6 |
| Published | 2022-01-23 |
| First published | 2020-10-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | comic. && salvage |
| Maintainers | salvage_dev, comic-dev |

## Links

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

## Recent versions

- 1.3.6 (latest) — 2022-01-23
- 1.3.5 — 2022-01-23
- 1.3.4 — 2022-01-23
- 1.3.3 — 2022-01-23
- 1.3.2 — 2021-03-18
- 1.3.1 — 2021-02-04
- 1.3.0 — 2021-02-04
- 1.2.9 — 2021-01-23
- 1.2.8 — 2021-01-23
- 1.2.7 — 2021-01-23
- 1.2.6 — 2021-01-23
- 1.2.5 — 2021-01-23
- 1.2.3 — 2021-01-23
- 1.2.2 — 2020-10-26
- 1.2.1 — 2020-10-26
- … 5 more at https://npm.io/package/node-caps/versions

## README

# node-caps

**An easy-to-use module to capitalise an string or array**

**Features**

- Fast, up-to-date code-base with ESM support.
- Typings included

# Explanation

```js
const Caps = require("node-caps");
Caps.def(); /* Default, will only capitalise the first letter of the first word */
Caps.keep(); /* Like Default, but will keep the rest normal */
Caps.all(); /* All, will capitalise all words */
Caps.array(); /* Array, like All but using an array */
Caps.sent(); /* Captialises first word like Default, but capitalises every word after the dot */
Caps.dash(); /* Like Array, but without using an array to split the elements, but an dash (-) */
Caps.reg(); /* Converts an country name to the right capitalization */
Caps.perms(); /* Coverts the standard Discord.js permission display to readable text */
```

# Usage

**Default**

```js
const Caps = require("node-caps");
// Or
import Caps from "node-caps";

Caps.def("hi There"); /* Expected output: 'Hi there' */
```

**Keep**

```js
const Caps = require("node-caps");
// Or
import Caps from "node-caps";

Caps.def("hi There"); /* Expected output: 'Hi There' */
```

**All**

```js
const Caps = require("node-caps");
// Or
import Caps from "node-caps";

Caps.all("hi there"); /* Expected output: 'Hi There' */
```

**Array**

```js
const Caps = require("node-caps");
// Or
import Caps from "node-caps";

Caps.array(["hi", "there"]); /* Expected output: ['Hi', 'There'] */
```

**Sent**

```js
const Caps = require("node-caps");
// Or
import Caps from "node-caps";

Caps.array("hi. there"); /* Expected output: 'Hi. There' */
```

**Dash**

```js
const Caps = require("node-caps");
// Or
import Caps from "node-caps";

Caps.dash("hi-there"); /* Expected output: 'Hi-There' */
```

**Reg**

```js
const Caps = require("node-caps");
// Or
import Caps from "node-caps";

Caps.reg("the netherlands"); /* Expected output: 'The Netherlands' */
// But
Caps.reg("north-us"); /* Expected output: 'North-US' */
```

**Perms**

```js
const Caps = require("node-caps");
// Or
import Caps from "node-caps";

Caps.perms(["ADMINISTRATOR"]); /* Expected output: ['Administrator'] */

// And

Caps.perms(["MANAGE_MESSAGES"]); /* Expected output: ['Manage Messages'] */
```

**_Copyright (c) 2020 simp. & Salvage_**

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