path-format

1.2.1 • Public • Published

path-format

Node.js path.format(pathObject) polyfill.

Install

$ npm install --save path-format

Usage

var pathFormat = require('path-format');
 
pathFormat({
    root : "/",
    dir : "/home/user/dir",
    base : "file.txt",
    ext : ".txt",
    name : "file"
})
//=> '/home/user/dir/file.txt'

API

pathFormat(path)

See path.format(pathObject) docs.

pathFormat.posix(path)

The Posix specific version.

pathFormat.win32(path)

The Windows specific version.

/path-format/

    Package Sidebar

    Install

    npm i path-format

    Weekly Downloads

    779

    Version

    1.2.1

    License

    MIT

    Last publish

    Collaborators

    • 00dani