# fs-beautifier

> FS beautifier is an module which use to create beautified files.

Latest version **1.0.6** (published 2023-02-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install fs-beautifier
pnpm add fs-beautifier
yarn add fs-beautifier
bun add fs-beautifier
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2023-02-19 |
| First published | 2023-02-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | dkmca1201 |
| Maintainers | dkmca1201 |
| Keywords | fs, beautifier |

## Links

- npm: https://www.npmjs.com/package/fs-beautifier
- npm.io page: https://npm.io/package/fs-beautifier

## Dependencies (2)

- [pretty](https://npm.io/package/pretty.md) ^2.0.0
- [js-beautify](https://npm.io/package/js-beautify.md) ^1.14.7

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

- 1.0.6 (latest) — 2023-02-19
- 1.0.5 — 2023-02-19
- 1.0.4 — 2023-02-19
- 1.0.3 — 2023-02-18
- 1.0.2 — 2023-02-18
- 1.0.1 — 2023-02-18
- 1.0.0 — 2023-02-18

## README

# Installing
### Package manager

###### Using npm:
```
npm install axios
```
###### Using bower:
```
bower install axios
```
###### Using yarn:
```
yarn add axios
```
###### Using pnpm:
```
pnpm add axios
```

### Guide
###### Once the package is installed, you can import the library using require approach:
```
import * as fs_beautifier from 'fs-beautifier';
```
###### or
```
const fs_beautifier = require('fs-beautifier');
```
### All directory files
```
const {
    all
} = fs_beautifier;

all({
    base: __basedir, //base directory
    directories: ["dir1", "dir1/dir2", "dir2"], //list of directory from base
    useExtension: 'js', //module init extension
    extension: 'js', //file extension
}).catch(error => console.log(error));
```
# From files
### Html
```
const {
    file
} = fs_beautifier;

file.html({
    file: './test/test.css', //file path
    indentSize: 4, //optional
}).catch(error => console.log(error));
```
### Css
```
const {
    file
} = fs_beautifier;

file.css({
    file: './test/test.css', //file path
    indentSize: 2, //optional
}).catch(error => console.log(error));
```
### Js
```
const {
    file
} = fs_beautifier;

file.js({
    file: './test/test.css', //file path
    indentSize: 4, //optional
}).catch(error => console.log(error));
```
### Json
```
const {
    file
} = fs_beautifier;

file.json({
    file: './test/test.css', //file path
    indentSize: 2, //optional
}).catch(error => console.log(error));
```

# With string
### Html
```
const {
    html
} = fs_beautifier;

html({
    data: 'Html string', //some data
    indentSize: 4, //optional
    path: 'path', //if u want to create file
}).catch(error => console.log(error)); //returns Promise
```
### Css
```
const {
    css
} = fs_beautifier;

css({
    data: 'Css string', //some data
    indentSize: 2, //optional
    path: 'path', //if u want to create file
}).catch(error => console.log(error)); //returns Promise
```
### Js
```
const {
    js
} = fs_beautifier;

js({
    data: 'Js string', //some data
    indentSize: 4, //optional
    path: 'path', //if u want to create file
}).catch(error => console.log(error)); //returns Promise
```
### Json
```
const {
    json
} = fs_beautifier;

json({
    data: 'Json string', //some data
    indentSize: 2, //optional
    path: 'path', //if u want to create file
}).catch(error => console.log(error)); //returns Promise
```

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