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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    4
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    4
  • 0.0.0
    2

Package Sidebar

Install

npm i pathabs

Weekly Downloads

6

Version

1.0.0

License

MPL-2.0

Unpacked Size

18.7 kB

Total Files

8

Last publish

Collaborators

  • voidvoxel