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

@jeefo/fs

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jeefo/fs - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

37

index.js

@@ -60,14 +60,2 @@ /* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.

my_fs.readdir = dirname => promise_wrapper((resolve, reject) => {
fs.readdir(dirname, (err, files) => err ? reject(err) : resolve(files));
});
my_fs.mkdir = (dirpath, options = {}) => promise_wrapper((resolve, reject) => {
fs.mkdir(dirpath, options, err => err ? reject(err) : resolve());
});
my_fs.ensure_dir = dirpath => async_wrapper(async () => {
await fs.mkdir(dirpath, {recursive: true});
});
my_fs.readFile = (filepath, options) => promise_wrapper((resolve, reject) => {

@@ -158,6 +146,27 @@ fs.readFile(

my_fs.remove_dir = async_wrapper(async dirname => {
if (await my_fs.exists(dirname)) return _rmdir(dirname);
my_fs.readdir = dirname => promise_wrapper((resolve, reject) => {
fs.readdir(dirname, (err, files) => err ? reject(err) : resolve(files));
});
my_fs.mkdir = (dirpath, options = {}) => promise_wrapper((resolve, reject) => {
fs.mkdir(dirpath, options, err => err ? reject(err) : resolve());
});
my_fs.remove_dir = async_wrapper(async dirpath => {
try {
const stat = await my_fs.stat(dirpath);
if (stat.isDirectory()) {
await _rmdir(dirpath);
} else {
throw new Error(`dirpath: '${dirpath}' is not a directory`);
}
} catch (e) {
if (e.code !== "ENOENT") throw e;
}
});
my_fs.ensure_dir = dirpath => async_wrapper(async () => {
await fs.mkdir(dirpath, {recursive: true});
});
my_fs.remove = filepath => promise_wrapper((resolve, reject) => {

@@ -164,0 +173,0 @@ fs.stat(filepath, async (err, stats) => {

{
"name": "@jeefo/fs",
"version": "0.0.4",
"version": "0.0.5",
"homepage": "https://github.com/je3f0o/fs",

@@ -5,0 +5,0 @@ "copyright": "2020",

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