# user-manager-utils

> User Manger Utilities Module

Latest version **1.0.2** (published 2017-09-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install user-manager-utils
pnpm add user-manager-utils
yarn add user-manager-utils
bun add user-manager-utils
```

## 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 | 1.0.2 |
| Published | 2017-09-16 |
| First published | 2017-09-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| Author | Guillermo Lopez |
| Maintainers | glopezep |

## Links

- npm: https://www.npmjs.com/package/user-manager-utils
- npm.io page: https://npm.io/package/user-manager-utils

## Dependencies (3)

- [bluebird](https://npm.io/package/bluebird.md) ^3.5.0
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^8.0.0
- [token-extractor](https://npm.io/package/token-extractor.md) ^0.1.6

## Recent versions

- 1.0.2 (latest) — 2017-09-16
- 1.0.1 — 2017-09-16
- 1.0.0 — 2017-09-16

## README

# User Manger Utils

## Usage

```js
const utils = require('user-manager-utils')

const password = 'myPass'

utils.encrypt(password).then(hash => {
  // do something with password hash
}).catch(e => {
  // do something with err
})
```

Or

```js
utils.encrypt(password, (err, hash) => {
  if (err) {
    // do something with err
  }
  // do something with hash
})
```

## API

```js
utils.encrypt(password, [callback]) -> hash
utils.signToken(token, secret, [options], [callback]) -> token
utils.verifyToken(token, secret, [options], [callback]) -> decoded
utils.extractToken(req, [callback]) -> token
```

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