is-package-file
Advanced tools
Comparing version 0.0.2 to 0.0.3
'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": { |
7777
6
101