Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

checkdir

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

checkdir - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

README.md

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",

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