# tomorrow

> Predict anonymous visitors tomorrow based on anonymous visitors today and -beyond

Latest version **9.0.3** (published 2014-07-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install tomorrow
pnpm add tomorrow
yarn add tomorrow
bun add tomorrow
```

## 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 | 9.0.3 |
| Published | 2014-07-12 |
| First published | 2013-09-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Sandro Pasquali |
| Maintainers | sandropasquali |
| Keywords | hyperloglog, redis, fingerprinting, anonymous, unique |

## Links

- npm: https://www.npmjs.com/package/tomorrow
- Repository: https://github.com/sandro-pasquali/tomorrow
- Issues: https://github.com/sandro-pasquali/tomorrow/issues
- npm.io page: https://npm.io/package/tomorrow

## Dependencies (2)

- [redis](https://npm.io/package/redis.md) *
- [hiredis](https://npm.io/package/hiredis.md) *

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 9.0.3 (latest) — 2014-07-12
- 9.0.2 — 2014-07-11
- 9.0.1 — 2014-07-11
- 0.0.2 — 2013-09-04

## README

Tomorrow
========

> Close your eyes and I'll kiss you, tomorrow I'll miss you -- The Beatles

Experimental service to provide a count of unique ANONYMOUS visitors to a website.

Not having access to a unique id (cookie, session, etc), we attempt to fingerprint a user through examining their browser topology (device fingerprinting -- see https://panopticlick.eff.org/)

Now that we have a lot of fingerprints, how do we efficiently store them, and get unique counts? For this we use a HyperLogLog, as implemented in Redis.

```
require('tomorrow').start({
	port : 8081, // Optional. Port to run server on.
	redisPass : "foobar", // Optional. Redis password.
	redisPort : 6379 // Optional. Port Redis is running on.
})
```

This starts a server with three routes:

* /test - will load test.html file so you can play with library
* /fingerprint - returns a js library that takes user fingerprints.
* /log/:fingerprint - sending a :fingerprint hash to /log stores the print.
* /count - returns the current cardinality (estimate of unique fingerprints)

On the client, get the library via /fingerprint, then run this JavaScript command to get the current client's unique fingerprint: 

new Fingerprint().get()

Optionally, you can add more accuracy with canvas:

new Fingerprint({canvas: true}).get())

( http://cseweb.ucsd.edu/~hovav/dist/canvas.pdf )

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