is-relative-path
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -5,4 +5,4 @@ /** | ||
*/ | ||
module.exports = function(filename) { | ||
return filename.indexOf('..') === 0 || filename.indexOf('.') === 0; | ||
} | ||
module.exports = function (filename) { | ||
return filename[0] === '.'; | ||
}; |
{ | ||
"name": "is-relative-path", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Whether or not a given path is relative", | ||
@@ -10,3 +10,3 @@ "main": "index.js", | ||
"scripts": { | ||
"test": "jscs -p airbnb test index.js && mocha" | ||
"test": "jscs test index.js && mocha" | ||
}, | ||
@@ -28,5 +28,8 @@ "repository": { | ||
"devDependencies": { | ||
"jscs": "~1.13.1", | ||
"mocha": "~2.2.5" | ||
"jscs": "~3.0.3", | ||
"mocha": "~2.4.5" | ||
}, | ||
"jscsConfig": { | ||
"preset": "airbnb" | ||
} | ||
} |
var assert = require('assert'); | ||
var isRelative = require('../'); | ||
describe('is-relative-path', function() { | ||
it('returns true if the given path is relative', function() { | ||
describe('is-relative-path', function () { | ||
it('returns true if the given path is relative', function () { | ||
assert.ok(isRelative('../')); | ||
@@ -15,3 +15,3 @@ assert.ok(isRelative('../foo.js')); | ||
it('returns false if the given path is not relative', function() { | ||
it('returns false if the given path is not relative', function () { | ||
assert.ok(!isRelative('/')); | ||
@@ -18,0 +18,0 @@ assert.ok(!isRelative('/foo.js')); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2126
6