get-base-path

1.1.1 • Public • Published

get-base-path

Small utility to handle paths for different hosts - for hosting on local/Github/etc.

Usage

import getBasePath from '../';

const url = getBasePath()+'path/to.asset';

console.log(url);

(async () => {
    const response = await fetch(url);

    console.log(response.ok);
})();

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.1
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.1
    2

Package Sidebar

Install

npm i get-base-path

Weekly Downloads

2

Version

1.1.1

License

MIT

Unpacked Size

1.28 kB

Total Files

5

Last publish

Collaborators

  • epok.tech