1.1.2 • Published 4 years ago

@epok.tech/get-base-path v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

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);
})();