@fav/path.resolve

0.9.0 • Public • Published

@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.

Readme

Keywords

Package Sidebar

Install

npm i @fav/path.resolve

Weekly Downloads

0

Version

0.9.0

License

MIT

Last publish

Collaborators

  • sttk