pathabs

1.0.0 • Public • Published

pathabs

Resolve the absolute path from a relative or OS-specific path

Installation

npm i pathabs

Importing

Module

import pathabs from "pathabs";

CommonJS

const pathabs = require("pathabs");

Usage

let filePath = "~/Documents/GitHub";

// "~/Documents/GitHub"
console.log(filePath);

filePath = pathabs(filePath);

// "/home/{USER_NAME}/Documents/GitHub" on Linux
// "C:\Users\{USER_NAME}\Documents\GitHub" on Windows
console.log(filePath);

/pathabs/

    Package Sidebar

    Install

    npm i pathabs

    Weekly Downloads

    9

    Version

    1.0.0

    License

    MPL-2.0

    Unpacked Size

    18.7 kB

    Total Files

    8

    Last publish

    Collaborators

    • voidvoxel