@fav/path.isabsolute

0.9.0 • Public • Published

@fav/path.isabsolute NPM version

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

Install

For installing @fav/path with npm:

$ npm install @fav/path --save

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

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

Usage

When installing @fav/path:

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

path.isAbsolute('/path/to/file.txt');
// => true

path.isAbsolute('path/to/file.txt');
// => false

When installing @fav/path.isabsolute:

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

isAbsolute('/path/to/file.txt');
// => true

isAbsolute('path/to/file.txt');
// => false

API

isAbsolute(path)

Checks if a file path is absolute.

Arguments
  • path [string] : a path string.
Errors
  • [TypeError] : if path 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.isabsolute

Weekly Downloads

1

Version

0.9.0

License

MIT

Last publish

Collaborators

  • sttk