@fav/path.join

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

Usage no npm install needed!

<script type="module">
  import favPathJoin from 'https://cdn.skypack.dev/@fav/path.join';
</script>

README

@fav/path.join NPM version

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

Install

For installing @fav/path with npm:

$ npm install @fav/path --save

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

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

Usage

When installing @fav/path:

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

path.join('/path/to', 'foo', '..', 'file.txt');
// => /path/to/file.txt

When installing @fav/path.join:

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

join('/path/to', 'foo', '..', 'file.txt');
// => /path/to/file.txt

API

join(path[, ...])

Checks if a file path is absolute.

Arguments
  • path [string] : a sequence of path segments.
Errors
  • [TypeError] : if any of the path segments 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.