Socket
Socket
Sign inDemoInstall

is-relative-path

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-relative-path - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

.travis.yml

6

index.js

@@ -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'));

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