# data-updater

> ## Install

Latest version **2.2.1** (published 2016-03-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install data-updater
pnpm add data-updater
yarn add data-updater
bun add data-updater
```

## 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.2.1 |
| Published | 2016-03-09 |
| First published | 2014-12-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Roman Grudzinski |
| Maintainers | grudzinski |

## Links

- npm: https://www.npmjs.com/package/data-updater
- npm.io page: https://npm.io/package/data-updater

## Dependencies (3)

- [debug](https://npm.io/package/debug.md) ^2.2.0
- [lodash](https://npm.io/package/lodash.md) ^4.6.1
- [request](https://npm.io/package/request.md) ^2.55.0

## Recent versions

- 2.2.1 (latest) — 2016-03-09
- 2.2.0 — 2016-03-09
- 2.1.0 — 2015-05-22
- 2.0.1 — 2015-05-22
- 2.0.0 — 2015-05-21
- 1.4.0 — 2015-05-17
- 1.3.0 — 2015-03-25
- 1.2.0 — 2015-03-08
- 1.1.1 — 2015-01-29
- 1.1.0 — 2015-01-06
- 1.0.0 — 2014-12-30

## README

# data-updater

## Install

```sh
npm install --save data-updater
```

## Use

```js
var dataUpdater = require('data-updater');

var updater = dataUpdater.fromFile('path/to/data.json', 1000);

updater.on('error', function(err) {
	// Runs if an error occurs to read the data file
});

updater.on('old', function() {
	// Runs when data file was not updated since last attempt
});

updater.on('update', function(data) {
	// Runs when data file was updated sice last attempt
});

update.on('first-update', function(err) {
	// Runs after first update attempt, can be unsuccessful
});

update.on('first-successful-update', function() {
	// Runs after first successful update attempt
});

```

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