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

dir2tree

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dir2tree

a user-friendly Node.js tool for creating organized directory trees from a root directory. It offers customization options for tailored tree generation and content analysis

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14
increased by600%
Maintainers
1
Weekly downloads
 
Created
Source

Install

npm install dir2tree

Import

Common Js

const dir2tree=require("dir2tree")

Es Module

import dir2tree from dir2tree

Syntaxe

Initialise

const MyTree=dire2tree(ROOT,OPTIONS,CALLBACKS)
MyTree.write("generated_file.json")

Arguments

  • ROOT : The path to the root directory that we want handle. it's required
  • OPTIONS : An object containing various configuration options to control the behavior of the tree generation.it's optional , These options might include :
    • fileContent : (Boolean)
    • fileName : (Boolean)
    • fileExtension : (Boolean)
    • length : (Boolean)
    • size : (Boolean)
    • linesCount : (Boolean)
    • created : (Boolean)
    • lastModified : (Boolean)
    • skip :
      • folder : (String[])
      • file : (String[])
      • extension : (String[])
    • sortBy : (String) , possible values : "names","extension","size","lines","created","lastmodified",
    • order : (Number)
  • CALLBACKS : it's optional

Methodes

  • .write(file_name)

License

This projet is licensed under the terms of MIT License .

Keywords

FAQs

Package last updated on 23 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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