Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/scniro/passcheck


https://github.com/scniro/passcheck

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# passcheck

[![Build Status](https://api.travis-ci.org/scniro/passcheck.svg)](https://travis-ci.org/scniro/passcheck)
[![NPM Version](https://img.shields.io/npm/v/passcheck.svg?style=flat)](https://www.npmjs.org/package/passcheck)

a policy driven password strength checker

- [AngularJS wrapper/api](http://ng-passcheck.azurewebsites.net/)

```
install passcheck
```

### api

```javascript
var passcheck = require('./passcheck'); // -- nodejs. window.passcheck -- browser
```

##### `passcheck.config.get()`
- returns the configuration

##### `passcheck.config.set(options)`
- sets and overrides the default configuration

##### `passcheck.eval('password')`
- returns results

```javascript
var result = passcheck.eval('Password123!');

// { weak: false, medium: false, strong: true, score: 76.5 }

passcheck.config.set({
common: {
test: true,
path: './passwords.json' // 10k common passwords
}
});

var result = passcheck.eval('password');

// { weak: true, medium: false, strong: false, score: 0, common: true }
```