# nanostat

> fs.stat() with nanosecond precision

Latest version **0.1.3** (published 2019-06-06) · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2019-06-06 |
| First published | 2019-01-17 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 19.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 0 |
| Author | Joseph Arhar |
| Maintainers | jarhar |

## Links

- npm: https://www.npmjs.com/package/nanostat
- Repository: https://github.com/josepharhar/nanostat
- Issues: https://github.com/josepharhar/nanostat/issues
- npm.io page: https://npm.io/package/nanostat

## Recent versions

- 0.1.3 (latest) — 2019-06-06
- 0.1.2 — 2019-02-20
- 0.1.1 — 2019-02-18
- 0.1.0 — 2019-01-21
- 0.0.2 — 2019-01-17

## README

# nanostat

nanostat is an npm package which provides stat() functionality with higher precision than fs.stat(), including the full nanosecond precision of the underlying stat() call in C.

Hopefully this functionality will be upstreamed to nodejs's builtin fs package, in which case this package will become a polyfill for it.

# Usage

nanostat is intended to mirror fs.stat() and similar functions as closely as possible.

```javascript
const nanostat = require('nanostat');
nanostat.stat('file.txt', (err, stats) => {
  if (err) {
    console.log(`err: ${err}`);
    return;
  }
  console.log(`epoch time (seconds.nanoseconds): ${stats.mtimeMs / 1000}.${stats.mtimeNs}`);
});
```

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