1.2.1 • Published 9 years ago

path-format v1.2.1

Weekly downloads
2,734
License
MIT
Repository
github
Last release
9 years ago

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.