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

fs-kit

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs-kit - npm Package Compare versions

Comparing version 0.6.1 to 0.6.2

44

lib/fs.js

@@ -230,3 +230,45 @@ /*

// See also github: kevva/executable (by Kevin Mårtensson)
// A small utility function return true if the path exists AND is a directory
fsKit.isDir = fsKit.isDirectory = async ( path_ ) => {
try {
var stats = await fs.promises.stat( path_ ) ;
}
catch ( error ) {
return false ;
}
return stats.isDirectory() ;
} ;
// A small utility function return true if the path exists AND is a file (not a directory)
fsKit.isFile = async ( path_ ) => {
try {
var stats = await fs.promises.stat( path_ ) ;
}
catch ( error ) {
return false ;
}
return stats.isFile() ;
} ;
// A small utility function return true if the path exists AND is a file (not a directory) AND has exe permission (LINUX ONLY)
fsKit.isExe = async ( path_ ) => {
try {
var stats = await fs.promises.stat( path_ ) ;
}
catch ( error ) {
return false ;
}
return stats.isFile() && fsKit.statsHasExe( stats ) ;
} ;
// See also github: kevva/executable (by Kevin Mårtensson) (LINUX ONLY ATM)
fsKit.statsHasExe = stats => {

@@ -233,0 +275,0 @@ if ( process.platform === 'win32' ) { return true ; }

2

package.json
{
"name": "fs-kit",
"version": "0.6.1",
"version": "0.6.2",
"description": "A Filesystem toolbox.",

@@ -5,0 +5,0 @@ "main": "lib/fs.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