# @imdt-os/url-tail

> This package allows you to monitor changes to a remote file using polling of an external URL. This polling uses HTTP range, so only new data is transferred.

Latest version **0.0.5** (published 2021-08-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @imdt-os/url-tail
pnpm add @imdt-os/url-tail
yarn add @imdt-os/url-tail
bun add @imdt-os/url-tail
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2021-08-10 |
| First published | 2021-08-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | iMDT |
| Maintainers | tiagojacobs, tdj-br |
| Keywords | tail, follow, remote, url, http, range |

## Links

- npm: https://www.npmjs.com/package/@imdt-os/url-tail
- Repository: https://github.com/iMDT/url-tail
- Homepage: https://github.com/iMDT/url-tail#readme
- Issues: https://github.com/iMDT/url-tail/issues
- npm.io page: https://npm.io/package/@imdt-os/url-tail

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 0.0.5 (latest) — 2021-08-10
- 0.0.4 — 2021-08-02
- 0.0.3 — 2021-08-02
- 0.0.2 — 2021-08-02
- 0.0.1 — 2021-08-02

## README

# url-tail

This package allows you to monitor changes to a remote file using polling of an external URL.

This polling uses HTTP range, so only new data is transferred.

## Usage

```sh
npm install @imdt-os/url-tail
```

## Sample code

```js
const urlTail = require('@imdt-os/url-tail');
const destroy = urlTail("http://127.0.0.1/log.txt", ()=>{
    console.error("Error");
}, (newData, reset)=>{
    if(reset){
        console.log("Discard old data - file was truncated");
    }
    console.log("New data available", newData);
}, {debug: false});

setTimeout( destroy, 60000 ); // Destroy it after 10s
```

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