<commit_before># strulidator

> Declarative validator for complex deep structures.

## TODO

At current moment strulidator isn't ready for production.
If you want to help me with release please read [the first issue](https://github.com/vslinko/strulidator/issues/1).

## Reference

```js
type Validator = (value: any) => boolean

type Constraint = (value: any) => ConstraintResult

type ConstraintResult = {
  valid: boolean,
  message: string | void,
  children: ConstraintResultMap | ConstraintResultArray | void<commit_msg>Badges<commit_after># strulidator

> Declarative validator for complex deep structures.

[![](https://img.shields.io/circleci/project/vslinko/strulidator.svg)](https://circleci.com/gh/vslinko/strulidator)
[![](https://img.shields.io/codecov/c/github/vslinko/strulidator.svg)](https://codecov.io/github/vslinko/strulidator)
[![](https://img.shields.io/github/issues/vslinko/strulidator.svg)](https://github.com/vslinko/strulidator/issues)

[![](https://img.shields.io/david/vslinko/strulidator.svg)](https://david-dm.org/vslinko/strulidator)
[![](https://img.shields.io/david/dev/vslinko/strulidator.svg)](https://david-dm.org/vslinko/strulidator#info=devDependencies)
[![](https://img.shields.io/david/peer/vslinko/strulidator.svg)](https://david-dm.org/vslinko/strulidator#info=peerDependencies)
[![](https://img.shields.io/david/optional/vslinko/strulidator.svg)](https://david-dm.org/vslinko/strulidator#info=optionalDependencies)

[![](https://img.shields.io/npm/dm/strulidator.svg)](https://www.npmjs.com/package/strulidator)
[![](https://img.shields.io/github/stars/vslinko/strulidator.svg)](https://github.com/vslinko/strulidator)
[![](https://img.shields.io/github/forks/vslinko/strulidator.svg)](https://github.com/vslinko/strulidator)

[![](https://img.shields.io/npm/v/strulidator.svg)](https://www.npmjs.com/package/strulidator)
[![](https://img.shields.io/npm/l/strulidator.svg)](https://github.com/vslinko/strulidator/blob/master/LICENSE)

[![](https://img.shields.io/gratipay/vslinko.svg)](https://gratipay.com/~vslinko/)
[![](https://img.shields.io/bountysource/team/vslinko/activity.svg)](https://www.bountysource.com/people/29603-vslinko)

[![](https://img.shields.io/badge/gitter_chat-strulidator-brightgreen.svg)](https://gitter.im/vslinko/strulidator)

## TODO

At current moment strulidator isn't ready for production.
If you want to help me with release please read [the first issue](https://github.com/vslinko/strulidator/issues/1).

## Reference

```js
type Validator = (value: any) => boolean

type Constraint = (value: any) => ConstraintResult

type ConstraintResult = {
  valid: boolean,
  message: string | void,
  children: ConstraintResultMap | ConstraintResultArray | void
{'fraction_non_alphanumeric': 0.17985347985347985, 'fraction_numerical': 0.002564102564102564, 'mean_word_length': 5.580722891566265, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 32, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5226972', 'n_tokens_mistral': 1088, 'n_tokens_neox': 1002, 'n_words': 120}