Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

path-is-absolute

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

path-is-absolute

Node.js 0.12 path.isAbsolute() ponyfill

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
21M
decreased by-53.67%
Maintainers
1
Weekly downloads
 
Created

What is path-is-absolute?

The path-is-absolute npm package provides a simple utility to check if a given path is an absolute path. In different operating systems, an absolute path is defined differently, and this package takes those differences into account, offering a consistent API across environments.

What are path-is-absolute's main functionalities?

Check if a path is absolute

This feature allows you to check if a given path string represents an absolute path on the current operating system. The function returns a boolean value: true if the path is absolute, and false otherwise.

var pathIsAbsolute = require('path-is-absolute');
console.log(pathIsAbsolute('/home/foo')); // On Unix: true
console.log(pathIsAbsolute('C:\\path\\to\\file')); // On Windows: true
console.log(pathIsAbsolute('foo/bar')); // false

Other packages similar to path-is-absolute

Keywords

FAQs

Package last updated on 30 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc