# readify

> Read directory content with file attributes: size, date, owner, mode

Latest version **11.0.0** (published 2026-03-17) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 50/100 (C)** — status: active.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 11.0.0 |
| Published | 2026-03-17 |
| First published | 2014-08-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=22 |
| Dependencies | 8 |
| Unpacked size | 16.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | coderaiser |
| Maintainers | coderaiser |
| Keywords | read, file, directory, stat, size, name, date, owner, uid, format |

## Links

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

## Dependencies (8)

- [nicki](https://npm.io/package/nicki.md) ^6.0.0
- [currify](https://npm.io/package/currify.md) ^4.0.0
- [format-io](https://npm.io/package/format-io.md) ^2.0.0
- [shortdate](https://npm.io/package/shortdate.md) ^2.0.0
- [superstat](https://npm.io/package/superstat.md) ^2.0.0
- [try-to-catch](https://npm.io/package/try-to-catch.md) ^4.0.5
- [@cloudcmd/sortify](https://npm.io/package/@cloudcmd/sortify.md) ^2.0.0
- [@cloudcmd/formatify](https://npm.io/package/@cloudcmd/formatify.md) ^3.0.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 11.0.0 (latest) — 2026-03-17
- 10.0.1 — 2024-08-16
- 10.0.0 — 2024-03-29
- 9.0.0 — 2021-03-01
- 8.0.1 — 2021-01-20
- 8.0.0 — 2021-01-05
- 7.0.6 — 2020-11-10
- 7.0.5 — 2020-04-14
- 7.0.4 — 2020-04-14
- 7.0.3 — 2020-02-25
- 7.0.2 — 2019-10-17
- 7.0.1 — 2019-10-16
- 7.0.0 — 2019-10-11
- 6.2.4 — 2019-10-11
- 6.2.3 — 2019-09-20
- … 62 more at https://npm.io/package/readify/versions

## README

# Readify [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]

[NPMIMGURL]: https://img.shields.io/npm/v/readify.svg?style=flat
[BuildStatusURL]: https://github.com/coderaiser/readify/actions?query=workflow%3A%22Node+CI%22 "Build Status"
[BuildStatusIMGURL]: https://github.com/coderaiser/readify/workflows/Node%20CI/badge.svg
[LicenseIMGURL]: https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat
[NPMURL]: https://npmjs.org/package/readify "npm"
[LicenseURL]: https://tldrlegal.com/license/mit-license "MIT License"
[CoverageURL]: https://coveralls.io/github/coderaiser/readify?branch=master
[CoverageIMGURL]: https://coveralls.io/repos/coderaiser/readify/badge.svg?branch=master&service=github

Read directory content with file attributes: size, date, owner, mode and type.

## Install

With npm:

```
npm i readify
```

## API

### readify(dir [, options, ])

- **dir** - path of a directory
- **options** - `object` can contain:
  - `type` - type of result, could be "raw"
  - `sort` - sort by: name, size, date
  - `order` - "asc" or "desc" for ascending and descending order (default: "asc")

## Examples

```js
import {readify} from 'readify';

const {tryToCatch} = require('try-to-catch');

const [error, data] = await tryToCatch(readify, '/');
console.log(data);
// output
({
    path: '/',
    files: [{
        name: 'readify.js',
        size: '4.22kb',
        date: '20.02.2016',
        owner: 'coderaiser',
        mode: 'rw- rw- r--',
        type: 'file',
    }],
});

readify('/', {
    type: 'raw',
}).then(console.log);

// output
({
    path: '/',
    files: [{
        name: 'readify.js',
        size: 4735,
        date: '2016-11-21T13:37:55.275Z',
        owner: 1000,
        mode: 33_204,
        type: 'file',
    }],
});

readify('/', {
    type: 'raw',
    sort: 'size',
    order: 'desc',
}).then(console.log);

// output
({
    path: '/',
    files: [{
        name: 'readify.js',
        size: 4735,
        date: '2016-11-21T13:37:55.275Z',
        owner: 1000,
        mode: 33_204,
        type: 'file',
    }],
});
```

## License

MIT

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