New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

is-package-file

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-package-file - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

index_test.js

6

index.js
'use strict';
var validateNpmPackageName = require('validate-npm-package-name');
var expression = /\/node_modules\/(([^@/]+)|(@([^/]+))\/([^/]+))(?:\/|\.js$)/;
var expression = /[/\\]node_modules[/\\](@[^/\\]+[/\\][^/\\]+|[^/\\]+)/;

@@ -9,5 +9,7 @@ function isPackageFile(filePath) {

var report;
var id;
if (match) {
report = validateNpmPackageName(match[1]);
id = match[1].replace(/\\/, '/');
report = validateNpmPackageName(id);
isValidPackage = report.validForNewPackages;

@@ -14,0 +16,0 @@ }

{
"name": "is-package-file",
"version": "0.0.2",
"version": "0.0.3",
"author": "Eric Bednarz <github@bednarz.nl>",

@@ -13,3 +13,3 @@ "license": "MIT",

"scripts": {
"test": "mocha"
"test": "mocha *_test.js"
},

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

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