# nn-validate-character

> Character validation functions.

Latest version **1.2.0** (published 2021-10-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install nn-validate-character
pnpm add nn-validate-character
yarn add nn-validate-character
bun add nn-validate-character
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2021-10-21 |
| First published | 2021-10-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Nneba13 |
| Maintainers | nneba13 |

## Links

- npm: https://www.npmjs.com/package/nn-validate-character
- npm.io page: https://npm.io/package/nn-validate-character

## Recent versions

- 1.2.0 (latest) — 2021-10-21
- 1.1.0 — 2021-10-16
- 1.0.0 — 2021-10-02

## README

# `nn-validate-character`

> Common character validation functions.

## Usage

```
import { isControl } from 'nn-validate-character';
import { isDigit } from 'nn-validate-character';
import { isLetter } from 'nn-validate-character';
import { isWhitespace } from 'nn-validate-character';

// Validate digit (i.e. '\u0000' - '\u0020') characters.
isControl( '\u0000' ) // Returns true

// Validate digit (i.e. '0' - '9') characters.
isDigit( '1' ) // Returns true
isDigit( 'A' ) // Returns false

// Validate digit (i.e. '0' - '9') characters.
isHexadecimalDigit( '1' ) // Returns true
isHexadecimalDigit( 'A' ) // Returns true
isHexadecimalDigit( 'F' ) // Returns true
isHexadecimalDigit( 'G' ) // Returns false

// Validate letter (i.e. 'A' - 'Z' and 'a' - 'z') characters.
isLetter( '1' ) // Returns false
isLetter( 'A' ) // Returns true

// Validate whitespace (i.e. ' ', '\t', '\n', '\r', '\f') characters.
isWhitespace( ' ' ) // Returns true
isWhitespace( '\t' ) // Returns true

```

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