Commit e1bb8041 authored by Tony Butler's avatar Tony Butler

Add more RegExp+handlers: samedir local links with no dotslash, and hashlinks...

Add more RegExp+handlers: samedir local links with no dotslash, and hashlinks to internal anchor-ids
parent 81e7aac4
...@@ -36,7 +36,11 @@ Assert.isType('Function', highlightExtension[0].filter) ...@@ -36,7 +36,11 @@ Assert.isType('Function', highlightExtension[0].filter)
showdown.extension('highlight', highlightExt) showdown.extension('highlight', highlightExt)
let uriMaps = {} let uriMaps = {}
const re1 = new RegExp('^([./].*/)([^/]+\\.md)$') const localExps = {
dotSlashPath: new RegExp('^[./].*/([^/]+\\.md)$'),
noPath: new RegExp('^([^/]+\\.md)$'),
hashDash: new RegExp('^(#[a-z0-9]+-.*)$')
}
const linkfixExp = new RegExp('( href=")([^"]+)(")', 'igs') const linkfixExp = new RegExp('( href=")([^"]+)(")', 'igs')
const linkfixExt = () => { const linkfixExt = () => {
return [{ return [{
...@@ -46,14 +50,24 @@ const linkfixExt = () => { ...@@ -46,14 +50,24 @@ const linkfixExt = () => {
do { do {
part = linkfixExp.exec(text) part = linkfixExp.exec(text)
if (part) { if (part) {
const part1 = text.slice(0, part.index) + part[1]
const part2 = part[3] + text.slice(part.index + part[0].length)
const href = Parser.htmlUnescape(part[2]) const href = Parser.htmlUnescape(part[2])
const m = href.match(re1) let m = false
if (m && m[1] && m[2]) { for (const localExp of ['dotSlashPath', 'noPath', 'hashDash']) {
for (const uri of Object.keys(converter.uriMap).sort().filter((v) => v.indexOf('/' + m[2]) > -1)) { m = href.match(localExps[localExp])
const newHref = ['/', '/'].join(converter.uriMap[uri][0]) if (m && m[1]) {
text = `${part1}${newHref}${part2}` const part1 = text.slice(0, part.index) + part[1]
const part2 = part[3] + text.slice(part.index + part[0].length)
if (m[1].indexOf('#') === 0) {
const newHref = m[1].replace(/-/g, '')
text = `${part1}${newHref}${part2}`
} else {
for (const uri of Object.keys(converter.uriMap).sort().filter(
(v) => { return v.indexOf('/' + m[1]) > -1 })
) {
const newHref = ['/', '/'].join(converter.uriMap[uri][0])
text = `${part1}${newHref}${part2}`
}
}
} }
} }
} }
......
...@@ -15,9 +15,9 @@ eg: if statements or other logic.</p> ...@@ -15,9 +15,9 @@ eg: if statements or other logic.</p>
</code></pre> </code></pre>
<ul> <ul>
<li><code>Assert</code> and <code>expect</code> are both synonyms for the <li><code>Assert</code> and <code>expect</code> are both synonyms for the
<a href="#class-assert">Assert</a> class itself</li> <a href="#classassert">Assert</a> class itself</li>
<li><code>Assert.Error</code> is the extended version of the standard <li><code>Assert.Error</code> is the extended version of the standard
<a href="#class-assertionerror"><code>AssertionError</code></a> and should be used instead <a href="#classassertionerror"><code>AssertionError</code></a> and should be used instead
(for readability)</li> (for readability)</li>
</ul> </ul>
<hr /> <hr />
...@@ -112,7 +112,7 @@ to improve matching types:</p> ...@@ -112,7 +112,7 @@ to improve matching types:</p>
<li><code>Function</code> Will compare the string value</li> <li><code>Function</code> Will compare the string value</li>
</ul> </ul>
<p>If none of the above types are passed, the assertion will be tested <p>If none of the above types are passed, the assertion will be tested
against <a href="#static-asserteqval1-val2"><code>Assert.eq(val1, val2)</code></a></p> against <a href="#staticasserteqval1val2"><code>Assert.eq(val1, val2)</code></a></p>
<h3 id="staticassertdateval1val2options"><code>static Assert.date(val1, val2, options)</code></h3> <h3 id="staticassertdateval1val2options"><code>static Assert.date(val1, val2, options)</code></h3>
<ul> <ul>
<li><code>val1</code> {Date} Base date</li> <li><code>val1</code> {Date} Base date</li>
...@@ -212,45 +212,45 @@ method call. These methods return <code>true</code>, otherwise they throw again ...@@ -212,45 +212,45 @@ method call. These methods return <code>true</code>, otherwise they throw again
through fashion. These are generally used for anti-testing to ensure the through fashion. These are generally used for anti-testing to ensure the
bounds and type checks are working.</p> bounds and type checks are working.</p>
<p>The <code>msg</code> argument is the same as documented in the <p>The <code>msg</code> argument is the same as documented in the
<a href="#static-assertcatchv1-v2-msg-method">parent method</a>.</p> <a href="#staticassertcatchv1v2msgmethod">parent method</a>.</p>
<h3 id="assertassertcatchval1val2msg"><code>Assert.assert.catch(val1, val2, msg)</code></h3> <h3 id="assertassertcatchval1val2msg"><code>Assert.assert.catch(val1, val2, msg)</code></h3>
<ul> <ul>
<li>arguments as in <a href="#static-assertassertval1-val2">assert method</a></li> <li>arguments as in <a href="#staticassertassertval1val2">assert method</a></li>
</ul> </ul>
<h3 id="asserteqcatchval1val2msg"><code>Assert.eq.catch(val1, val2, msg)</code></h3> <h3 id="asserteqcatchval1val2msg"><code>Assert.eq.catch(val1, val2, msg)</code></h3>
<ul> <ul>
<li>arguments as in <a href="#static-asserteqval1-val2">eq method</a></li> <li>arguments as in <a href="#staticasserteqval1val2">eq method</a></li>
</ul> </ul>
<h3 id="asserteqdeepcatchval1val2msg"><code>Assert.eqDeep.catch(val1, val2, msg)</code></h3> <h3 id="asserteqdeepcatchval1val2msg"><code>Assert.eqDeep.catch(val1, val2, msg)</code></h3>
<ul> <ul>
<li>arguments as in <a href="#static-asserteqdeepval1-val2">eqDeep method</a></li> <li>arguments as in <a href="#staticasserteqdeepval1val2">eqDeep method</a></li>
</ul> </ul>
<h3 id="assertistypecatchtypevaluemsg"><code>Assert.isType.catch(type, value, msg)</code></h3> <h3 id="assertistypecatchtypevaluemsg"><code>Assert.isType.catch(type, value, msg)</code></h3>
<ul> <ul>
<li>arguments as in <a href="#static-assertistypetype-value">isType method</a></li> <li>arguments as in <a href="#staticassertistypetypevalue">isType method</a></li>
</ul> </ul>
<h3 id="assertisabovecatchbasetestmsg"><code>Assert.isAbove.catch(base, test, msg)</code></h3> <h3 id="assertisabovecatchbasetestmsg"><code>Assert.isAbove.catch(base, test, msg)</code></h3>
<ul> <ul>
<li>arguments as in <a href="#static-assertisabovebase-test">isAbove method</a></li> <li>arguments as in <a href="#staticassertisabovebasetest">isAbove method</a></li>
</ul> </ul>
<h3 id="assertisbelowcatchbasetestmsg"><code>Assert.isBelow.catch(base, test, msg)</code></h3> <h3 id="assertisbelowcatchbasetestmsg"><code>Assert.isBelow.catch(base, test, msg)</code></h3>
<ul> <ul>
<li>arguments as in <a href="#static-assertisbelowbase-test">isBelow method</a></li> <li>arguments as in <a href="#staticassertisbelowbasetest">isBelow method</a></li>
</ul> </ul>
<h3 id="assertminimumcatchbasetestmsg"><code>Assert.minimum.catch(base, test, msg)</code></h3> <h3 id="assertminimumcatchbasetestmsg"><code>Assert.minimum.catch(base, test, msg)</code></h3>
<ul> <ul>
<li>arguments as in <a href="#static-assertminimumbase-test">minimum method</a></li> <li>arguments as in <a href="#staticassertminimumbasetest">minimum method</a></li>
</ul> </ul>
<h3 id="assertmaximumcatchbasetestmsg"><code>Assert.maximum.catch(base, test, msg)</code></h3> <h3 id="assertmaximumcatchbasetestmsg"><code>Assert.maximum.catch(base, test, msg)</code></h3>
<ul> <ul>
<li>arguments as in <a href="#static-assertmaximumbase-test">maximum method</a></li> <li>arguments as in <a href="#staticassertmaximumbasetest">maximum method</a></li>
</ul> </ul>
<h3 id="assertneqcatchval1val2msg"><code>Assert.neq.catch(val1, val2, msg)</code></h3> <h3 id="assertneqcatchval1val2msg"><code>Assert.neq.catch(val1, val2, msg)</code></h3>
<ul> <ul>
<li>arguments as in <a href="#static-assertneqval1-val2">neq method</a></li> <li>arguments as in <a href="#staticassertneqval1val2">neq method</a></li>
</ul> </ul>
<h3 id="assertisokcatchvaluemessagemsg"><code>Assert.isOk.catch(value, message, msg)</code></h3> <h3 id="assertisokcatchvaluemessagemsg"><code>Assert.isOk.catch(value, message, msg)</code></h3>
<ul> <ul>
<li>arguments as in <a href="#static-assertisokvalue-message">isOk method</a></li> <li>arguments as in <a href="#staticassertisokvaluemessage">isOk method</a></li>
<li>With two args it will clone the second to the third</li> <li>With two args it will clone the second to the third</li>
</ul> </ul>
\ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<p>This library manages Database connections that are stored through <p>This library manages Database connections that are stored through
instances registered to this library.</p> instances registered to this library.</p>
<h2 id="classdatabase">Class: Database</h2> <h2 id="classdatabase">Class: Database</h2>
<p><code>Database</code> extends <code>Connect</code> see <a href="/doc/connect/">Connect.md</a> for more engine <p><code>Database</code> extends <code>Connect</code> see <a href="/doc/connect/">Connect</a> for more engine
management and more.</p> management and more.</p>
<h3 id="staticdatabasequeryoptionsconfigprofiler">static Database.queryOptions(config, profiler)</h3> <h3 id="staticdatabasequeryoptionsconfigprofiler">static Database.queryOptions(config, profiler)</h3>
<ul> <ul>
...@@ -45,7 +45,7 @@ connections <code>connect()</code> method.</li> ...@@ -45,7 +45,7 @@ connections <code>connect()</code> method.</li>
<p>Note: when no <code>name</code> is provided all connections will be closed.</p> <p>Note: when no <code>name</code> is provided all connections will be closed.</p>
<h2 id="classdatabaseengine">Class: DatabaseEngine</h2> <h2 id="classdatabaseengine">Class: DatabaseEngine</h2>
<p><code>DatabaseEngine</code> extends <code>ConnectEngine</code> see <p><code>DatabaseEngine</code> extends <code>ConnectEngine</code> see
<a href="/doc/connect-engine/">ConnectEngine.md</a> for more engine management and more.</p> <a href="/doc/connect-engine/">ConnectEngine</a> for more engine management and more.</p>
<h3 id="databaseengineconnect">DatabaseEngine.connect()</h3> <h3 id="databaseengineconnect">DatabaseEngine.connect()</h3>
<p>Must be extended and used to connect to underlying database.</p> <p>Must be extended and used to connect to underlying database.</p>
<h3 id="databaseengineclose">DatabaseEngine.close()</h3> <h3 id="databaseengineclose">DatabaseEngine.close()</h3>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<p>This library provides a register for Email handlers to register and receive <p>This library provides a register for Email handlers to register and receive
email messages through the system.</p> email messages through the system.</p>
<h2 id="classemail">Class: Email</h2> <h2 id="classemail">Class: Email</h2>
<p><code>Email</code> extends <code>Connect</code> see <a href="/doc/connect/">Connect.md</a> for more engine <p><code>Email</code> extends <code>Connect</code> see <a href="/doc/connect/">Connect</a> for more engine
management and more.</p> management and more.</p>
<h3 id="staticemailgetinstance">static Email.getInstance()</h3> <h3 id="staticemailgetinstance">static Email.getInstance()</h3>
<ul> <ul>
...@@ -27,6 +27,6 @@ Return {Promise} that resolves when the message is sent.</li> ...@@ -27,6 +27,6 @@ Return {Promise} that resolves when the message is sent.</li>
<p>Note: when no <code>name</code> is provided all handlers are executed.</p> <p>Note: when no <code>name</code> is provided all handlers are executed.</p>
<h2 id="classemailengine">Class: EmailEngine</h2> <h2 id="classemailengine">Class: EmailEngine</h2>
<p><code>EmailEngine</code> extends <code>ConnectEngine</code> see <p><code>EmailEngine</code> extends <code>ConnectEngine</code> see
<a href="/doc/connect-engine/">ConnectEngine.md</a> for more engine management and more.</p> <a href="/doc/connect-engine/">ConnectEngine</a> for more engine management and more.</p>
<h3 id="emailenginesend">EmailEngine.send()</h3> <h3 id="emailenginesend">EmailEngine.send()</h3>
<p>Must be extended and used to send to underlying email system.</p> <p>Must be extended and used to send to underlying email system.</p>
\ No newline at end of file
...@@ -12,7 +12,7 @@ used for tracking user behavior such as database changes etc.</p> ...@@ -12,7 +12,7 @@ used for tracking user behavior such as database changes etc.</p>
<p>Note: This is not to be confused with the core Node.JS <code>EventEmitter</code> which <p>Note: This is not to be confused with the core Node.JS <code>EventEmitter</code> which
serves a much different programmable purpose.</p> serves a much different programmable purpose.</p>
<h2 id="classevent">Class: Event</h2> <h2 id="classevent">Class: Event</h2>
<p><code>Event</code> extends <code>Connect</code> see <a href="/doc/connect/">Connect.md</a> for more engine <p><code>Event</code> extends <code>Connect</code> see <a href="/doc/connect/">Connect</a> for more engine
management and more.</p> management and more.</p>
<h3 id="staticeventgetinstance">static Event.getInstance()</h3> <h3 id="staticeventgetinstance">static Event.getInstance()</h3>
<ul> <ul>
...@@ -98,6 +98,6 @@ handler can read.</li> ...@@ -98,6 +98,6 @@ handler can read.</li>
</ul> </ul>
<h2 id="classeventengine">Class: EventEngine</h2> <h2 id="classeventengine">Class: EventEngine</h2>
<p><code>EventEngine</code> extends <code>ConnectEngine</code> see <p><code>EventEngine</code> extends <code>ConnectEngine</code> see
<a href="/doc/connect-engine/">ConnectEngine.md</a> for more engine management and more.</p> <a href="/doc/connect-engine/">ConnectEngine</a> for more engine management and more.</p>
<h3 id="eventengineevent">EventEngine.event()</h3> <h3 id="eventengineevent">EventEngine.event()</h3>
<p>Must be extended and used to send to underlying event system.</p> <p>Must be extended and used to send to underlying event system.</p>
\ No newline at end of file
...@@ -18,10 +18,11 @@ ES6+ fs module with all the core functions. This provides a more intuitive API ...@@ -18,10 +18,11 @@ ES6+ fs module with all the core functions. This provides a more intuitive API
and cleaner usage.</p> and cleaner usage.</p>
<h2 id="classfilesystem">Class: FileSystem</h2> <h2 id="classfilesystem">Class: FileSystem</h2>
<p>This class is based on Node.JS File System module, see <p>This class is based on Node.JS File System module, see
<a href="https://github.com/nodejs/node/blob/master/doc/api/fs.md">this documentation</a> <a href="https://nodejs.org/api/fs.html">this documentation</a>
for instructions using these methods. Otherwise, see the document for the for instructions using these methods. Otherwise, see the document for the
Node.JS version you are using such as Node.JS version you are using such as:
<a href="https://nodejs.org/dist/latest-v12.x/docs/api/fs.html">this one</a></p> <a href="https://nodejs.org/dist/latest-v10.x/docs/api/fs.html">v10.x</a> or
<a href="https://nodejs.org/dist/latest-v12.x/docs/api/fs.html">v12.x</a>, etc</p>
<p>NOTE: All methods are static.</p> <p>NOTE: All methods are static.</p>
<p>Usage:</p> <p>Usage:</p>
<pre><code class="js language-js"><span class="hljs-keyword">const</span> fs = <span class="hljs-built_in">require</span>(<span class="hljs-string">'kado/lib/FileSystem'</span>) <pre><code class="js language-js"><span class="hljs-keyword">const</span> fs = <span class="hljs-built_in">require</span>(<span class="hljs-string">'kado/lib/FileSystem'</span>)
...@@ -35,7 +36,7 @@ documentation are listed below.</p> ...@@ -35,7 +36,7 @@ documentation are listed below.</p>
<h3 id="filesystemaccesspathmode">FileSystem.access(path, mode)</h3> <h3 id="filesystemaccesspathmode">FileSystem.access(path, mode)</h3>
<p>Refer to <a href="https://nodejs.org/dist/latest-v12.x/docs/api/fs.html#fs_fspromises_access_path_mode">fsPromises.access</a></p> <p>Refer to <a href="https://nodejs.org/dist/latest-v12.x/docs/api/fs.html#fs_fspromises_access_path_mode">fsPromises.access</a></p>
<h3 id="filesystemaccesssyncpathmode">FileSystem.accessSync(path, mode)</h3> <h3 id="filesystemaccesssyncpathmode">FileSystem.accessSync(path, mode)</h3>
<p>Refer to <a href="https://nodejs.org/dist/latest-v12.x/docs/api/fs.html#fsaccesssyncpath-mode">fs.accessSync</a></p> <p>Refer to <a href="https://nodejs.org/dist/latest-v12.x/docs/api/fs.html#fs_fs_accesssync_path_mode">fs.accessSync</a></p>
<h3 id="filesystemappendfilepathdataoptions">FileSystem.appendFile(path, data, options)</h3> <h3 id="filesystemappendfilepathdataoptions">FileSystem.appendFile(path, data, options)</h3>
<p>Refer to <a href="https://nodejs.org/dist/latest-v12.x/docs/api/fs.html#fs_fspromises_appendfile_path_data_options">fsPromises.appendFile</a></p> <p>Refer to <a href="https://nodejs.org/dist/latest-v12.x/docs/api/fs.html#fs_fspromises_appendfile_path_data_options">fsPromises.appendFile</a></p>
<h3 id="filesystemappendfilesyncpathdataoptions">FileSystem.appendFileSync(path, data, options)</h3> <h3 id="filesystemappendfilesyncpathdataoptions">FileSystem.appendFileSync(path, data, options)</h3>
......
...@@ -32,7 +32,7 @@ commas).</p> ...@@ -32,7 +32,7 @@ commas).</p>
<h3 id="staticformatmagnitudevalopts"><code>static Format.magnitude(val, opts)</code></h3> <h3 id="staticformatmagnitudevalopts"><code>static Format.magnitude(val, opts)</code></h3>
<ul> <ul>
<li><code>val</code> {mixed} number, or string containing parsable number-like data</li> <li><code>val</code> {mixed} number, or string containing parsable number-like data</li>
<li><code>opts</code> {object} options, as <a href="#magnitude-options">described below</a></li> <li><code>opts</code> {object} options, as <a href="#magnitudeoptions">described below</a></li>
<li>Returns: {string} input <code>n</code> reformatted as directed</li> <li>Returns: {string} input <code>n</code> reformatted as directed</li>
</ul> </ul>
<p>Converts input number to the best possible human-readable magnitude, at optional <p>Converts input number to the best possible human-readable magnitude, at optional
...@@ -52,7 +52,7 @@ comma and dot usage; <code>undefined</code> uses system default locale</li> ...@@ -52,7 +52,7 @@ comma and dot usage; <code>undefined</code> uses system default locale</li>
<h3 id="staticformatbytesnumberoptions"><code>static Format.bytes(number, options)</code></h3> <h3 id="staticformatbytesnumberoptions"><code>static Format.bytes(number, options)</code></h3>
<ul> <ul>
<li><code>number</code> {mixed} number, or string containing parsable number-like data</li> <li><code>number</code> {mixed} number, or string containing parsable number-like data</li>
<li><code>options</code> {object} options, as <a href="#bytes-options">described below</a></li> <li><code>options</code> {object} options, as <a href="#bytesoptions">described below</a></li>
<li>Returns: {string} input <code>n</code> reformatted as directed</li> <li>Returns: {string} input <code>n</code> reformatted as directed</li>
</ul> </ul>
<p>Functionally similar to "prettyBytes", adapted here to reduce dependency. <p>Functionally similar to "prettyBytes", adapted here to reduce dependency.
...@@ -93,10 +93,10 @@ and/or HTML-safe output</p> ...@@ -93,10 +93,10 @@ and/or HTML-safe output</p>
<h3 id="staticformatcolormessagefgcbgcsetrst"><code>static Format.color(message, fgc, bgc, set, rst)</code></h3> <h3 id="staticformatcolormessagefgcbgcsetrst"><code>static Format.color(message, fgc, bgc, set, rst)</code></h3>
<ul> <ul>
<li><code>message</code> {mixed} number, or string containing parsable number-like data</li> <li><code>message</code> {mixed} number, or string containing parsable number-like data</li>
<li><code>fgc</code> {string} <a href="#valid-color-names">color</a> of foreground</li> <li><code>fgc</code> {string} <a href="#validcolornames">color</a> of foreground</li>
<li><code>bgc</code> {string} <a href="#valid-color-names">color</a> of background</li> <li><code>bgc</code> {string} <a href="#validcolornames">color</a> of background</li>
<li><code>set</code> {string} <a href="#valid-style-names">style</a> to set</li> <li><code>set</code> {string} <a href="#validstylenames">style</a> to set</li>
<li><code>rst</code> {string} <a href="#valid-style-names">style</a> to reset</li> <li><code>rst</code> {string} <a href="#validstylenames">style</a> to reset</li>
<li>Returns: {string} input message wrapped in ANSI terminal style and color</li> <li>Returns: {string} input message wrapped in ANSI terminal style and color</li>
</ul> </ul>
<p>Allows for terminal-destined output to have basic color and styling added.</p> <p>Allows for terminal-destined output to have basic color and styling added.</p>
......
...@@ -34,13 +34,13 @@ http://pubs.opengroup.org/onlinepubs/009695399/utilities/getopts.html</li> ...@@ -34,13 +34,13 @@ http://pubs.opengroup.org/onlinepubs/009695399/utilities/getopts.html</li>
<h3 id="staticgetoptgetinstanceargvoptstringoptind"><code>static GetOpt.getInstance(argv, optstring, optind)</code></h3> <h3 id="staticgetoptgetinstanceargvoptstringoptind"><code>static GetOpt.getInstance(argv, optstring, optind)</code></h3>
<ul> <ul>
<li><em>Options same as main constructor, <li><em>Options same as main constructor,
<a href="#getoptconstructorargv-optstring-optind">below</a></em></li> <a href="#getoptconstructorargvoptstringoptind">below</a></em></li>
<li>Returns: {GetOpt} current (or if none, new) instance of GetOpt</li> <li>Returns: {GetOpt} current (or if none, new) instance of GetOpt</li>
</ul> </ul>
<h3 id="getoptconstructorargvoptstringoptind"><code>GetOpt.constructor(argv, optstring, optind)</code></h3> <h3 id="getoptconstructorargvoptstringoptind"><code>GetOpt.constructor(argv, optstring, optind)</code></h3>
<ul> <ul>
<li><code>argv</code> {Array} Arguments, usually directly from <code>process.argv</code></li> <li><code>argv</code> {Array} Arguments, usually directly from <code>process.argv</code></li>
<li><code>optstring</code> {string} See <a href="#format-of-optstring">Below</a> (Default: result of <li><code>optstring</code> {string} See <a href="#formatofoptstring">Below</a> (Default: result of
<a href="#getoptbuildoptionstringargv"><code>GetOpt.buildOptionString(argv)</code></a>)</li> <a href="#getoptbuildoptionstringargv"><code>GetOpt.buildOptionString(argv)</code></a>)</li>
<li><code>optind</code> {number} Offset within <code>argv</code> to begin parsing (Default: <code>2</code>)</li> <li><code>optind</code> {number} Offset within <code>argv</code> to begin parsing (Default: <code>2</code>)</li>
<li>Returns: {GetOpt} new instance of <code>GetOpt</code></li> <li>Returns: {GetOpt} new instance of <code>GetOpt</code></li>
...@@ -76,7 +76,7 @@ options with unexpected arguments are encountered.</p> ...@@ -76,7 +76,7 @@ options with unexpected arguments are encountered.</p>
<h3 id="getoptparseoptionstringoptstring"><code>GetOpt.parseOptionString(optstring)</code></h3> <h3 id="getoptparseoptionstringoptstring"><code>GetOpt.parseOptionString(optstring)</code></h3>
<ul> <ul>
<li><code>optstring</code> {string} Any string following the <li><code>optstring</code> {string} Any string following the
<a href="#format-of-optstring">rules above</a></li> <a href="#formatofoptstring">rules above</a></li>
<li>Returns {void}</li> <li>Returns {void}</li>
</ul> </ul>
<p>Parse the option string and update the following internal vars:</p> <p>Parse the option string and update the following internal vars:</p>
...@@ -105,7 +105,7 @@ standard, but is read-only. (If you want to reset OPTIND, you must create a new ...@@ -105,7 +105,7 @@ standard, but is read-only. (If you want to reset OPTIND, you must create a new
<code>GetOpt</code> instance.) This is most useful after parsing has finished to <code>GetOpt</code> instance.) This is most useful after parsing has finished to
examine the non-option arguments.</p> examine the non-option arguments.</p>
<p>This value starts at <code>2</code> as described under <p>This value starts at <code>2</code> as described under
<a href="#departures-from-posix"><em>Departures from POSIX</em></a> below.</p> <a href="#departuresfromposix"><em>Departures from POSIX</em></a> below.</p>
<h3 id="getoptgetopt"><code>GetOpt.getopt()</code></h3> <h3 id="getoptgetopt"><code>GetOpt.getopt()</code></h3>
<ul> <ul>
<li><p>Returns {mixed} the next argument specified in <code>argv</code> (the objects constructor <li><p>Returns {mixed} the next argument specified in <code>argv</code> (the objects constructor
......
...@@ -11,7 +11,7 @@ within the system.</p> ...@@ -11,7 +11,7 @@ within the system.</p>
<p>There is a <code>HyperTextEngine</code> library that provides the needed implementation to <p>There is a <code>HyperTextEngine</code> library that provides the needed implementation to
setup traditional web servers into this abstraction layer.</p> setup traditional web servers into this abstraction layer.</p>
<h2 id="classhypertext">Class: HyperText</h2> <h2 id="classhypertext">Class: HyperText</h2>
<p><code>HyperText</code> extends <code>Connect</code> see <a href="/doc/connect/">Connect.md</a> for more engine <p><code>HyperText</code> extends <code>Connect</code> see <a href="/doc/connect/">Connect</a> for more engine
management and more.</p> management and more.</p>
<h3 id="statichypertextgetinstance">static HyperText.getInstance()</h3> <h3 id="statichypertextgetinstance">static HyperText.getInstance()</h3>
<ul> <ul>
...@@ -29,7 +29,7 @@ management and more.</p> ...@@ -29,7 +29,7 @@ management and more.</p>
</ul> </ul>
<h2 id="classhypertextengine">Class: HyperTextEngine</h2> <h2 id="classhypertextengine">Class: HyperTextEngine</h2>
<p><code>HyperTextEngine</code> extends <code>ConnectEngine</code> see <p><code>HyperTextEngine</code> extends <code>ConnectEngine</code> see
<a href="/doc/connect-engine/">ConnectEngine.md</a> for more engine management and more.</p> <a href="/doc/connect-engine/">ConnectEngine</a> for more engine management and more.</p>
<h3 id="hypertextenginestart">HyperTextEngine.start()</h3> <h3 id="hypertextenginestart">HyperTextEngine.start()</h3>
<p>Must be extended and used to start the underlying server.</p> <p>Must be extended and used to start the underlying server.</p>
<h3 id="hypertextenginestop">HyperTextEngine.stop()</h3> <h3 id="hypertextenginestop">HyperTextEngine.stop()</h3>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<p>This library provides logging abstraction to use different log transports <p>This library provides logging abstraction to use different log transports
for system level log messages.</p> for system level log messages.</p>
<h2 id="classlog">Class: Log</h2> <h2 id="classlog">Class: Log</h2>
<p><code>Log</code> extends <code>Connect</code> see <a href="/doc/connect/">Connect.md</a> for more engine <p><code>Log</code> extends <code>Connect</code> see <a href="/doc/connect/">Connect</a> for more engine
management and more.</p> management and more.</p>
<h3 id="staticlogappendfilepathdata">static Log.appendFile(path, data)</h3> <h3 id="staticlogappendfilepathdata">static Log.appendFile(path, data)</h3>
<ul> <ul>
...@@ -32,4 +32,4 @@ management and more.</p> ...@@ -32,4 +32,4 @@ management and more.</p>
</ul> </ul>
<h2 id="classlogengine">Class: LogEngine</h2> <h2 id="classlogengine">Class: LogEngine</h2>
<p><code>LogEngine</code> extends <code>ConnectEngine</code> see <p><code>LogEngine</code> extends <code>ConnectEngine</code> see
<a href="/doc/connect-engine/">ConnectEngine.md</a> for more engine management and more.</p> <a href="/doc/connect-engine/">ConnectEngine</a> for more engine management and more.</p>
\ No newline at end of file \ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<p>The <code>Mapper</code> library provides a functional interface for Object handling.</p> <p>The <code>Mapper</code> library provides a functional interface for Object handling.</p>
<h2 id="classmapper">Class: Mapper</h2> <h2 id="classmapper">Class: Mapper</h2>
<p>Mapper is a general-purpose Object handling toolkit. Some functions are <p>Mapper is a general-purpose Object handling toolkit. Some functions are
<a href="#static-stateless-functions">static</a> and may be used as shortcuts rather than <a href="#staticstatelessfunctions">static</a> and may be used as shortcuts rather than
creating a full instance.</p> creating a full instance.</p>
<h3 id="staticmappergetinstancedata"><code>static Mapper.getInstance (data)</code></h3> <h3 id="staticmappergetinstancedata"><code>static Mapper.getInstance (data)</code></h3>
<ul> <ul>
...@@ -28,19 +28,19 @@ creating a full instance.</p> ...@@ -28,19 +28,19 @@ creating a full instance.</p>
<h3 id="mappergetkey"><code>Mapper.get (key)</code></h3> <h3 id="mappergetkey"><code>Mapper.get (key)</code></h3>
<ul> <ul>
<li><code>key</code> {mixed} path to requested data (see <li><code>key</code> {mixed} path to requested data (see
<a href="#static-mapperparsekey-key">parseKey</a> for valid types)</li> <a href="#staticmapperparsekeykey">parseKey</a> for valid types)</li>
<li>Returns: {mixed} data from key location</li> <li>Returns: {mixed} data from key location</li>
</ul> </ul>
<h3 id="mappersetkeyvalue"><code>Mapper.set (key, value)</code></h3> <h3 id="mappersetkeyvalue"><code>Mapper.set (key, value)</code></h3>
<ul> <ul>
<li><code>key</code> {mixed} path to target (see <li><code>key</code> {mixed} path to target (see
<a href="#static-mapperparsekey-key">parseKey</a> for valid types)</li> <a href="#staticmapperparsekeykey">parseKey</a> for valid types)</li>
<li><code>value</code> {mixed} data to place at key location</li> <li><code>value</code> {mixed} data to place at key location</li>
<li>Returns: {mixed} the same <code>value</code></li> <li>Returns: {mixed} the same <code>value</code></li>
</ul> </ul>
<h3 id="mapperdeletekey"><code>Mapper.delete (key)</code></h3> <h3 id="mapperdeletekey"><code>Mapper.delete (key)</code></h3>
<ul> <ul>
<li><code>key</code> {mixed} path to delete (see <a href="#static-mapperparsekey-key">parseKey</a> for <li><code>key</code> {mixed} path to delete (see <a href="#staticmapperparsekeykey">parseKey</a> for
valid types)</li> valid types)</li>
<li>Returns: {string} deleted item name</li> <li>Returns: {string} deleted item name</li>
</ul> </ul>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<p>This library provides a register for Message handlers that may register to both <p>This library provides a register for Message handlers that may register to both
send and receive messages through the system.</p> send and receive messages through the system.</p>
<h2 id="classmessage">Class: Message</h2> <h2 id="classmessage">Class: Message</h2>
<p><code>Message</code> extends <code>Connect</code> see <a href="/doc/connect/">Connect.md</a> for more engine <p><code>Message</code> extends <code>Connect</code> see <a href="/doc/connect/">Connect</a> for more engine
management and more.</p> management and more.</p>
<h3 id="staticmessagegetinstance">static Message.getInstance()</h3> <h3 id="staticmessagegetinstance">static Message.getInstance()</h3>
<ul> <ul>
...@@ -27,6 +27,6 @@ Return {Promise} that resolves when the message is sent.</li> ...@@ -27,6 +27,6 @@ Return {Promise} that resolves when the message is sent.</li>
<p>Note: when no <code>name</code> is provided all handlers are executed.</p> <p>Note: when no <code>name</code> is provided all handlers are executed.</p>
<h2 id="classmessageengine">Class: MessageEngine</h2> <h2 id="classmessageengine">Class: MessageEngine</h2>
<p><code>MessageEngine</code> extends <code>ConnectEngine</code> see <p><code>MessageEngine</code> extends <code>ConnectEngine</code> see
<a href="/doc/connect-engine/">ConnectEngine.md</a> for more engine management and more.</p> <a href="/doc/connect-engine/">ConnectEngine</a> for more engine management and more.</p>
<h3 id="messageenginesend">MessageEngine.send()</h3> <h3 id="messageenginesend">MessageEngine.send()</h3>
<p>Must be extended and used to send to underlying message system.</p> <p>Must be extended and used to send to underlying message system.</p>
\ No newline at end of file
...@@ -319,9 +319,10 @@ delimiters from <code>{{</code> and <code>}}</code> to custom strings.</p> ...@@ -319,9 +319,10 @@ delimiters from <code>{{</code> and <code>}}</code> to custom strings.</p>
tag style, the second uses erb style as defined by the Set Delimiter tag style, the second uses erb style as defined by the Set Delimiter
tag, and the third returns to the default style after yet another Set tag, and the third returns to the default style after yet another Set
Delimiter declaration.</p> Delimiter declaration.</p>
<p>According to <a href="http://google-ctemplate.googlecode.com/svn/trunk/doc/howto.html">ctemplates</a>, this "is useful for languages like TeX, where <p>According to
double-braces may occur in the text and are awkward to use for <a href="https://docs.huihoo.com/google-ctemplate/howto.html">ctemplates</a>,
markup."</p> this "is useful for languages like TeX, where double-braces may occur in the
text and are awkward to use for markup."</p>
<p>Custom delimiters may not contain whitespace or the equals sign.</p> <p>Custom delimiters may not contain whitespace or the equals sign.</p>
<h2 id="COPYRIGHT">COPYRIGHT</h2> <h2 id="COPYRIGHT">COPYRIGHT</h2>
<p>Mustache is Copyright</p> <p>Mustache is Copyright</p>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<p>This library provides engine driven search that can be implemented by modules <p>This library provides engine driven search that can be implemented by modules
directly or by other providers.</p> directly or by other providers.</p>
<h2 id="classsearch">Class: Search</h2> <h2 id="classsearch">Class: Search</h2>
<p><code>Search</code> extends <code>Connect</code> see <a href="/doc/connect/">Connect.md</a> for more engine <p><code>Search</code> extends <code>Connect</code> see <a href="/doc/connect/">Connect</a> for more engine
management and more.</p> management and more.</p>
<h3 id="staticsearchgetinstance">static Search.getInstance()</h3> <h3 id="staticsearchgetinstance">static Search.getInstance()</h3>
<ul> <ul>
...@@ -28,6 +28,6 @@ Return {Promise} that resolves when the search is complete.</li> ...@@ -28,6 +28,6 @@ Return {Promise} that resolves when the search is complete.</li>
<p>Note: when no <code>name</code> is provided all handlers are executed.</p> <p>Note: when no <code>name</code> is provided all handlers are executed.</p>
<h2 id="classsearchengine">Class: SearchEngine</h2> <h2 id="classsearchengine">Class: SearchEngine</h2>
<p><code>SearchEngine</code> extends <code>ConnectEngine</code> see <p><code>SearchEngine</code> extends <code>ConnectEngine</code> see
<a href="/doc/connect-engine/">ConnectEngine.md</a> for more engine management and more.</p> <a href="/doc/connect-engine/">ConnectEngine</a> for more engine management and more.</p>
<h3 id="searchenginesearch">SearchEngine.search()</h3> <h3 id="searchenginesearch">SearchEngine.search()</h3>
<p>Must be extended and used to send to underlying search system.</p> <p>Must be extended and used to send to underlying search system.</p>
\ No newline at end of file
...@@ -12,8 +12,8 @@ execution when input sanity is not achieved.</p> ...@@ -12,8 +12,8 @@ execution when input sanity is not achieved.</p>
</code></pre> </code></pre>
<ul> <ul>
<li><code>Validate.Error</code> is the extended version of the standard <li><code>Validate.Error</code> is the extended version of the standard
<a href="#class-assertionerror"><code>AssertionError</code></a> and should be used instead <a href="https://nodejs.org/api/assert.html#assert_class_assert_assertionerror"><code>assert.AssertionError</code></a>
(for readability)</li> and should be used instead (for readability)</li>
</ul> </ul>
<hr /> <hr />
<h2 id="classassertionerror">Class: AssertionError</h2> <h2 id="classassertionerror">Class: AssertionError</h2>
...@@ -104,7 +104,7 @@ to improve matching types:</p> ...@@ -104,7 +104,7 @@ to improve matching types:</p>
<li><code>Function</code> Will compare the string value</li> <li><code>Function</code> Will compare the string value</li>
</ul> </ul>
<p>If none of the above types are passed, the assertion will be tested <p>If none of the above types are passed, the assertion will be tested
against <a href="#static-validateeqval1-val2"><code>Validate.eq(val1, val2)</code></a></p> against <a href="#staticvalidateeqval1val2"><code>Validate.eq(val1, val2)</code></a></p>
<h3 id="staticvalidatedateval1val2options"><code>static Validate.date(val1, val2, options)</code></h3> <h3 id="staticvalidatedateval1val2options"><code>static Validate.date(val1, val2, options)</code></h3>
<ul> <ul>
<li><code>val1</code> {Date} Base date</li> <li><code>val1</code> {Date} Base date</li>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<p>This library provides the registration of both view engines for rendering with <p>This library provides the registration of both view engines for rendering with
various languages as well as a view registry of actual fixtures to render from.</p> various languages as well as a view registry of actual fixtures to render from.</p>
<h2 id="classview">Class: View</h2> <h2 id="classview">Class: View</h2>
<p><code>View</code> extends <code>Connect</code> see <a href="/doc/connect/">Connect.md</a> for more engine <p><code>View</code> extends <code>Connect</code> see <a href="/doc/connect/">Connect</a> for more engine
management and more.</p> management and more.</p>
<h3 id="staticviewgetinstance">static View.getInstance()</h3> <h3 id="staticviewgetinstance">static View.getInstance()</h3>
<ul> <ul>
...@@ -20,7 +20,7 @@ management and more.</p> ...@@ -20,7 +20,7 @@ management and more.</p>
</ul> </ul>
<h2 id="classviewengine">Class: ViewEngine</h2> <h2 id="classviewengine">Class: ViewEngine</h2>
<p><code>ViewEngine</code> extends <code>ConnectEngine</code> see <p><code>ViewEngine</code> extends <code>ConnectEngine</code> see
<a href="/doc/connect-engine/">ConnectEngine.md</a> for more engine management and more.</p> <a href="/doc/connect-engine/">ConnectEngine</a> for more engine management and more.</p>
<h3 id="viewenginerender">ViewEngine.render()</h3> <h3 id="viewenginerender">ViewEngine.render()</h3>
<p>Must be extended and used to render to the underlying system.</p> <p>Must be extended and used to render to the underlying system.</p>
<h2 id="classviewmustache">Class: ViewMustache</h2> <h2 id="classviewmustache">Class: ViewMustache</h2>
......
<div id="copyright"> <div id="copyright">
<div class="copyright">&copy; 2013-2020 Bryan Tong, NULLIVEX LLC. All rights reserved.</div> <div class="copyright">&copy; 2013-2020 Bryan Tong, NULLIVEX LLC. All rights reserved.</div>
<div class="support">Powered by <a href="https://kado.org">Kado v4.1.0</a> Try it on your project today!</div> <div class="support">Powered by <a href="https://kado.org">Kado v4.2.0</a> Try it on your project today!</div>
<div class="conduct">Kado is openly developed and open source. To contribute view our <a href="/info/contributing/">Code of Conduct</a>. Then send a merge request on <a href="https://git.nullivex.com/kado/kado">Gitlab</a>.</div> <div class="conduct">Kado is openly developed and open source. To contribute view our <a href="/info/contributing/">Code of Conduct</a>. Then send a merge request on <a href="https://git.nullivex.com/kado/kado">Gitlab</a>.</div>
<div class="license">This software is licensed under the Lesser GNU Public License Version 3 or above. Please see <a href="/license/">LICENSE</a> for more details and a full copy of the license.</div> <div class="license">This software is licensed under the Lesser GNU Public License Version 3 or above. Please see <a href="/license/">LICENSE</a> for more details and a full copy of the license.</div>
</div> </div>
......
<h1 id="buildinganadminpanel">Building An Admin Panel</h1> <h1 id="buildinganadminpanel">Building An Admin Panel</h1>
<p>Now that you have completed the previous