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

is-absolute

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-absolute - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

4

package.json
{
"name": "is-absolute",
"description": "Return true if a file path is absolute.",
"version": "0.1.4",
"version": "0.1.5",
"homepage": "https://github.com/jonschlinkert/is-absolute",

@@ -50,3 +50,3 @@ "author": {

"verb": ">= 0.2.6",
"verb-tag-jscomments": ">= 0.1.4"
"verb-tag-jscomments": ">= 0.2.0"
},

@@ -53,0 +53,0 @@ "dependencies": {

@@ -10,7 +10,21 @@ /*!

var path = require('path');
var assert = require('assert');
var isAbsolute = require('../');
var isAbsolute = require('./');
describe('isAbsolute()', function(){
it('should support windows', function(){
describe('isAbsolute()', function () {
it('should support node.js', function () {
assert(isAbsolute(__dirname));
assert(isAbsolute(__filename));
assert(isAbsolute(path.join(process.cwd())));
assert(isAbsolute(path.resolve(process.cwd(), 'README.md')));
assert(!isAbsolute(path.relative(process.cwd(), 'README.md')));
});
it('should work with glob patterns', function () {
assert(isAbsolute(path.join(process.cwd(), 'pages/*.txt')));
assert(!isAbsolute('pages/*.txt'));
});
it('should support windows', function () {
assert(isAbsolute('c:\\'));

@@ -23,3 +37,3 @@ assert(isAbsolute('//C://user\\docs\\Letter.txt'));

it('should support windows unc', function(){
it('should support windows unc', function () {
assert(isAbsolute('\\\\foo\\bar'))

@@ -29,3 +43,3 @@ assert(isAbsolute('//UNC//Server01//user//docs//Letter.txt'));

it('should support unices', function(){
it('should support unices', function () {
assert(isAbsolute('/foo/bar'));

@@ -32,0 +46,0 @@ assert(!isAbsolute('foo/bar'));

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