New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

colleqtor

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

colleqtor

Seize the directory.

  • 2.2.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Colleqtor

Seize the directory.

What?

Colleqtor is a simple little Node utility that uses fs to list the contents of a directory-- with or without filenames, and import the UTF-8 contents of those files into an array-- associative by filename (with or without extension), or sequential.

Where?

Get it on NPM:

npm install colleqtor --save

Or clone this repo:

git clone https://github.com/austinbillings/Colleqtor

How?

Example

Imagine we have a subdirectory called "documents" that contains 5 .txt files and 2 .log files. Here's an example:

const colleqtor = require('colleqtor');

let docDir = __dirname + '/documents';

colleqtor.listFiles(docDir);
/* something like:
[
  "./test/fifth.txt",
  "./test/first.txt",
  "./test/fourth.txt",
  "./test/megaLog.log",
  "./test/second.txt",
  "./test/third.txt",
  "./test/ultraLog.log"
]
*/

colleqtor.listFiles(docDir, 'log');
//  [ "./test/megaLog.log", "./test/ultraLog.log" ]

colleqtor.listFiles(docDir, 'log', true);
//  [ "megaLog.log", "ultraLog.log" ]

colleqtor.gatherFileNames(docDir, 'log', true);
//  [ "megaLog", "ultraLog" ]



Keywords

FAQs

Package last updated on 26 Feb 2019

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