# path-is-fresh

> A human-friendly tool for checking file freshness

Latest version **1.0.0** (published 2017-10-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install path-is-fresh
pnpm add path-is-fresh
yarn add path-is-fresh
bun add path-is-fresh
```

## 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.0 |
| Published | 2017-10-25 |
| First published | 2017-10-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Zeke Sikelianos |
| Maintainers | zeke |

## Links

- npm: https://www.npmjs.com/package/path-is-fresh
- Repository: https://github.com/zeke/path-is-fresh
- Homepage: https://github.com/zeke/path-is-fresh#readme
- Issues: https://github.com/zeke/path-is-fresh/issues
- npm.io page: https://npm.io/package/path-is-fresh

## Dependencies (1)

- [human-interval](https://npm.io/package/human-interval.md) ^0.1.6

## Recent versions

- 1.0.0 (latest) — 2017-10-25

## README

# path-is-fresh 

A human-friendly tool for checking file freshness

## Installation

```sh
npm install path-is-fresh --save
```

## Usage

The module exports a single function:

```js
const pathIsFresh = require('path-is-fresh')
```

The first argument should be a fully-qualified path to a file or directory:

```js
pathIsFresh('/some/file-created-in-the-last-hour.txt')
// true

pathIsFresh('/some/file-created-ages-ago.txt')
// false
```

To customize the freshness threshold, specify a 
[human interval](http://ghub.io/human-interval)
string like `10 seconds` or `1 minute` or `3 days` as the second argument:

```js
pathIsFresh('/some/file.txt', '3 weeks')
// true
```

If the given path doesn't exist, the function will return false:

```js
pathIsFresh('nonexistent-file')
// false
```

## Tests

```sh
npm install
npm test
```

## Dependencies

- [human-interval](https://github.com/rschmukler/human-interval): Human readable time measurements

## Dev Dependencies

- [chai](https://github.com/chaijs/chai): BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
- [mocha](https://github.com/mochajs/mocha): simple, flexible, fun test framework
- [standard](https://github.com/standard/standard): JavaScript Standard Style
- [standard-markdown](): Test your Markdown files for Standard JavaScript Style™
- [timekeeper](https://github.com/vesln/timekeeper): Easy testing of time-dependent code.
- [tmp](): Temporary file and directory creator


## License

MIT

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