# @the-/util-file

> File utility for the-framework

Latest version **15.8.0** (published 2021-04-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @the-/util-file
pnpm add @the-/util-file
yarn add @the-/util-file
bun add @the-/util-file
```

## Health

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

Positive: no vulnerabilities; high maintenance score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 15.8.0 |
| Published | 2021-04-19 |
| First published | 2019-03-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 6 |
| Unpacked size | 89.6 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Taka Okunishi |
| Maintainers | okunishinishi |
| Keywords | the, util |

## Links

- npm: https://www.npmjs.com/package/@the-/util-file
- Repository: https://github.com/the-labo/the
- Homepage: https://github.com/the-labo/the/tree/master/packages/util-file#readme
- Issues: https://github.com/the-labo/the#issues
- npm.io page: https://npm.io/package/@the-/util-file

## Dependencies (6)

- [asfs](https://npm.io/package/asfs.md) ^2.3.0
- [json5](https://npm.io/package/json5.md) ^2.1.3
- [mkdirp](https://npm.io/package/mkdirp.md) ^1.0.4
- [fmtjson](https://npm.io/package/fmtjson.md) ^5.0.2
- [js-yaml](https://npm.io/package/js-yaml.md) ^4.1.0
- [file-type](https://npm.io/package/file-type.md) ^15.0.1

## Alternatives

- [@clerk/clerk-expo](https://npm.io/package/@clerk/clerk-expo.md) — 133.6K weekly downloads
- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads

## Recent versions

- 15.8.0 (latest) — 2021-04-19
- 15.7.7 — 2020-10-01
- 15.7.6 — 2020-08-30
- 15.7.5 — 2020-08-08
- 15.7.4 — 2020-06-05
- 15.7.3 — 2020-05-08
- 15.7.2 — 2020-04-24
- 15.7.1 — 2020-02-08
- 15.7.0 — 2020-02-08
- 15.6.5 — 2020-02-01
- 15.6.4 — 2020-01-25
- 15.6.3 — 2020-01-25
- 15.5.2 — 2019-07-07
- 15.5.0 — 2019-06-11
- 15.4.7 — 2019-05-20
- … 12 more at https://npm.io/package/@the-/util-file/versions

## README

@the-/util-file
==========

<!---
This file is generated by @the-/templates. Do not update manually.
--->

<!-- Badge Start -->
<a name="badges"></a>

[![npm Version][bd_npm_shield_url]][bd_npm_url]

[bd_repo_url]: https://github.com/the-labo/the
[bd_npm_url]: http://www.npmjs.org/package/@the-/util-file
[bd_npm_shield_url]: http://img.shields.io/npm/v/@the-/util-file.svg?style=flat

<!-- Badge End -->


<!-- Description Start -->
<a name="description"></a>

File utility for the-framework

<!-- Description End -->


<!-- Overview Start -->
<a name="overview"></a>




<!-- Overview End -->


<!-- Sections Start -->
<a name="sections"></a>

<!-- Section from "doc/readme/01.Installation.md.hbs" Start -->

<a name="section-doc-readme-01-installation-md"></a>

Installation
-----

```bash
$ npm install @the-/util-file --save
```


<!-- Section from "doc/readme/01.Installation.md.hbs" End -->

<!-- Section from "doc/readme/02.Usage.md.hbs" Start -->

<a name="section-doc-readme-02-usage-md"></a>

Usage
---------

```javascript
'use strict'

const { readAsJsonSync } = require('@the-/util-file')

async function tryExample() {
  const data = readAsJsonSync('conf/foo.json')
  console.log(data)
}

tryExample().catch((err) => console.error(err))

```


<!-- Section from "doc/readme/02.Usage.md.hbs" End -->


<!-- Sections Start -->

<a name="api"></a>

## API Guide


- module:@the-/util-file
  - [.copyAsJsonSync(dest,src)](./doc/api/api.md#module_@the-/util-file.copyAsJsonSync)
  - [.fileSizeOf(filename)](./doc/api/api.md#module_@the-/util-file.fileSizeOf)
  - [.fileTypeOf(filename)](./doc/api/api.md#module_@the-/util-file.fileTypeOf)
  - [.isJSON5File(filename)](./doc/api/api.md#module_@the-/util-file.isJSON5File)
  - [.readAsJson(filename)](./doc/api/api.md#module_@the-/util-file.readAsJson)
  - [.readAsJsonSync(filename)](./doc/api/api.md#module_@the-/util-file.readAsJsonSync)
  - [.readAsYaml(filename,options&#x3D;)](./doc/api/api.md#module_@the-/util-file.readAsYaml)
  - [.statSync(filename)](./doc/api/api.md#module_@the-/util-file.statSync)
  - [.writeAsJson(filename,data,options)](./doc/api/api.md#module_@the-/util-file.writeAsJson)
  - [.writeAsJsonSync(filename,data,options)](./doc/api/api.md#module_@the-/util-file.writeAsJsonSync)
  - [.writeAsYaml(filename,data,options)](./doc/api/api.md#module_@the-/util-file.writeAsYaml)
- module.module:@the-/util-file
  - [.delSync(filename)](./doc/api/api.md#module.module_@the-/util-file.delSync)

See [API Guide](./doc/api/api.md) for more detail


<!-- LICENSE Start -->
<a name="license"></a>

License
-------
This software is released under the [MIT License](https://github.com/the-labo/the/blob/master/LICENSE).

<!-- LICENSE End -->


<!-- Links Start -->
<a name="links"></a>

Links
------

+ [THE Labo][the_labo_url]

[the_labo_url]: https://github.com/the-labo

<!-- Links End -->

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