Comparing version 1.0.0 to 1.1.0
14
index.js
'use strict'; | ||
var fs = require('mz/fs'); | ||
module.exports = function checkdir(dir) { | ||
module.exports = function checkdir(dir, options) { | ||
function isDirEmpty(files) { | ||
var noOfFiles = files.length; | ||
var empty = files.length === 0; | ||
var filteredFiles; | ||
var noOfFiles; | ||
var empty; | ||
if (options && options.ignoreDotFiles) { | ||
filteredFiles = files.filter(function (file) { | ||
return file.indexOf('.') !== 0; | ||
}); | ||
} | ||
noOfFiles = filteredFiles ? filteredFiles.length : files.length; | ||
empty = noOfFiles === 0; | ||
@@ -9,0 +17,0 @@ return { |
{ | ||
"name": "checkdir", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Check if dir exists, if it's empty and how many files are directly inside it.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
4104
5
30
1
69