mirror of
https://github.com/sern-handler/handler
synced 2026-06-06 01:16:55 +00:00
* style: Formatted 17 files & changes messageHelper util * style: Formatted HTML and CSS files * Revert "style: Formatted 17 files & changes messageHelper util" This reverts commit988d7fa6d2. * style(style.css): Formatted main style file with tabwidth 2 * chore: Added docs maintainer * chore: Changed typedoc configration * chore(README.md): Removed coming soon from links * chore: Updated Prettier formatter tab width * docs(readme): Improved Readme readability * docs(README): Fixed installation box * style(README.md): Improved readability * chore: Added CONTRIBUTING.md * docs(README.md): Removed old repo link and it's line * docs(README): Updated Intents to djs v14 Co-authored-by: EvolutionX <85353424+EvolutionX-10@users.noreply.github.com> * docs: Updated README example to djs v14 * docs: Formatted README examples * Update README.md * docs: Updated organization description * docs(README): Rename 'fixed' to 'patched' * chore: Updated LICENSE * chore: Updated LICNESE * chore: Changed license to MIT * Delete LICENSE.md * chore: Recreated LICENSE * chore: First License boilerplate preview * style(index.ts): Added a space * chore(index.ts): First license boilerplate preview * chore(PRETTIER): Re-updated the tab width * chore(SECURITY): Updated security.md file * docs(README): Improved readability * fix(README): Fixed typo * style: Updated license boilerplate * style(*): Updated license boilerplate * style: Updated license boilerplate * style: Updated license boilerplate * style: Updated license boilerplate * style: Updated License boilerplate * style: Updated License boilerplate * docs(README): Added stats * docs(README): Temporarily or permanently removed stats * refactor: DRY Principles * feat: finished interactionCreate.ts handling? (need test) * chore: Updated CONTRIBUTING.md file * chore: Updated credits * chore(NPM): Prepared package.json for release * revert: Some changes * revert: Revert back to MIT LICENSE (#50) * chore: Updated LICENSE boilerplate * style: Improved comments * style: Updated comments * fix: Non-exhaustiveness led to commands not registering readyEvent.ts * feat: Add DefinetlyDefined type, more todo statements * feat: Aliases optional * feat: Optional plugins to reduce bloat * feat: better looking typings for modules * refactor: Simplify sernModule handler signature * refactor: make ApplicationCommandOptions optional * refactor: make description optional * refactor: Bring CommandType and PluginType to top level * fix: Fix return type of sernModule * refactor: Why is that not assignable bruh * revert: Re-add plugins overload * fix(CODE_OF_CONDUCT): Removed unusual dot * Update package.json * fix: Resolve conflicts * fix: Resolve conflicts * feat: should be able to register other nodejs event emitters * fix: Standard for of does not resolve promises. Switched to for await * feat: Adding sern event listeners, overriding and typing methods * feat: Edited event names for more conciseness, finished basic event emitters * style: Run prettier * fix: didn't run prettier, now i am * fix: linting issue in markup.ts * fix: prettier wants lf line ending * fix: prettier changes again * feat: add .prettierignore and ignore README.md * feat: add externallyUsed.ts and support BothCommands again * feat: remove comments about prev commit * style: change prettier print width and reformat * feat: adding modal and autocomplete support * feat: Finishing up autocomplete, need to test * feat: Making name required in auto cmp interactions * feat: move name and description out of OptionsData[] * feat: finishing optionData for autocomplete changes, adding class for builder * feat: finishing autocomplete!! * refactor: Simplifying logic of message filter * feat: Adding docs to some data structures, moving to default from export files * refactor: cleaning up code, removing unuseds * feat: adding refactoring for repetitive event plugin processing * feat: adding better typings, refactoring * refactor: remove unnecessary nullish short circuit * refactor: remove unnecessary nullish short circuit * feat: add docs/ to npmignore * style: Formatted 17 files & changes messageHelper util * style: Formatted HTML and CSS files * Revert "style: Formatted 17 files & changes messageHelper util" This reverts commit988d7fa6d2. * style(style.css): Formatted main style file with tabwidth 2 * chore: Added docs maintainer * chore: Changed typedoc configration * chore(README.md): Removed coming soon from links * docs(readme): Improved Readme readability * chore: Added CONTRIBUTING.md * docs(README): Fixed installation box * style(README.md): Improved readability * docs(README.md): Removed old repo link and it's line * docs: Updated README example to djs v14 * docs(README): Updated Intents to djs v14 Co-authored-by: EvolutionX <85353424+EvolutionX-10@users.noreply.github.com> * docs: Formatted README examples * Update README.md * chore: Updated LICENSE * chore: Updated LICNESE * chore: Changed license to MIT * Delete LICENSE.md * chore: Recreated LICENSE * chore: First License boilerplate preview * style(index.ts): Added a space * chore(index.ts): First license boilerplate preview * chore(SECURITY): Updated security.md file * style: Updated license boilerplate * docs(README): Added stats * chore: Updated CONTRIBUTING.md file * chore: Updated credits * chore(NPM): Prepared package.json for release * revert: Some changes * revert: Revert back to MIT LICENSE (#50) * fix(CODE_OF_CONDUCT): Removed unusual dot * fix: Resolve conflicts * fix: Resolve conflicts Co-authored-by: EvolutionX <85353424+EvolutionX-10@users.noreply.github.com> Co-authored-by: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com>
660 lines
33 KiB
HTML
660 lines
33 KiB
HTML
<!DOCTYPE html>
|
|
<html class="default">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta http-equiv="x-ua-compatible" content="IE=edge" />
|
|
<title>Utils | sern-handler</title>
|
|
<meta name="description" content="Documentation for sern-handler" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<link rel="stylesheet" href="../assets/style.css" />
|
|
<link rel="stylesheet" href="../assets/highlight.css" />
|
|
<script async src="../assets/search.js" id="search-script"></script>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
document.body.classList.add(localStorage.getItem('tsd-theme') || 'os');
|
|
</script>
|
|
<header>
|
|
<div class="tsd-page-toolbar">
|
|
<div class="container">
|
|
<div class="table-wrap">
|
|
<div class="table-cell" id="tsd-search" data-base="..">
|
|
<div class="field">
|
|
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label
|
|
><input type="text" id="tsd-search-field" />
|
|
</div>
|
|
<ul class="results">
|
|
<li class="state loading">Preparing search index...</li>
|
|
<li class="state failure">The search index is not available</li>
|
|
</ul>
|
|
<a href="../index.html" class="title">sern-handler</a>
|
|
</div>
|
|
<div class="table-cell" id="tsd-widgets">
|
|
<div id="tsd-filter">
|
|
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
|
<div class="tsd-filter-group">
|
|
<div class="tsd-select" id="tsd-filter-visibility">
|
|
<span class="tsd-select-label">All</span>
|
|
<ul class="tsd-select-list">
|
|
<li data-value="public">Public</li>
|
|
<li data-value="protected">Public/Protected</li>
|
|
<li data-value="private" class="selected">All</li>
|
|
</ul>
|
|
</div>
|
|
<input type="checkbox" id="tsd-filter-inherited" checked /><label
|
|
class="tsd-widget"
|
|
for="tsd-filter-inherited"
|
|
>Inherited</label
|
|
><input type="checkbox" id="tsd-filter-externals" checked /><label
|
|
class="tsd-widget"
|
|
for="tsd-filter-externals"
|
|
>Externals</label
|
|
>
|
|
</div>
|
|
</div>
|
|
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="tsd-page-title">
|
|
<div class="container">
|
|
<ul class="tsd-breadcrumb">
|
|
<li><a href="../modules.html">sern-handler</a></li>
|
|
<li><a href="Utils.html">Utils</a></li>
|
|
</ul>
|
|
<h1>Namespace Utils</h1>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<div class="container container-main">
|
|
<div class="row">
|
|
<div class="col-8 col-content">
|
|
<section class="tsd-panel-group tsd-index-group">
|
|
<h2>Index</h2>
|
|
<section class="tsd-panel tsd-index-panel">
|
|
<div class="tsd-index-content">
|
|
<section class="tsd-index-section">
|
|
<h3>Type aliases</h3>
|
|
<ul class="tsd-index-list">
|
|
<li class="tsd-kind-type-alias tsd-parent-kind-namespace tsd-has-type-parameter">
|
|
<a href="Utils.html#ArgType" class="tsd-kind-icon">Arg<wbr />Type</a>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-index-section">
|
|
<h3>Functions</h3>
|
|
<ul class="tsd-index-list">
|
|
<li class="tsd-kind-function tsd-parent-kind-namespace">
|
|
<a href="Utils.html#parseBool" class="tsd-kind-icon">parse<wbr />Bool</a>
|
|
</li>
|
|
<li class="tsd-kind-function tsd-parent-kind-namespace">
|
|
<a href="Utils.html#parseInt" class="tsd-kind-icon">parse<wbr />Int</a>
|
|
</li>
|
|
<li class="tsd-kind-function tsd-parent-kind-namespace">
|
|
<a href="Utils.html#toArr" class="tsd-kind-icon">to<wbr />Arr</a>
|
|
</li>
|
|
<li class="tsd-kind-function tsd-parent-kind-namespace">
|
|
<a href="Utils.html#toNegativeInt" class="tsd-kind-icon">to<wbr />Negative<wbr />Int</a>
|
|
</li>
|
|
<li class="tsd-kind-function tsd-parent-kind-namespace">
|
|
<a href="Utils.html#toPositiveInt" class="tsd-kind-icon">to<wbr />Positive<wbr />Int</a>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
<section class="tsd-panel-group tsd-member-group">
|
|
<h2>Type aliases</h2>
|
|
<section class="tsd-panel tsd-member tsd-kind-type-alias tsd-parent-kind-namespace tsd-has-type-parameter">
|
|
<a id="ArgType" class="tsd-anchor"></a>
|
|
<h3 class="tsd-anchor-link">
|
|
Arg<wbr />Type<a href="#ArgType" aria-label="Permalink" class="tsd-anchor-icon"
|
|
><svg
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
class="icon icon-tabler icon-tabler-link"
|
|
viewBox="0 0 24 24"
|
|
stroke-width="2"
|
|
stroke="currentColor"
|
|
fill="none"
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
>
|
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
|
<path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path>
|
|
<path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg
|
|
></a>
|
|
</h3>
|
|
<div class="tsd-signature tsd-kind-icon">
|
|
Arg<wbr />Type<span class="tsd-signature-symbol"><</span
|
|
><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span
|
|
><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">:</span>
|
|
<span class="tsd-signature-type">Result</span><span class="tsd-signature-symbol"><</span
|
|
><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span
|
|
><span class="tsd-signature-symbol">, </span
|
|
><a href="Types.html#possibleOutput" class="tsd-signature-type" data-tsd-kind="Type alias"
|
|
>possibleOutput</a
|
|
><span class="tsd-signature-symbol">></span>
|
|
</div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>
|
|
Defined in
|
|
<a
|
|
href="https://github.com/sern-handler/Sern/blob/29d92ca/src/handler/utilities/preprocessors/args.ts#L8"
|
|
>handler/utilities/preprocessors/args.ts:8</a
|
|
>
|
|
</li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>
|
|
Wrapper type taking <code>Ok(T)</code> or <code>Err(possibleOutput)</code> e.g
|
|
<code>Result<T, possibleOutput</code>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<h4 class="tsd-type-parameters-title">Type parameters</h4>
|
|
<ul class="tsd-type-parameters">
|
|
<li><h4>T</h4></li>
|
|
</ul>
|
|
</section>
|
|
</section>
|
|
<section class="tsd-panel-group tsd-member-group">
|
|
<h2>Functions</h2>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-namespace">
|
|
<a id="parseBool" class="tsd-anchor"></a>
|
|
<h3 class="tsd-anchor-link">
|
|
parse<wbr />Bool<a href="#parseBool" aria-label="Permalink" class="tsd-anchor-icon"
|
|
><svg
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
class="icon icon-tabler icon-tabler-link"
|
|
viewBox="0 0 24 24"
|
|
stroke-width="2"
|
|
stroke="currentColor"
|
|
fill="none"
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
>
|
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
|
<path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path>
|
|
<path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg
|
|
></a>
|
|
</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-namespace">
|
|
<li class="tsd-signature tsd-kind-icon">
|
|
parse<wbr />Bool<span class="tsd-signature-symbol">(</span>arg<span class="tsd-signature-symbol"
|
|
>: </span
|
|
><span class="tsd-signature-type">string</span>, onFailure<span class="tsd-signature-symbol">?: </span
|
|
><a href="Types.html#possibleOutput" class="tsd-signature-type" data-tsd-kind="Type alias"
|
|
>possibleOutput</a
|
|
><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span
|
|
><span class="tsd-signature-symbol">></span>, regexes<span class="tsd-signature-symbol">?: </span
|
|
><span class="tsd-signature-symbol">{ </span>noRegex<span class="tsd-signature-symbol">: </span
|
|
><span class="tsd-signature-type">RegExp</span
|
|
><span class="tsd-signature-symbol">; </span>yesRegex<span class="tsd-signature-symbol">: </span
|
|
><span class="tsd-signature-type">RegExp</span><span class="tsd-signature-symbol"> }</span
|
|
><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span
|
|
><a href="Utils.html#ArgType" class="tsd-signature-type" data-tsd-kind="Type alias">ArgType</a
|
|
><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span
|
|
><span class="tsd-signature-symbol">></span>
|
|
</li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>
|
|
Defined in
|
|
<a
|
|
href="https://github.com/sern-handler/Sern/blob/29d92ca/src/handler/utilities/preprocessors/args.ts#L31"
|
|
>handler/utilities/preprocessors/args.ts:31</a
|
|
>
|
|
</li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>arg: <span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>command arguments</p>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<h5>
|
|
onFailure:
|
|
<a href="Types.html#possibleOutput" class="tsd-signature-type" data-tsd-kind="Type alias"
|
|
>possibleOutput</a
|
|
><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span
|
|
><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = ...</span>
|
|
</h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>If cannot parse <code>arg</code> into boolean.</p>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<h5>
|
|
regexes: <span class="tsd-signature-symbol">{ </span>noRegex<span class="tsd-signature-symbol"
|
|
>: </span
|
|
><span class="tsd-signature-type">RegExp</span
|
|
><span class="tsd-signature-symbol">; </span>yesRegex<span class="tsd-signature-symbol">: </span
|
|
><span class="tsd-signature-type">RegExp</span><span class="tsd-signature-symbol"> }</span
|
|
><span class="tsd-signature-symbol"> = ...</span>
|
|
</h5>
|
|
<ul class="tsd-parameters">
|
|
<li class="tsd-parameter">
|
|
<h5>
|
|
no<wbr />Regex<span class="tsd-signature-symbol">: </span
|
|
><span class="tsd-signature-type">RegExp</span>
|
|
</h5>
|
|
</li>
|
|
<li class="tsd-parameter">
|
|
<h5>
|
|
yes<wbr />Regex<span class="tsd-signature-symbol">: </span
|
|
><span class="tsd-signature-type">RegExp</span>
|
|
</h5>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">
|
|
Returns
|
|
<a href="Utils.html#ArgType" class="tsd-signature-type" data-tsd-kind="Type alias">ArgType</a
|
|
><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span
|
|
><span class="tsd-signature-symbol">></span>
|
|
</h4>
|
|
<div>
|
|
<p>attemps to parse <code>args</code> as a boolean</p>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-namespace">
|
|
<a id="parseInt" class="tsd-anchor"></a>
|
|
<h3 class="tsd-anchor-link">
|
|
parse<wbr />Int<a href="#parseInt" aria-label="Permalink" class="tsd-anchor-icon"
|
|
><svg
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
class="icon icon-tabler icon-tabler-link"
|
|
viewBox="0 0 24 24"
|
|
stroke-width="2"
|
|
stroke="currentColor"
|
|
fill="none"
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
>
|
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
|
<path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path>
|
|
<path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg
|
|
></a>
|
|
</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-namespace">
|
|
<li class="tsd-signature tsd-kind-icon">
|
|
parse<wbr />Int<span class="tsd-signature-symbol">(</span>arg<span class="tsd-signature-symbol"
|
|
>: </span
|
|
><span class="tsd-signature-type">string</span>, onFailure<span class="tsd-signature-symbol">: </span
|
|
><a href="Types.html#possibleOutput" class="tsd-signature-type" data-tsd-kind="Type alias"
|
|
>possibleOutput</a
|
|
><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span
|
|
><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span
|
|
><span class="tsd-signature-symbol">: </span
|
|
><a href="Utils.html#ArgType" class="tsd-signature-type" data-tsd-kind="Type alias">ArgType</a
|
|
><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span
|
|
><span class="tsd-signature-symbol">></span>
|
|
</li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>
|
|
Defined in
|
|
<a
|
|
href="https://github.com/sern-handler/Sern/blob/29d92ca/src/handler/utilities/preprocessors/args.ts#L17"
|
|
>handler/utilities/preprocessors/args.ts:17</a
|
|
>
|
|
</li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>arg: <span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>command arguments</p>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<h5>
|
|
onFailure:
|
|
<a href="Types.html#possibleOutput" class="tsd-signature-type" data-tsd-kind="Type alias"
|
|
>possibleOutput</a
|
|
><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span
|
|
><span class="tsd-signature-symbol">></span>
|
|
</h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>if <code>Number.parseInt</code> returns NaN</p>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">
|
|
Returns
|
|
<a href="Utils.html#ArgType" class="tsd-signature-type" data-tsd-kind="Type alias">ArgType</a
|
|
><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span
|
|
><span class="tsd-signature-symbol">></span>
|
|
</h4>
|
|
<div>
|
|
<p>Attempts to use <code>Number.parseInt()</code> on <code>arg</code></p>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-namespace">
|
|
<a id="toArr" class="tsd-anchor"></a>
|
|
<h3 class="tsd-anchor-link">
|
|
to<wbr />Arr<a href="#toArr" aria-label="Permalink" class="tsd-anchor-icon"
|
|
><svg
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
class="icon icon-tabler icon-tabler-link"
|
|
viewBox="0 0 24 24"
|
|
stroke-width="2"
|
|
stroke="currentColor"
|
|
fill="none"
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
>
|
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
|
<path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path>
|
|
<path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg
|
|
></a>
|
|
</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-namespace">
|
|
<li class="tsd-signature tsd-kind-icon">
|
|
to<wbr />Arr<span class="tsd-signature-symbol">(</span>arg<span class="tsd-signature-symbol">: </span
|
|
><span class="tsd-signature-type">string</span>, sep<span class="tsd-signature-symbol">?: </span
|
|
><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span
|
|
><span class="tsd-signature-symbol">: </span
|
|
><a href="Utils.html#ArgType" class="tsd-signature-type" data-tsd-kind="Type alias">ArgType</a
|
|
><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span
|
|
><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span>
|
|
</li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>
|
|
Defined in
|
|
<a
|
|
href="https://github.com/sern-handler/Sern/blob/29d92ca/src/handler/utilities/preprocessors/args.ts#L55"
|
|
>handler/utilities/preprocessors/args.ts:55</a
|
|
>
|
|
</li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>arg: <span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>command arguments</p>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<h5>
|
|
sep: <span class="tsd-signature-type">string</span
|
|
><span class="tsd-signature-symbol"> = ' '</span>
|
|
</h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>default separator = ' '</p>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">
|
|
Returns
|
|
<a href="Utils.html#ArgType" class="tsd-signature-type" data-tsd-kind="Type alias">ArgType</a
|
|
><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span
|
|
><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span>
|
|
</h4>
|
|
<div></div>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-namespace">
|
|
<a id="toNegativeInt" class="tsd-anchor"></a>
|
|
<h3 class="tsd-anchor-link">
|
|
to<wbr />Negative<wbr />Int<a href="#toNegativeInt" aria-label="Permalink" class="tsd-anchor-icon"
|
|
><svg
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
class="icon icon-tabler icon-tabler-link"
|
|
viewBox="0 0 24 24"
|
|
stroke-width="2"
|
|
stroke="currentColor"
|
|
fill="none"
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
>
|
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
|
<path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path>
|
|
<path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg
|
|
></a>
|
|
</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-namespace">
|
|
<li class="tsd-signature tsd-kind-icon">
|
|
to<wbr />Negative<wbr />Int<span class="tsd-signature-symbol">(</span>arg<span
|
|
class="tsd-signature-symbol"
|
|
>: </span
|
|
><span class="tsd-signature-type">string</span>, onFailure<span class="tsd-signature-symbol">: </span
|
|
><a href="Types.html#possibleOutput" class="tsd-signature-type" data-tsd-kind="Type alias"
|
|
>possibleOutput</a
|
|
><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span
|
|
><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span
|
|
><span class="tsd-signature-symbol">: </span
|
|
><a href="Utils.html#ArgType" class="tsd-signature-type" data-tsd-kind="Type alias">ArgType</a
|
|
><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span
|
|
><span class="tsd-signature-symbol">></span>
|
|
</li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>
|
|
Defined in
|
|
<a
|
|
href="https://github.com/sern-handler/Sern/blob/29d92ca/src/handler/utilities/preprocessors/args.ts#L76"
|
|
>handler/utilities/preprocessors/args.ts:76</a
|
|
>
|
|
</li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>arg: <span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>command arguments</p>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<h5>
|
|
onFailure:
|
|
<a href="Types.html#possibleOutput" class="tsd-signature-type" data-tsd-kind="Type alias"
|
|
>possibleOutput</a
|
|
><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span
|
|
><span class="tsd-signature-symbol">></span>
|
|
</h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>delegates <code>parseInt</code></p>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">
|
|
Returns
|
|
<a href="Utils.html#ArgType" class="tsd-signature-type" data-tsd-kind="Type alias">ArgType</a
|
|
><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span
|
|
><span class="tsd-signature-symbol">></span>
|
|
</h4>
|
|
<div></div>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-namespace">
|
|
<a id="toPositiveInt" class="tsd-anchor"></a>
|
|
<h3 class="tsd-anchor-link">
|
|
to<wbr />Positive<wbr />Int<a href="#toPositiveInt" aria-label="Permalink" class="tsd-anchor-icon"
|
|
><svg
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
class="icon icon-tabler icon-tabler-link"
|
|
viewBox="0 0 24 24"
|
|
stroke-width="2"
|
|
stroke="currentColor"
|
|
fill="none"
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
>
|
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
|
<path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path>
|
|
<path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg
|
|
></a>
|
|
</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-namespace">
|
|
<li class="tsd-signature tsd-kind-icon">
|
|
to<wbr />Positive<wbr />Int<span class="tsd-signature-symbol">(</span>arg<span
|
|
class="tsd-signature-symbol"
|
|
>: </span
|
|
><span class="tsd-signature-type">string</span>, onFailure<span class="tsd-signature-symbol">: </span
|
|
><a href="Types.html#possibleOutput" class="tsd-signature-type" data-tsd-kind="Type alias"
|
|
>possibleOutput</a
|
|
><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span
|
|
><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span
|
|
><span class="tsd-signature-symbol">: </span
|
|
><a href="Utils.html#ArgType" class="tsd-signature-type" data-tsd-kind="Type alias">ArgType</a
|
|
><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span
|
|
><span class="tsd-signature-symbol">></span>
|
|
</li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>
|
|
Defined in
|
|
<a
|
|
href="https://github.com/sern-handler/Sern/blob/29d92ca/src/handler/utilities/preprocessors/args.ts#L66"
|
|
>handler/utilities/preprocessors/args.ts:66</a
|
|
>
|
|
</li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>arg: <span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>command arguments</p>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<h5>
|
|
onFailure:
|
|
<a href="Types.html#possibleOutput" class="tsd-signature-type" data-tsd-kind="Type alias"
|
|
>possibleOutput</a
|
|
><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span
|
|
><span class="tsd-signature-symbol">></span>
|
|
</h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>delegates <code>Utils.parseInt</code></p>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">
|
|
Returns
|
|
<a href="Utils.html#ArgType" class="tsd-signature-type" data-tsd-kind="Type alias">ArgType</a
|
|
><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span
|
|
><span class="tsd-signature-symbol">></span>
|
|
</h4>
|
|
<div></div>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</section>
|
|
</div>
|
|
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
<nav class="tsd-navigation primary">
|
|
<ul>
|
|
<li class=""><a href="../modules.html">Exports</a></li>
|
|
<li class="tsd-kind-namespace"><a href="Sern.html">Sern</a></li>
|
|
<li class="tsd-kind-namespace"><a href="Types.html">Types</a></li>
|
|
<li class="current tsd-kind-namespace"><a href="Utils.html">Utils</a></li>
|
|
</ul>
|
|
</nav>
|
|
<nav class="tsd-navigation secondary menu-sticky">
|
|
<ul>
|
|
<li class="tsd-kind-type-alias tsd-parent-kind-namespace tsd-has-type-parameter">
|
|
<a href="Utils.html#ArgType" class="tsd-kind-icon">Arg<wbr />Type</a>
|
|
</li>
|
|
<li class="tsd-kind-function tsd-parent-kind-namespace">
|
|
<a href="Utils.html#parseBool" class="tsd-kind-icon">parse<wbr />Bool</a>
|
|
</li>
|
|
<li class="tsd-kind-function tsd-parent-kind-namespace">
|
|
<a href="Utils.html#parseInt" class="tsd-kind-icon">parse<wbr />Int</a>
|
|
</li>
|
|
<li class="tsd-kind-function tsd-parent-kind-namespace">
|
|
<a href="Utils.html#toArr" class="tsd-kind-icon">to<wbr />Arr</a>
|
|
</li>
|
|
<li class="tsd-kind-function tsd-parent-kind-namespace">
|
|
<a href="Utils.html#toNegativeInt" class="tsd-kind-icon">to<wbr />Negative<wbr />Int</a>
|
|
</li>
|
|
<li class="tsd-kind-function tsd-parent-kind-namespace">
|
|
<a href="Utils.html#toPositiveInt" class="tsd-kind-icon">to<wbr />Positive<wbr />Int</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<footer class="with-border-bottom">
|
|
<div class="container">
|
|
<h2>Settings</h2>
|
|
<p>
|
|
Theme
|
|
<select id="theme">
|
|
<option value="os">OS</option>
|
|
<option value="light">Light</option>
|
|
<option value="dark">Dark</option>
|
|
</select>
|
|
</p>
|
|
</div>
|
|
</footer>
|
|
<div class="container tsd-generator">
|
|
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
|
</div>
|
|
<div class="overlay"></div>
|
|
<script src="../assets/main.js"></script>
|
|
</body>
|
|
</html>
|