# ripstat

> Fetch the stats for a file as if a saber-tooth tiger is chasing you!

Latest version **2.0.2** (published 2023-02-11) · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2023-02-11 |
| First published | 2021-04-01 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 15.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Maintainers | fabiospampinato |
| Keywords | file, stats, fast |

## Links

- npm: https://www.npmjs.com/package/ripstat
- Repository: https://github.com/fabiospampinato/ripstat
- Homepage: https://github.com/fabiospampinato/ripstat#readme
- Issues: https://github.com/fabiospampinato/ripstat/issues
- npm.io page: https://npm.io/package/ripstat

## Dependencies (1)

- [stubborn-fs](https://npm.io/package/stubborn-fs.md) ^1.2.4

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 2.0.2 (latest) — 2023-02-11
- 2.0.1 — 2023-02-11
- 2.0.0 — 2022-11-07
- 1.1.1 — 2021-04-01
- 1.1.0 — 2021-04-01
- 1.0.0 — 2021-04-01

## README

# `ripstat`

Fetch the stats for a file as if a saber-tooth tiger is chasing you!

## Features

- **Fast**: This is designed to be as fast as possible, and it's probably at least ~2x faster than whatever you are doing currently. If you know how to speed it up further ping me.
- **Reliable**: Stats objects are read reliably, which is something especially important when you are reading thousands of them, chances are the current way you are reading files doesn't account for EMFILE errors at all for example.
- **Non-blocking**: Almost all the work is performed asynchronously, so you'll experience no freezes in the main thread.
- **Non-native**: By using native modules perhaps some more overhead could be trimmed, but native modules are a pain to work with, this uses none of them.

## Install

```sh
npm install --save ripstat
```

## Usage

The following interface is provided for stats objects:

```ts
class Stats {
  dev: number;
  mode: number;
  nlink: number;
  uid: number;
  gid: number;
  rdev: number;
  blksize: number;
  ino: number | bigint;
  size: number;
  blocks: number;
  atimeMs: number;
  mtimeMs: number;
  ctimeMs: number;
  birthtimeMs: number;
  isDirectory (): boolean;
  isFile (): boolean;
  isBlockDevice (): boolean;
  isCharacterDevice (): boolean;
  isSymbolicLink (): boolean;
  isFIFO (): boolean;
  isSocket (): boolean;
}
```

This is how you use it:

```ts
import ripstat from 'ripstat';

const stats = await ripstat ( '/Users/fabio/Desktop/foo.txt' );

console.log ( stats ); // => Stats
```

## License

MIT © Fabio Spampinato

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