Just what I need, and nothing more.

Copyright © Joe Honton 2016


Regression tests developed with Bequiesce


The library is a collection of ECMAScript 2015 classes for writing node.js application software with no npm module dependencies.


With the new object oriented programming (OOP) syntax introduced in ECMAScript 2015, specifically the keywords class, extends, new, constructor, super, get, set, and static, there is a fresh opportunity to reconsider how to best implement common patterns in JavaScript application development.

The library builds from the node.js core, expanding it with capabilities related to the server's file system; control of execution; and contract by design principles.

Contract by Design

JavaScript does not have a type system. This makes for a beautiful environment where everything is polymorphic (if that's what your solution needs); but it makes for a troubling environment when trying to create functions with strict rules of correctness. This is one of the chief stumbling blocks for expert-level programmers getting their first taste of JavaScript; and it's an ongoing source of confusion when libraries are used by third parties who misunderstand functions, their arguments, and their return values.

A function, in the global namespace, for asserting the correct type of an object.

File system

Almost every node.js application needs to access the file system: this is what makes it different from browser-based JavaScript code. The classes in this category help with finding, managing, and handling file I/O.

A class to assemble and disassemble POSIX file paths, and to access OS file system attributes.
A class to search the file system for files matching a regular expression.
A class to read line-delimited text files.
A class to write line-delimited text files.

String operations

Character sequences are among the most common data structures in most business applications. There are many common patterns for manipulating strings, but only a few core JavaScript built-ins. There's plenty of room for improvement here, with the idea that dividing the problem-space into many domain-specific classes is the best solution to this opportunity.

A class to provide text concatenation and truncation methods.

Logging facility

Every library needs the facilities of a good logging system in order to trace, profile, monitor, and interrupt the execution of code.

This facility dispenses with the classic log-level approach (info, debug, warning, error, fatal) and instead uses filtering categories that reflect the type of operation that is the focus of the logging.
Captures the current stack or the current function for logging purposes.


Security needs to be on everyone's mind when transfering data across the public Internet. The node.js crypto core functions provide most of the needed functionality; this library adds just enough of a wrapper to make things easier to use.

A class to hash a file's contents into an SHA1 key.

There's only one Joe Honton.