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.2 to 0.1.3

2

bower.json
{
"name": "is-absolute",
"version": "0.1.2",
"version": "0.1.3",
"main": [

@@ -5,0 +5,0 @@ "index.js"

@@ -10,2 +10,4 @@ /*!

var isRelative = require('is-relative');
/**

@@ -38,2 +40,6 @@ * **Example:**

}
};
if (!isRelative(filepath)) {
return true;
}
};
{
"name": "is-absolute",
"description": "Return true if a file path is absolute.",
"version": "0.1.2",
"version": "0.1.3",
"homepage": "https://github.com/jonschlinkert/is-absolute",

@@ -24,9 +24,16 @@ "author": {

"keywords": [
"docs",
"documentation",
"generate",
"generator",
"markdown",
"templates",
"verb"
"absolute",
"check",
"file",
"filepath",
"is",
"normalize",
"path",
"path.relative",
"relative",
"resolve",
"slash",
"slashes",
"uri",
"url"
],

@@ -45,3 +52,6 @@ "main": "index.js",

"verb-tag-jscomments": ">= 0.1.4"
},
"dependencies": {
"is-relative": "^0.1.0"
}
}

@@ -10,3 +10,3 @@ /*!

var expect = require('chai').expect;
var assert = require('assert');
var isAbsolute = require('../');

@@ -16,19 +16,19 @@

it('should support windows', function(){
expect(isAbsolute('c:\\')).to.be.true;
expect(isAbsolute('//C://user\\docs\\Letter.txt')).to.be.true;
expect(!isAbsolute(':\\')).to.be.true;
expect(!isAbsolute('foo\\bar\\baz')).to.be.true;
expect(!isAbsolute('foo\\bar\\baz\\')).to.be.true;
assert(isAbsolute('c:\\'));
assert(isAbsolute('//C://user\\docs\\Letter.txt'));
assert(!isAbsolute(':\\'));
assert(!isAbsolute('foo\\bar\\baz'));
assert(!isAbsolute('foo\\bar\\baz\\'));
});
it('should support windows unc', function(){
expect(isAbsolute('\\\\foo\\bar'))
expect(isAbsolute('//UNC//Server01//user//docs//Letter.txt')).to.be.true;
assert(isAbsolute('\\\\foo\\bar'))
assert(isAbsolute('//UNC//Server01//user//docs//Letter.txt'));
});
it('should support unices', function(){
expect(isAbsolute('/foo/bar')).to.be.true;
expect(!isAbsolute('foo/bar')).to.be.true;
expect(isAbsolute('/user/docs/Letter.txt')).to.be.true;
assert(isAbsolute('/foo/bar'));
assert(!isAbsolute('foo/bar'));
assert(isAbsolute('/user/docs/Letter.txt'));
});
});
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