# @ladjs/store-ip-address

> Stores user's IP address in the background for Lad

Latest version **0.0.7** (published 2019-12-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ladjs/store-ip-address
pnpm add @ladjs/store-ip-address
yarn add @ladjs/store-ip-address
bun add @ladjs/store-ip-address
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2019-12-10 |
| First published | 2017-09-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.3 |
| Dependencies | 2 |
| Unpacked size | 11.1 KB |
| Known vulnerabilities | 0 (+4 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Nick Baugh |
| Maintainers | niftylettuce |
| Keywords | @ladjs/store-ip-address, lass |

## Links

- npm: https://www.npmjs.com/package/@ladjs/store-ip-address
- Repository: https://github.com/ladjs/store-ip-address
- Issues: https://github.com/ladjs/store-ip-address/issues
- npm.io page: https://npm.io/package/@ladjs/store-ip-address

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^4.1.1
- [validator](https://npm.io/package/validator.md) ^12.1.0

## Recent versions

- 0.0.7 (latest) — 2019-12-10
- 0.0.6 — 2019-09-06
- 0.0.5 — 2018-05-21
- 0.0.4 — 2017-12-14
- 0.0.3 — 2017-09-15
- 0.0.2 — 2017-09-11
- 0.0.1 — 2017-09-09

## README

# [**@ladjs/store-ip-address**](https://github.com/ladjs/store-ip-address)

[![build status](https://img.shields.io/travis/ladjs/store-ip-address.svg)](https://travis-ci.org/ladjs/store-ip-address)
[![code coverage](https://img.shields.io/codecov/c/github/ladjs/store-ip-address.svg)](https://codecov.io/gh/ladjs/store-ip-address)
[![code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![made with lass](https://img.shields.io/badge/made_with-lass-95CC28.svg)](https://lass.js.org)
[![license](https://img.shields.io/github/license/ladjs/store-ip-address.svg)](<>)

> Stores user's IP address in the background for Lad


## Table of Contents

* [Install](#install)
* [Usage](#usage)
* [Contributors](#contributors)
* [License](#license)


## Install

[npm][]:

```sh
npm install @ladjs/store-ip-address
```

[yarn][]:

```sh
yarn add @ladjs/store-ip-address
```


## Usage

> With standard [logger][]:

App:

```js
const StoreIPAddress = require('@ladjs/store-ip-address');

// ...

const storeIPAddress = new StoreIPAddress();
app.use(storeIPAddress.middleware);
```

Mongoose user model:

```js
const storeIPAddress = new StoreIPAddress();
User.plugin(storeIPAddress.plugin);
```

> With custom [logger][] instance:

App:

```js
const StoreIPAddress = require('@ladjs/store-ip-address');
const Logger = require('@ladjs/logger');

// ...

const storeIPAddress = new StoreIPAddress({ logger: new Logger() });
app.use(storeIPAddress.middleware);
```

> With custom fields to store on user model instead of `ip` and `last_ips`:

App:

```js
const StoreIPAddress = require('@ladjs/store-ip-address');
const Logger = require('@ladjs/logger');

// ...

const storeIPAddress = new StoreIPAddress({
  ip: 'ip_address',
  lastIps: 'last_ip_addresses'
});

app.use(storeIPAddress.middleware);
```

Mongoose user model:

```js
const storeIPAddress = new StoreIPAddress({
  ip: 'ip_address',
  lastIps: 'last_ip_addresses'
});

User.plugin(storeIPAddress.plugin);
```


## Contributors

| Name           | Website                    |
| -------------- | -------------------------- |
| **Nick Baugh** | <http://niftylettuce.com/> |


## License

[MIT](LICENSE) © [Nick Baugh](http://niftylettuce.com/)


## 

[npm]: https://www.npmjs.com/

[yarn]: https://yarnpkg.com/

[logger]: https://github.com/ladjs/logger

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