# ischanged

> Is file changed check

Latest version **4.0.0** (published 2021-03-02) · MIT license · 0 weekly downloads

## Install

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

## 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 | 4.0.0 |
| Published | 2021-03-02 |
| First published | 2014-08-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=14 |
| Dependencies | 7 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | coderaiser |
| Maintainers | coderaiser |
| Keywords | file, time, changes |

## Links

- npm: https://www.npmjs.com/package/ischanged
- Repository: https://github.com/coderaiser/ischanged
- Homepage: http://github.com/coderaiser/ischanged
- Issues: https://github.com/coderaiser/ischanged/issues
- npm.io page: https://npm.io/package/ischanged

## Dependencies (7)

- [debug](https://npm.io/package/debug.md) ^4.1.1
- [timem](https://npm.io/package/timem.md) ^3.0.0
- [mkdirp](https://npm.io/package/mkdirp.md) ^1.0.3
- [checkup](https://npm.io/package/checkup.md) ^1.3.0
- [readjson](https://npm.io/package/readjson.md) ^2.0.1
- [writejson](https://npm.io/package/writejson.md) ^3.0.0
- [try-to-catch](https://npm.io/package/try-to-catch.md) ^3.0.0

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 4.0.0 (latest) — 2021-03-02
- 3.0.2 — 2020-03-01
- 3.0.1 — 2020-02-28
- 3.0.0 — 2020-02-28
- 2.0.0 — 2018-06-14
- 1.0.18 — 2016-11-09
- 1.0.17 — 2015-12-16
- 1.0.16 — 2015-06-22
- 1.0.15 — 2015-06-11
- 1.0.14 — 2015-06-11
- 1.0.13 — 2015-06-11
- 1.0.12 — 2015-06-11
- 1.0.11 — 2015-06-09
- 1.0.10 — 2015-06-03
- 1.0.9 — 2015-01-15
- … 9 more at https://npm.io/package/ischanged/versions

## README

# Ischanged [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]

[NPMURL]: https://npmjs.org/package/ischanged "npm"
[NPMIMGURL]: https://img.shields.io/npm/v/ischanged.svg?style=flat&longCache=true
[BuildStatusURL]: https://github.com/coderaiser/ischanged/actions?query=workflow%3A%22Node+CI%22 "Build Status"
[BuildStatusIMGURL]: https://github.com/coderaiser/ischanged/workflows/Node%20CI/badge.svg
[DependencyStatusIMGURL]: https://david-dm.org/coderaiser/ischanged.svg?path=packages/ischanged
[DependencyStatusURL]: https://david-dm.org/coderaiser/ischanged?path=packages/ischanged "Dependency Status"
[CoverageURL]: https://coveralls.io/github/coderaiser/ischanged?branch=master
[CoverageIMGURL]: https://coveralls.io/repos/coderaiser/ischanged/badge.svg?branch=master&service=github

Check time of file modification. If it's changed probable file was changed to.
There is no 100% assurance that is was, but it works much faster then check by hash.

## Install

`npm i ischanged --save`

## Hot to use?

```js
const ischanged = require('ischanged');

const is = await ischanged('/etc/passwd');
// returns
true

await ischanged('/etc/passwd');
// returns
false
```

## How it works?

`Ischanged` saves time of file modification to file `ischanged/<uid>/changes.json`
in Temp directory and then checks whas it changed or not.

So it something like `watch` but:

- should be called by hand;
- could detect modifications after restart of application;

## License

MIT

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