# ballboy

> Simple file fetcher for your nodejs code. Support HTTP(S) and file protocol

Latest version **1.1.0** (published 2018-12-10) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2018-12-10 |
| First published | 2018-11-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 160.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | mrfranke |
| Maintainers | mrfranke |
| Keywords | nodejs, download, http, https, file |

## Links

- npm: https://www.npmjs.com/package/ballboy
- Repository: https://github.com/MrFranke/ballboy
- Issues: https://github.com/MrFranke/ballboy/issues
- npm.io page: https://npm.io/package/ballboy

## 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.1.0 (latest) — 2018-12-10
- 1.0.5 — 2018-12-10
- 1.0.4 — 2018-12-10
- 1.0.3 — 2018-12-06
- 1.0.2 — 2018-11-19
- 1.0.1 — 2018-11-19
- 1.0.0 — 2018-11-18

## README

# Ballboy
Simple file loader. 

You don't need define protocol of loadable file – just say where 
file located and Ballboy give it to you. 

Supported protocols: `HTTP`, `HTTPS`, `File path`, `file://`.

### Example:
```js
const ballboy = require('ballboy');
const executeConfig = config => console.log(JSON.parse(config));

ballboy('./path/to/config.json').then(executeConfig);
ballboy('http://config.io/config.json').then(executeConfig);
ballboy('https://config.io/config.json').then(executeConfig);
``` 

You can pass http config for authentication, headers e.t.c.

```js
ballboy.HTTPConfig = {
  headers: {
    'Authentication': 'Bearer token',
    'X-Custom-Header': 'foo'
  }
}
```

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