local-or-remote

0.0.6 • Public • Published

local-or-remote

Fetches a local or remote (http) resource

Installing

npm install --save local-or-remote

Usage

const loadFile = require('local-or-remote')

loadFile(resource, timeout).then((data) => {
	console.log(data);
});
  • timeout (opt.): integer containing the number of milliseconds to wait for a server to send response headers before aborting the request (if fetched from a remote resource). Default: 20000.

Readme

Keywords

none

Package Sidebar

Install

npm i local-or-remote

Weekly Downloads

0

Version

0.0.6

License

MIT

Unpacked Size

2.18 kB

Total Files

3

Last publish

Collaborators

  • amohoste