Socket
Socket
Sign inDemoInstall

directory-tree-md

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.3 to 2.0.4

8

lib/directory-tree-md.js

@@ -56,5 +56,7 @@ 'use strict';

if (options && options.mdconf) {
const content = FS.readFileSync(path).toString().match(/^<!--(\s?[^>]*)-->/);
if (content) {
item.mdconf = strToObj(content[1]);
const contentStr = FS.readFileSync(path).toString();
if (contentStr) {
const contentMatch = contentStr.match(/^<!--(\s?[^>]*)-->/);
item.mdconf = contentMatch ? strToObj(contentMatch[1]) : {};
item.isEmpty = contentMatch ? !String.prototype.trim.call(contentStr.replace(contentMatch[0], '')) : true;
}

@@ -61,0 +63,0 @@ }

{
"name": "directory-tree-md",
"version": "2.0.3",
"version": "2.0.4",
"description": "Convert a directory tree to a JS object.",

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

@@ -53,2 +53,3 @@ # node-directory-tree-md

},
"isEmpty": true,
"size": 23,

@@ -55,0 +56,0 @@ "extension": ".md",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc