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.2.0 to 0.2.1

11

index.js

@@ -203,3 +203,3 @@ const fs = require('fs')

async loaddir(path, depth = 0, options = {}){
const { id, cb, files, exclude, include, $include, $exclude } = options
const { id, cb, files, exclude, include, $include, $exclude, allow } = options
let items = await fs.promises.readdir(path)

@@ -212,3 +212,3 @@

if($include) items = items.filter(o => $include.find(regex => (regex).test(o)))
items = items.map(o => new Hotfile(p.join(path, o)))

@@ -223,3 +223,8 @@

if(!this.files) this.files = []
this.files.push(items[i])
if(allow){
const ext = items[i].ext
if(allow.includes(ext)) this.files.push(items[i])
}else{
this.files.push(items[i])
}
}

@@ -226,0 +231,0 @@

{
"name": "hotfile",
"version": "0.2.0",
"version": "0.2.1",
"description": "Hotfile makes working with folders and files in node-js easy and clear.",

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