Socket
Socket
Sign inDemoInstall

totalist

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

totalist

A tiny (195B to 220B) utility to recursively list all (total) files in a directory


Version published
Weekly downloads
7.4M
increased by1.17%
Maintainers
1
Weekly downloads
 
Created

What is totalist?

The totalist npm package is a simple, fast utility to recursively list all files in a directory, or totalist. It is designed to be minimalistic and efficient, making it suitable for various applications where you need to process or handle files within a directory structure.

What are totalist's main functionalities?

Recursively list all files

This feature allows you to recursively list all files in a specified directory. The callback function receives the name of each file, its absolute path, and its stats object, which includes properties like file size.

const { totalist } = require('totalist');

async function listFiles(dir) {
  await totalist(dir, (name, abs, stats) => {
    console.log(name, abs, stats.size);
  });
}

listFiles('./path/to/directory');

Other packages similar to totalist

Keywords

FAQs

Package last updated on 03 Apr 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