NPM Smell 🍑💨

trivial and outdated NPM packages

is-absolute outdated npm logo

Convoluted way to call path.isAbsolute

Weekly Downloads
5,842,655
Dependencies
4
Latest Release
7 years ago
This dependency re-creates a native Node.js API. It is recommended to use the native API instead
Outedated
First version with native support
Node.js 0.11.2
added to Node.js
11 years ago

Dependency Tree

is-absolute
  is-relative
    is-unc-path
      unc-path-regex
  is-windows

About

Checks if a path is absolute.

To check if a path is absolute, you can use the builtin Node.js method path.isAbsolute:

const path = require("path");

path.isAbsolute("/foo/bar"); // true
path.isAbsolute("foo/bar"); // false
path.isAbsolute("C:\\foo\\bar"); // true
path.isAbsolute("C:/foo/bar"); // true
path.isAbsolute("C:\\"); // true
path.isAbsolute("C:"); // false
path.isAbsolute("."); // false
path.isAbsolute(".."); // false