Socket
Socket
Sign inDemoInstall

hotfile

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hotfile - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

10

index.js

@@ -32,4 +32,14 @@ const p = require('path')

}
static async exists(file) {
return fs.promises.access(file, fs.constants.F_OK)
.then(() => true).catch(() => false)
}
async exists(file) {
return fs.promises.access(file, fs.constants.F_OK)
.then(() => true).catch(() => false)
}
}
module.exports = Hotfile

2

package.json
{
"name": "hotfile",
"version": "0.0.2",
"version": "0.0.3",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -63,16 +63,11 @@ # hotfile

}
/* rewriting map function with default settings */
static async map(path, options = {}){
const items = await this.readdir(path, options)
for(let i = 0; i < items.length; i++){
if(items[i].isDirectory) items[i].children = await this.map(items[i].path, options)
}
return items
return await super.map(path, {
exclude: /(^|\/)\.[^\/\.]/g,
model: this
})
}
static async mkdir(path){
return fs.promises.mkdir(path, { recursive: true })
.then(() => new Hotfile(path)).catch(() => false)
}
async rename(name, ext){

@@ -79,0 +74,0 @@ if(ext) this.ext = ext

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