# @eightshapes/prop-validator

> A LitElement mixin that adds basic validation methods for component properties.

Latest version **0.1.4** (published 2020-02-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @eightshapes/prop-validator
pnpm add @eightshapes/prop-validator
yarn add @eightshapes/prop-validator
bun add @eightshapes/prop-validator
```

## 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.4 |
| Published | 2020-02-11 |
| First published | 2019-08-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Kevin Powell |
| Maintainers | detzi, kevinmpowell, nathanacurtis |

## Links

- npm: https://www.npmjs.com/package/@eightshapes/prop-validator
- Repository: https://github.com/EightShapes/lit-element-mixins
- Homepage: https://github.com/EightShapes/lit-element-mixins#readme
- Issues: https://github.com/EightShapes/lit-element-mixins/issues
- npm.io page: https://npm.io/package/@eightshapes/prop-validator

## Recent versions

- 0.1.4 (latest) — 2020-02-11
- 0.1.3 — 2019-08-29
- 0.1.2 — 2019-08-28
- 0.1.1 — 2019-08-22

## README

# PropValidator
PropValidator is a LitElement mixin that adds basic validation methods for component properties.

## Usage
Install:

```
 npm install @eightshapes/prop-validator --save
```

In your LitElement Component:

```
import { LitElement, html } from 'lit-element';
import { PropValidator } from '@eightshapes/prop-validator';

export class ComboLock extends PropValidator(LitElement) {

}

customElements.define('combo-lock', ComboLock);
```

Then to use the component in HTML:

```
<script type="module" src="/path/to/compiled/combo-lock.js" />
<combo-lock size="unicorn"></combo-lock>
<!-- Console will throw an error that 'unicorn' is not a valid value for the 'size' prop -->
```

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