# directory-metadata

> A simple module to get directory or file metadata

Latest version **0.0.1** (published 2018-10-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install directory-metadata
pnpm add directory-metadata
yarn add directory-metadata
bun add directory-metadata
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2018-10-26 |
| First published | 2018-10-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.3 |
| Dependencies | 1 |
| Unpacked size | 7.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Shaun Warman |
| Maintainers | shaunwarman |
| Keywords | directory, file, metadata, size |

## Links

- npm: https://www.npmjs.com/package/directory-metadata
- Repository: https://github.com/shaunwarman/directory-metadata
- Issues: https://github.com/shaunwarman/directory-metadata/issues
- npm.io page: https://npm.io/package/directory-metadata

## Dependencies (1)

- [recursive-readdir](https://npm.io/package/recursive-readdir.md) ^2.2.2

## 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

- 0.0.1 (latest) — 2018-10-26

## README

# directory-metadata

[![build status](https://img.shields.io/travis/shaunwarman/directory-metadata.svg)](https://travis-ci.com/shaunwarman/directory-metadata)
[![code coverage](https://img.shields.io/codecov/c/github/shaunwarman/directory-metadata.svg)](https://codecov.io/gh/shaunwarman/directory-metadata)
[![code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![made with lass](https://img.shields.io/badge/made_with-lass-95CC28.svg)](https://lass.js.org)
[![license](https://img.shields.io/github/license/shaunwarman/directory-metadata.svg)](LICENSE)
[![npm downloads](https://img.shields.io/npm/dt/directory-metadata.svg)](https://npm.im/directory-metadata)

> A simple module to get directory or file metadata

## Table of Contents
* [Install](#install)
* [Usage](#usage)
* [Contributors](#contributors)
* [License](#license)

## Install

[npm][]:

```sh
npm install directory-metadata
```

[yarn][]:

```sh
yarn add directory-metadata
```


## Usage

```js
const {getFileMetadata, getDirectoryMetadata} = require('directory-metadata');

const directoryMetadata = getDirectoryMetadata(dirpath);
console.log(directoryMetadata);
// {
//   directorySize: 14535,
//   fileCount: 24,
//   fileTypes: {
//     js: 18,
//     css: 4,
//     html: 2
//   }
// }
```


## Contributors
| Name             | Website                   |
| ---------------- | ------------------------- |
| **Shaun Warman** | <https://shaunwarman.com> |

## License
[MIT](LICENSE) © [Shaun Warman](https://shaunwarman.com)

##

[npm]: https://www.npmjs.com/

[yarn]: https://yarnpkg.com/

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