# flutils

> File utilities for Node.js

Latest version **0.5.2** (published 2016-07-09) · MIT license · 0 weekly downloads

## Install

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

## 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.5.2 |
| Published | 2016-07-09 |
| First published | 2016-05-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Nosthertus |
| Maintainers | nosthertus |
| Keywords | file, utilities |

## Links

- npm: https://www.npmjs.com/package/flutils
- Repository: https://github.com/Nosthertus/node-flutils
- Homepage: https://github.com/Nosthertus/node-flutils#readme
- Issues: https://github.com/Nosthertus/node-flutils/issues
- npm.io page: https://npm.io/package/flutils

## 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.5.2 (latest) — 2016-07-09
- 0.5.1 — 2016-07-08
- 0.5.0 — 2016-05-31
- 0.4.0 — 2016-05-02

## README

# Flutils
File utilities for nodejs

## Install
`$ npm install flutils --save`

## How to use
```Javascript
#index.js
var file = require('flutils');

var package = file.loadJSON('package.json');

console.log(package.name);
```

**In ternimal**
```sh
$ node index
flutils
```

## Documentation

**loadJSON([*dir|String*])**
Load JSON file and return parsed JSON
- [dir] directory of the JSON file
- **returns** JSON parsed data

- - -

**loadAll([*dir|String*], [*opts|Object*])**
Load All files in a directory
- [dir] directory to load all files
- [opts ***optional***] options for loading files
- **returns** Object with key as name of the file and value as content of the file

- - -

**readDir([*dir|String*], [*opts|Object*])**
Read the contents of a directory
- [dir] directory to read
- [opts ***optional***] options for reading the directory
- **returns** Array with the list of all files

- - -

**dirExists([*dir|String*])**
Checks if the directory file/folder exists
- [dir] directory to check if exists
- **returns** Boolean

**Opts - Object**
- [type] The extension type of the file

## License
M.I.T

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