# varlidator

> JavaScript variable identifier validation.

Latest version **2.0.5** (published 2015-10-23) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install varlidator
pnpm add varlidator
yarn add varlidator
bun add varlidator
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.5 |
| Published | 2015-10-23 |
| First published | 2015-10-23 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Linus Gubenis @Intelisis |
| Maintainers | elgubenis |

## Links

- npm: https://www.npmjs.com/package/varlidator
- Repository: https://github.com/elgubenis/varlidator
- Issues: https://github.com/elgubenis/varlidator/issues
- npm.io page: https://npm.io/package/varlidator

## Recent versions

- 2.0.5 (latest) — 2015-10-23
- 2.0.4 — 2015-10-23
- 2.0.3 — 2015-10-23
- 2.0.2 — 2015-10-23
- 2.0.1 — 2015-10-23
- 2.0.0 — 2015-10-23
- 1.0.1 — 2015-10-23
- 1.0.0 — 2015-10-23

## README

[![Build Status](https://travis-ci.org/elgubenis/varlidator.svg)](https://travis-ci.org/elgubenis/varlidator)
[![Code Climate](https://codeclimate.com/github/elgubenis/varlidator/badges/gpa.svg)](https://codeclimate.com/github/elgubenis/varlidator)
[![Test Coverage](https://codeclimate.com/github/elgubenis/varlidator/badges/coverage.svg)](https://codeclimate.com/github/elgubenis/varlidator/coverage)
# Varlidator
JavaScript variable identifier validation. Try/Catch a new Function() which defines and returns a Boolean to a variable name.

#### JSPerf comparsion between valid and invalid variable names.
http://jsperf.com/varlidator-valid-vs-invalid

### Install
```sh
npm install varlidator --save
```

### Usage
```js
var varlidate = require('varlidator');

var isValid = varlidate('@');
// returns: false

isValid = varlidate('a');
// returns: true
```

### How to develop
```sh
npm install
grunt
```

### How to build (before publishing)
```sh
npm install
grunt build
```

### Alternatives
- https://github.com/mathiasbynens/mothereff.in/tree/master/js-variables

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