# @creenv/file-loader

> a tiny file loading library

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

## Install

```sh
npm install @creenv/file-loader
pnpm add @creenv/file-loader
yarn add @creenv/file-loader
bun add @creenv/file-loader
```

## 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-24 |
| First published | 2018-10-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Baptiste Crespy |
| Maintainers | bcrespy |

## Links

- npm: https://www.npmjs.com/package/@creenv/file-loader
- Repository: https://github.com/bcrespy/creenv-file-loader
- Issues: https://github.com/bcrespy/creenv-file-loader/issues
- npm.io page: https://npm.io/package/@creenv/file-loader

## Recent versions

- 0.0.1 (latest) — 2018-10-24

## README

# @creenv/loader 

A tiny file loader 

```js
import FileLoader from "@creenv/file-loader";

let file;

FileLoader("/path/to/my/file").then((filedata) => {
  file = filedata;
  console.log(filedata);
}).catch((err) => {
  console.error(err);
});
```

## *function* Fileloader (**filepath**: *string*, **responseType**: *string)

| argument | type | default | what for ? |
| --- | --- | --- | --- |
| **filepath** | *string* | | the path to the file, relative to the script or to the server root depending on which case suits the best for you |
| **responseType** | *string* | | the type of response expected, cf: the type of the file requested. A list of valid responseType is available under the [XHTML Media Types - Second Edition](https://www.w3.org/TR/xhtml-media-types/) page.

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