2.2.3 • Published 2 years ago

colleqtor v2.2.3

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago

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" ]
2.2.3

2 years ago

2.2.2

2 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.1.0

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago