A reader of fidoconfig (Fidonet configuration) files.
npm install fidoconfig
This module (fidoconfig) is a reader of fidoconfig (Fidonet configuration) files. These files are mostly used by Husky Portable Fidonet project.
This module is written in JavaScript and requires Node.js to run.
* Starting from v1.0.0, fidoconfig requires Node.js version 4.0.0 or newer because it is rewritten in ECMAScript 2015 (ES6).
* You may run older versions of fidoconfig (that precede v1.0.0) on older Node.js versions (0.10.x or 0.12.x). However, those older versions of Node.js are themselves not maintained by their developers after 2016-12-31.
It is tested against Node.js v4.x, Node.js v5.x, Node.js v6.x, Node.js v7.x and the latest stable version of Node.js.
This module is currently in an early phase of its development and thus does not have the desired level of feature completeness.
npm install fidoconfig
npm install https://github.com/Mithgol/node-fidoconfig/tarball/master
README because the package's version is not planned to grow after changes when they happen in README only. (And npm publish --force is forbidden nowadays.)
require() the installed module, you get an object with the following method:
options.encoding value (by default, 'utf8') is used. You may use any encoding provided by the iconv-lite module.
# characters in the lines' beginnings) but your real configuration lines must be uncommented.
EchoArea (literally), then a whitespace-separated echotag (such as Ru.FTN.Develop for example), then a whitespace-separated full path (without the extensions) to the echomail files of the area, in that order. (A sequence of several whitespaces is also a supported separator.) The rest of the configuration line is also whitespace-separated from the path.
-d "some description" is found on the same line, it is used as the echomail area's description.
String.prototype.toLowerCase method). Values of these properties are also objects that describe individual echomail areas; these objects have the following properties:
configName — area name (echotag) as given in the configuration file (might be not lowercase);
passthrough — true if the echomail area works in the passthrough mode, false otherwise;
path — the path to the message base of the echomail area (or the word 'passthrough' if the area works in the passthrough mode and thus there is no message base);
description — the echomail area's description (or null if the description was not given).
.area(areaName, callback) — checks if the given areaName (not case-sensitive) exists among the object's properties and then does one of the following:
callback({notFound: true}) is called.
callback({passthrough: true}) is called.
callback(null, areaData) is called. The areaData object (received by that callback) describes the designated echomail area (it has the properties such as path or description as explained above); however, it is a clone of the original object's property and thus the changes of these properties' values won't affect the original object.
.getAreaNames() — returns an array containing all of the area names (lowercase).
npm install mocha -g) or locally (npm install mocha in the directory of the fidoconfig module).
npm install jshint -g) or locally (npm install jshint in the directory of the fidoconfig module).
npm test (in the directory of the fidoconfig module).
LICENSE file).