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

@modjo/core

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@modjo/core - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

4

libs/build.js

@@ -42,7 +42,7 @@ const path = require("path")

function buildDirTree(treeDirs) {
function buildDirTree(treeDirs, { filter } = {}) {
for (const { dir, pattern, dirName } of treeDirs) {
const dirPath = path.resolve(srcDir, dir)
const content = fs.existsSync(dirPath)
? dirtree2static(dirPath, { pattern, loader: treeFileLoader })
? dirtree2static(dirPath, { pattern, loader: treeFileLoader, filter })
: JSON.stringify({})

@@ -49,0 +49,0 @@ const dest = path.join(buildDir, `${dirName || dir}.js`)

{
"name": "@modjo/core",
"version": "1.4.0",
"version": "1.4.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "dependencies": {

@@ -31,15 +31,18 @@ const fs = require("fs")

}
const { pattern, loader } = options
const { pattern, loader, filter = () => true } = options
const stats = fs.lstatSync(filename)
if (stats.isDirectory()) {
const files = fs.readdirSync(filename).filter((file) => {
const absPath = `${filename}/${file}`
const relPath = absPath.slice(rootDir.length)
return (
(typeof pattern === "function"
? pattern(relPath)
: relPath.match(pattern)) ||
fs.lstatSync(`${filename}/${file}`).isDirectory()
)
})
const files = fs
.readdirSync(filename)
.filter(filter)
.filter((file) => {
const absPath = `${filename}/${file}`
const relPath = absPath.slice(rootDir.length)
return (
(typeof pattern === "function"
? pattern(relPath)
: relPath.match(pattern)) ||
fs.lstatSync(`${filename}/${file}`).isDirectory()
)
})

@@ -46,0 +49,0 @@ const results = {}

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