UNPKG

apg-js-examples

Version:

Examples of using the suite of apg-js applications and libraries.

25 lines (24 loc) 1.01 kB
/* ************************************************************************************* * copyright: Copyright (c) 2021 Lowell D. Thomas, all rights reserved * license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause) * ********************************************************************************* */ // This application will read an initialization file with anonymous keys, disjointed sections // and disjointed keys. // It will collect the key values in each section found and then display the found data // alphabetizing the section names and the key names within each section. (function basic() { const fs = require('node:fs'); const setup = require('./setup'); try { const inputStr = fs.readFileSync('./src/ini-file/basic.txt', 'utf8'); setup(inputStr, null, null); } catch (e) { console.log(); console.log('input error'); console.dir(e, { showHidden: true, depth: null, colors: true, }); } })();