0.9.0 • Published 9 years ago

@fav/path.resolve v0.9.0

Weekly downloads
6
License
MIT
Repository
github
Last release
9 years ago

@fav/path.resolve NPM version

Provides same behaviors of path.resolve module for all versions of node.js

Install

For installing @fav/path with npm:

$ npm install @fav/path --save

For installing only @fav/path.resolve with npm:

$ npm install @fav/path.resolve --save

Usage

When installing @fav/path:

const path = require('@fav/path');

path.resolve('aaa/bbb/../ccc', 'ddd/eee')
// => '/absolute/path/to/aaa/ccc/ddd/eee'

When installing @fav/path.resolve:

const resolve = require('@fav/path.resolve');

relative('aaa/bbb/../ccc', 'ddd/eee')
// => '/absolute/path/to/aaa/ccc/ddd/eee'

API

resolve()

Resolves a sequence of path segments into an absolute path.

Arguments
  • ...paths string : a sequence of path segments
Errors
  • TypeError : if any of the arguments is not a string.

License

Copyright (C) 2016 Takayuki Sato

This program is free software under MIT License. See the file LICENSE in this distribution for more details.

0.9.0

9 years ago