Skip to content

itskreisler/dirname-for-module

Repository files navigation

dirname-for-module

Install

npm install @kreisler/dirname-for-module

Usage

import { __dirname } from "@kreisler/dirname-for-module";
// or
import * as dfm from "helper-js";
console.log(dfm.__dirname); // outputs "/path/to/the"

API

Type Document

Include in browser directly

Import dist/index.iife.js. Access functions by global variable dfm. e.g.: dfm.__dirname.