# @lgd-utils/validate

> A front-end verification tool

Latest version **0.0.17** (published 2022-01-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @lgd-utils/validate
pnpm add @lgd-utils/validate
yarn add @lgd-utils/validate
bun add @lgd-utils/validate
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.17 |
| Published | 2022-01-10 |
| First published | 2021-09-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 327.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | LGD.HuaFEEng |
| Maintainers | lgd.huafeeng |
| Keywords | validate, validator, validation, util, tool, assert, front-end |

## Links

- npm: https://www.npmjs.com/package/@lgd-utils/validate
- Repository: https://github.com/LGDHuaOPER/lgd-utils
- Homepage: https://github.com/LGDHuaOPER/lgd-utils/tree/main/packages/validate#readme
- Issues: https://github.com/LGDHuaOPER/lgd-utils/issues
- npm.io page: https://npm.io/package/@lgd-utils/validate

## Dependencies (4)

- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [globalthis](https://npm.io/package/globalthis.md) ^1.0.2
- [@lgd-utils/utils](https://npm.io/package/@lgd-utils/utils.md) ^0.0.16
- [@lgd-utils/regexp](https://npm.io/package/@lgd-utils/regexp.md) ^0.0.7

## Alternatives

- [@regle/core](https://npm.io/package/@regle/core.md) — 47.0K weekly downloads
- [typeof-arguments](https://npm.io/package/typeof-arguments.md) — 12.5K weekly downloads
- [@lokalise/projects-engine-contracts](https://npm.io/package/@lokalise/projects-engine-contracts.md) — 978 weekly downloads
- [@osjwnpm/nam-laboriosam-quibusdam](https://npm.io/package/@osjwnpm/nam-laboriosam-quibusdam.md) — 70 weekly downloads
- [@oridune/validator](https://npm.io/package/@oridune/validator.md) — 16 weekly downloads

## Recent versions

- 0.0.17 (latest) — 2022-01-10
- 0.0.16 — 2021-11-22
- 0.0.15 — 2021-11-19
- 0.0.14 — 2021-10-28
- 0.0.13 — 2021-10-21
- 0.0.12 — 2021-09-28
- 0.0.11 — 2021-09-27
- 0.0.10 — 2021-09-27
- 0.0.9 — 2021-09-27
- 0.0.8 — 2021-09-22
- 0.0.7 — 2021-09-22
- 0.0.6 — 2021-09-22
- 0.0.5 — 2021-09-19
- 0.0.4 — 2021-09-15
- 0.0.3 — 2021-09-11
- … 2 more at https://npm.io/package/@lgd-utils/validate/versions

## README

<!--
 * @Author: shiconghua
 * @Alias: LGD.HuaFEEng
 * @Date: 2021-09-01 17:04:33
 * @LastEditTime: 2022-01-07 09:46:55
 * @LastEditors: shiconghua
 * @Description: file content
 * @FilePath: /lgd-utils/packages/validate/README.md
-->
# `@lgd-utils/validate`

<div align="center">

[![Bundle size](https://img.shields.io/bundlephobia/minzip/@lgd-utils/validate.svg)](https://bundlephobia.com/result?p=@lgd-utils/validate)
[![MIT](https://img.shields.io/badge/license-MIT-000000.svg)](https://opensource.org/licenses/MIT/)
[![NPM downloads](https://img.shields.io/npm/dm/@lgd-utils/validate.svg?style=flat)](https://npmjs.org/package/@lgd-utils/validate)
[![NPM version](https://img.shields.io/npm/v/@lgd-utils/validate.svg?style=flat)](https://npmjs.org/package/@lgd-utils/validate)
[![lodash](https://img.shields.io/badge/lodash-4-green.svg)](https://github.com/lodash/lodash)
[![npm](https://img.shields.io/npm/dt/@lgd-utils/validate)](https://www.npmjs.com/package/@lgd-utils/validate)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)

</div>

> A front-end verification tool

## Usage

```
import validate from '@lgd-utils/validate';
import lodashTrim from 'lodash/trim';

validate.validToStringType(1, 'Number'); // true
validate.validToStringType(undefined, 'Null'); // false
validate.validToStringType(void 0, 'Undefined'); // true
validate.validToStringType(function () {}, 'Object'); // false

validate.validEmptyString(1); // false
validate.validEmptyString('  '); // false
validate.validEmptyString(''); // true
validate.validEmptyString('  ', lodashTrim); // true
```

## Contribute

- [LGD.HuaFEEng(LGD.HuaOPER)][blog]

## Documentation

- [Quick tutorial](https://github.com/LGDHuaOPER/lgd-utils/tree/main/packages/validate#readme)
- [Issue](https://github.com/LGDHuaOPER/lgd-utils/issues)

## Related

- [@lgd-utils/array](https://github.com/LGDHuaOPER/lgd-utils/tree/main/packages/array) - A front-end array tool
- [@lgd-utils/axios](https://github.com/LGDHuaOPER/lgd-utils/tree/main/packages/axios) - A axios adapter and middleware tool
- [@lgd-utils/cached-storage](https://github.com/LGDHuaOPER/lgd-utils/tree/main/packages/cached-storage) - 一个具有失效功能的缓存存储库
- [@lgd-utils/collection](https://github.com/LGDHuaOPER/lgd-utils/tree/main/packages/collection) - A front-end collection tool
- [@lgd-utils/error](https://github.com/LGDHuaOPER/lgd-utils/tree/main/packages/error) - A front-end error tool
- [@lgd-utils/html](https://github.com/LGDHuaOPER/lgd-utils/tree/main/packages/html) - A front-end html tool
- [@lgd-utils/number](https://github.com/LGDHuaOPER/lgd-utils/tree/main/packages/number) - A front-end number tool
- [@lgd-utils/object](https://github.com/LGDHuaOPER/lgd-utils/tree/main/packages/object) - A front-end object tool
- [@lgd-utils/polling](https://github.com/LGDHuaOPER/lgd-utils/tree/main/packages/polling) - A front-end polling tool
- [@lgd-utils/regexp](https://github.com/LGDHuaOPER/lgd-utils/tree/main/packages/regexp) - A front-end regexp tool
- [@lgd-utils/request-queue](https://github.com/LGDHuaOPER/lgd-utils/tree/main/packages/request-queue) - A front-end request-queue tool
- [@lgd-utils/screenlog](https://github.com/LGDHuaOPER/lgd-utils/tree/main/packages/screenlog) - Bring console.log and so on, on the screen
- [@lgd-utils/symbol](https://github.com/LGDHuaOPER/lgd-utils/tree/main/packages/symbol) - A front-end symbol tool
- [@lgd-utils/utils](https://github.com/LGDHuaOPER/lgd-utils/tree/main/packages/utils) - A front-end utils tool
- [More…](https://github.com/LGDHuaOPER/lgd-utils)

[blog]: https://lgdhuaoper.github.io/ '敬昭的博客'

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