1.1.0 • Published 5 years ago

ballboy v1.1.0

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

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:

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.

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

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago