clear-af.js 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/index.d.ts +107 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +107 -1
- package/package.json +1 -1
- package/README_FR.md +0 -123
- package/docs/.nojekyll +0 -1
- package/docs/assets/hierarchy.js +0 -1
- package/docs/assets/highlight.css +0 -78
- package/docs/assets/icons.js +0 -18
- package/docs/assets/icons.svg +0 -1
- package/docs/assets/main.js +0 -60
- package/docs/assets/navigation.js +0 -1
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1633
- package/docs/functions/camelify.html +0 -5
- package/docs/functions/capitalize.html +0 -5
- package/docs/functions/deepClone.html +0 -5
- package/docs/functions/getDate.html +0 -3
- package/docs/functions/isEmail.html +0 -5
- package/docs/functions/isEmpty.html +0 -5
- package/docs/functions/isType.html +0 -6
- package/docs/functions/isURL.html +0 -5
- package/docs/functions/kebabify.html +0 -5
- package/docs/functions/logHeader.html +0 -4
- package/docs/functions/logSeparator.html +0 -3
- package/docs/functions/noTwins.html +0 -5
- package/docs/functions/prettyDebug.html +0 -5
- package/docs/functions/prettyError.html +0 -5
- package/docs/functions/prettyInfo.html +0 -5
- package/docs/functions/prettySuccess.html +0 -5
- package/docs/functions/prettyWarn.html +0 -5
- package/docs/functions/snakify.html +0 -5
- package/docs/hierarchy.html +0 -1
- package/docs/index.html +0 -58
- package/docs/modules.html +0 -1
- package/src/index.ts +0 -284
- package/tsconfig.json +0 -24
package/docs/index.html
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="./"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>clear-af.js</title><meta name="description" content="Documentation for clear-af.js"/><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 defer src="assets/main.js"></script><script async src="assets/icons.js" id="tsd-icons-script"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="index.html" class="title">clear-af.js</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h1>clear-af.js</h1></div><div class="tsd-panel tsd-typography"><h1 id="clear-afjs" class="tsd-anchor-link">clear-af.js<a href="#clear-afjs" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h1>
|
|
2
|
-
<p>Un package JavaScript rempli d'utilitaires pour rendre votre code <strong>lisible af</strong>. Parce que la clarté, c'est la clé de la survie en programmation.</p>
|
|
3
|
-
<blockquote>
|
|
4
|
-
<p><strong>Le projet est encore en cours de developpement, la plupart des fonctions listées dans la présentation ne sont pas encore disponible et le package NPM n'est pas encore installable.</strong></p>
|
|
5
|
-
</blockquote>
|
|
6
|
-
<hr>
|
|
7
|
-
<h2 id="📦-installation" class="tsd-anchor-link">📦 Installation<a href="#📦-installation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
8
|
-
<pre><code class="bash"><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">install</span><span class="hl-1"> </span><span class="hl-2">clear-af</span>
|
|
9
|
-
</code><button type="button">Copy</button></pre>
|
|
10
|
-
|
|
11
|
-
<hr>
|
|
12
|
-
<h2 id="🚀-utilisation-rapide" class="tsd-anchor-link">🚀 Utilisation rapide<a href="#🚀-utilisation-rapide" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
13
|
-
<pre><code class="javascript"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">clearaf</span><span class="hl-1"> = </span><span class="hl-0">require</span><span class="hl-1">(</span><span class="hl-2">'clear-af'</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><br/><span class="hl-5">// Vos utilitaires arrivent ici</span>
|
|
14
|
-
</code><button type="button">Copy</button></pre>
|
|
15
|
-
|
|
16
|
-
<hr>
|
|
17
|
-
<h2 id="✨-fonctionnalités" class="tsd-anchor-link">✨ Fonctionnalités<a href="#✨-fonctionnalités" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
18
|
-
<h3 id="🔍-debugging-amélioré" class="tsd-anchor-link">🔍 Debugging amélioré<a href="#🔍-debugging-amélioré" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
19
|
-
<p>Parce que <code>console.log()</code> c'est pour les amateurs.</p>
|
|
20
|
-
<pre><code class="javascript"><span class="hl-6">clear</span><span class="hl-1">.</span><span class="hl-0">prettyLog</span><span class="hl-1">(</span><span class="hl-6">data</span><span class="hl-1">);</span><br/><span class="hl-6">clear</span><span class="hl-1">.</span><span class="hl-0">prettyError</span><span class="hl-1">(</span><span class="hl-6">error</span><span class="hl-1">);</span><br/><span class="hl-6">clear</span><span class="hl-1">.</span><span class="hl-0">prettyWarn</span><span class="hl-1">(</span><span class="hl-6">warning</span><span class="hl-1">);</span>
|
|
21
|
-
</code><button type="button">Copy</button></pre>
|
|
22
|
-
|
|
23
|
-
<h3 id="📊-formatage-lisible" class="tsd-anchor-link">📊 Formatage lisible<a href="#📊-formatage-lisible" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
24
|
-
<p>Transformez vos données en quelque chose de compréhensible.</p>
|
|
25
|
-
<pre><code class="javascript"><span class="hl-6">clear</span><span class="hl-1">.</span><span class="hl-0">formatJSON</span><span class="hl-1">(</span><span class="hl-6">obj</span><span class="hl-1">);</span><br/><span class="hl-6">clear</span><span class="hl-1">.</span><span class="hl-0">formatArray</span><span class="hl-1">(</span><span class="hl-6">arr</span><span class="hl-1">);</span><br/><span class="hl-6">clear</span><span class="hl-1">.</span><span class="hl-0">prettyPrint</span><span class="hl-1">(</span><span class="hl-6">anything</span><span class="hl-1">);</span>
|
|
26
|
-
</code><button type="button">Copy</button></pre>
|
|
27
|
-
|
|
28
|
-
<h3 id="🎯-validation-facile" class="tsd-anchor-link">🎯 Validation facile<a href="#🎯-validation-facile" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
29
|
-
<p>Clarifiez votre logique de validation.</p>
|
|
30
|
-
<pre><code class="javascript"><span class="hl-7">if</span><span class="hl-1"> (</span><span class="hl-6">clear</span><span class="hl-1">.</span><span class="hl-0">isValid</span><span class="hl-1">(</span><span class="hl-6">data</span><span class="hl-1">)) {</span><br/><span class="hl-1"> </span><span class="hl-5">// Do something</span><br/><span class="hl-1">}</span>
|
|
31
|
-
</code><button type="button">Copy</button></pre>
|
|
32
|
-
|
|
33
|
-
<hr>
|
|
34
|
-
<h2 id="🤔-faq" class="tsd-anchor-link">🤔 FAQ<a href="#🤔-faq" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
35
|
-
<p><strong>Q: Pourquoi "-af" dans le nom ?</strong><br>
|
|
36
|
-
R: Parce que votre code doit être lisible <em>af</em>, mec.</p>
|
|
37
|
-
<p><strong>Q: C'est lourd à utiliser ?</strong><br>
|
|
38
|
-
R: Non, c'est ultra minimaliste. Just import and go.</p>
|
|
39
|
-
<p><strong>Q: Compatible avec TypeScript ?</strong><br>
|
|
40
|
-
R: Oui ! Les types TypeScript arrivent bientôt.</p>
|
|
41
|
-
<p><strong>Q: Ça ralentit mon app ?</strong><br>
|
|
42
|
-
R: Non, c'est juste des helpers utilitaires. Zéro overhead en production si vous l'utilisez à bon escient.</p>
|
|
43
|
-
<hr>
|
|
44
|
-
<h2 id="📝-license" class="tsd-anchor-link">📝 License<a href="#📝-license" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
45
|
-
<p>MIT - Libre de l'utiliser comme bon vous semble.</p>
|
|
46
|
-
<hr>
|
|
47
|
-
<h2 id="🤝-contribution" class="tsd-anchor-link">🤝 Contribution<a href="#🤝-contribution" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
48
|
-
<p>Les contributions sont bienvenues ! Fork, crée une branche, commit, et ouvre une PR.</p>
|
|
49
|
-
<pre><code class="bash"><span class="hl-0">git</span><span class="hl-1"> </span><span class="hl-2">clone</span><span class="hl-1"> </span><span class="hl-2">https://github.com/FroostDev/clear-af.js</span><br/><span class="hl-0">cd</span><span class="hl-1"> </span><span class="hl-2">clear-af.js</span><br/><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">install</span><br/><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">run</span><span class="hl-1"> </span><span class="hl-2">test</span>
|
|
50
|
-
</code><button type="button">Copy</button></pre>
|
|
51
|
-
|
|
52
|
-
<hr>
|
|
53
|
-
<blockquote>
|
|
54
|
-
<p><em>Créé par un développeur qui en avait marre de lire du code illisible.</em></p>
|
|
55
|
-
</blockquote>
|
|
56
|
-
<hr>
|
|
57
|
-
<p><strong>clear-af.js</strong> - <em>Parce que la clarté, c'est la santé mentale du dev.</em></p>
|
|
58
|
-
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#clear-afjs"><span>clear-<wbr/>af.js</span></a><ul><li><a href="#📦-installation"><span>📦 <wbr/>Installation</span></a></li><li><a href="#🚀-utilisation-rapide"><span>🚀 <wbr/>Utilisation rapide</span></a></li><li><a href="#✨-fonctionnalités"><span>✨ <wbr/>Fonctionnalités</span></a></li><li><ul><li><a href="#🔍-debugging-amélioré"><span>🔍 <wbr/>Debugging amélioré</span></a></li><li><a href="#📊-formatage-lisible"><span>📊 <wbr/>Formatage lisible</span></a></li><li><a href="#🎯-validation-facile"><span>🎯 <wbr/>Validation facile</span></a></li></ul></li><li><a href="#🤔-faq"><span>🤔 <wbr/>FAQ</span></a></li><li><a href="#📝-license"><span>📝 <wbr/>License</span></a></li><li><a href="#🤝-contribution"><span>🤝 <wbr/>Contribution</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="modules.html">clear-af.js</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
package/docs/modules.html
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="./"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>clear-af.js</title><meta name="description" content="Documentation for clear-af.js"/><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 defer src="assets/main.js"></script><script async src="assets/icons.js" id="tsd-icons-script"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="index.html" class="title">clear-af.js</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"></ul><h1>clear-af.js</h1></div><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Functions"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h2>Functions</h2></summary><dl class="tsd-member-summaries"><dt class="tsd-member-summary" id="camelify"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/camelify.html">camelify</a><a href="#camelify" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="capitalize"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/capitalize.html">capitalize</a><a href="#capitalize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="deepclone"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/deepClone.html">deepClone</a><a href="#deepclone" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="getdate"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/getDate.html">getDate</a><a href="#getdate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="isemail"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/isEmail.html">isEmail</a><a href="#isemail" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="isempty"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/isEmpty.html">isEmpty</a><a href="#isempty" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="istype"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/isType.html">isType</a><a href="#istype" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="isurl"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/isURL.html">isURL</a><a href="#isurl" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="kebabify"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/kebabify.html">kebabify</a><a href="#kebabify" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="logheader"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/logHeader.html">logHeader</a><a href="#logheader" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="logseparator"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/logSeparator.html">logSeparator</a><a href="#logseparator" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="notwins"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/noTwins.html">noTwins</a><a href="#notwins" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="prettydebug"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/prettyDebug.html">prettyDebug</a><a href="#prettydebug" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="prettyerror"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/prettyError.html">prettyError</a><a href="#prettyerror" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="prettyinfo"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/prettyInfo.html">prettyInfo</a><a href="#prettyinfo" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="prettysuccess"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/prettySuccess.html">prettySuccess</a><a href="#prettysuccess" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="prettywarn"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/prettyWarn.html">prettyWarn</a><a href="#prettywarn" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="snakify"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/snakify.html">snakify</a><a href="#snakify" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd></dl></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Functions"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg>Functions</summary><div><a href="#camelify"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>camelify</span></a><a href="#capitalize"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>capitalize</span></a><a href="#deepclone"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>deep<wbr/>Clone</span></a><a href="#getdate"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>get<wbr/>Date</span></a><a href="#isemail"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>is<wbr/>Email</span></a><a href="#isempty"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>is<wbr/>Empty</span></a><a href="#istype"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>is<wbr/>Type</span></a><a href="#isurl"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>is<wbr/>URL</span></a><a href="#kebabify"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>kebabify</span></a><a href="#logheader"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>log<wbr/>Header</span></a><a href="#logseparator"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>log<wbr/>Separator</span></a><a href="#notwins"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>no<wbr/>Twins</span></a><a href="#prettydebug"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>pretty<wbr/>Debug</span></a><a href="#prettyerror"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>pretty<wbr/>Error</span></a><a href="#prettyinfo"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>pretty<wbr/>Info</span></a><a href="#prettysuccess"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>pretty<wbr/>Success</span></a><a href="#prettywarn"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>pretty<wbr/>Warn</span></a><a href="#snakify"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>snakify</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="modules.html" class="current">clear-af.js</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
package/src/index.ts
DELETED
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
____ ____ __ ____ __ ____ __ ____
|
|
3
|
-
( _ \( __) / _\ ( \ ___ / _\ ( __) _( )/ ___)
|
|
4
|
-
) / ) _) / \ ) D ((___) / \ ) _) _ / \) \\___ \
|
|
5
|
-
(__\_)(____)\_/\_/(____/ \_/\_/(__) (_) \____/(____/
|
|
6
|
-
|
|
7
|
-
Made by FroostDev | https://github.com/FroostDev - MIT Licence
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* =======================
|
|
12
|
-
* Functions for utilities
|
|
13
|
-
* =======================
|
|
14
|
-
*/
|
|
15
|
-
function getDate(time: boolean = false): string {
|
|
16
|
-
return time ? `[${new Date().toLocaleString()}]` : '';
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/*
|
|
20
|
-
* =================
|
|
21
|
-
* Logging utilities
|
|
22
|
-
* =================
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Show a pretty error log message with optional date information
|
|
27
|
-
* @function prettyError
|
|
28
|
-
* @param err - Error message to display
|
|
29
|
-
* @param time - Include or not a timestamp
|
|
30
|
-
*/
|
|
31
|
-
function prettyError(err: string, time = false): void {
|
|
32
|
-
const date = getDate(time);
|
|
33
|
-
console.log(`\x1b[1;41m ✕ ${date} - ${err} \x1b[0m`);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Show a pretty warn log message with optional date information
|
|
38
|
-
* @function prettyWarn
|
|
39
|
-
* @param warn - Warning message to display
|
|
40
|
-
* @param time - Include or not a timestamp
|
|
41
|
-
*/
|
|
42
|
-
function prettyWarn(warn: string, time = false): void {
|
|
43
|
-
const date = getDate(time);
|
|
44
|
-
console.log(`\x1b[1;43m ⚠ ${date} - ${warn} \x1b[0m`);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Show a pretty success log message with optional date information
|
|
49
|
-
* @function prettySuccess
|
|
50
|
-
* @param success - Success message to display
|
|
51
|
-
* @param time - Include or not a timestamp
|
|
52
|
-
*/
|
|
53
|
-
function prettySuccess(success: string, time = false): void {
|
|
54
|
-
const date = getDate(time);
|
|
55
|
-
console.log(`\x1b[1;42m ✔ ${date} - ${success} \x1b[0m`);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Show a pretty information log message with optional date information
|
|
60
|
-
* @function prettyInfo
|
|
61
|
-
* @param info - Information message to display
|
|
62
|
-
* @param time - Include or not a timestamp
|
|
63
|
-
*/
|
|
64
|
-
function prettyInfo(info: string, time = false): void {
|
|
65
|
-
const date = getDate(time);
|
|
66
|
-
console.log(`\x1b[1;44m ℹ ${date} - ${info} \x1b[0m`);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Show a pretty debug log message with optional date information
|
|
71
|
-
* @function prettyDebug
|
|
72
|
-
* @param debug - Debug message to display
|
|
73
|
-
* @param time - Include or not a timestamp
|
|
74
|
-
*/
|
|
75
|
-
function prettyDebug(debug: string, time = false): void {
|
|
76
|
-
const date = getDate(time);
|
|
77
|
-
console.log(`\x1b[1;97m ⚙ ${date} - ${debug} \x1b[0m`);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Show a separator line in console
|
|
82
|
-
* @function logSeparator
|
|
83
|
-
*/
|
|
84
|
-
function logSeparator(): void {
|
|
85
|
-
console.log(`\x1b[1m${'═'.repeat(50)}\x1b[0m`);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Display a header with a title in the center
|
|
90
|
-
* @function logHeader
|
|
91
|
-
* @param title - The title of the header
|
|
92
|
-
*/
|
|
93
|
-
function logHeader(title: string): void {
|
|
94
|
-
console.log(`\x1b[1m╔${'═'.repeat(title.length + 2)}╗\x1b[0m`);
|
|
95
|
-
console.log(`\x1b[1m║ ${title} ║\x1b[0m`);
|
|
96
|
-
console.log(`\x1b[1m╚${'═'.repeat(title.length + 2)}╝\x1b[0m`);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
*
|
|
101
|
-
* Validation utilities
|
|
102
|
-
*
|
|
103
|
-
*/
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Check if any type of variable is empty
|
|
107
|
-
* @function isEmpty
|
|
108
|
-
* @param value - The variable to check
|
|
109
|
-
* @returns {boolean} True if the value is empty, false otherwise
|
|
110
|
-
*/
|
|
111
|
-
function isEmpty(value: unknown): boolean {
|
|
112
|
-
if (value === null || value === undefined) return true;
|
|
113
|
-
if (typeof value === "string") return value.trim().length === 0;
|
|
114
|
-
if (Array.isArray(value)) return value.length === 0;
|
|
115
|
-
if (typeof value === "object") return Object.keys(value).length === 0;
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Check if the variable is of the chosen type
|
|
121
|
-
* @function isType
|
|
122
|
-
* @param value - The variable to check
|
|
123
|
-
* @param type - The type you want
|
|
124
|
-
* @returns {boolean} True if the value is of the chosen type, false otherwise
|
|
125
|
-
*/
|
|
126
|
-
function isType(value: unknown, type: string): boolean {
|
|
127
|
-
return typeof value === type;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Check if an email is valid
|
|
132
|
-
* @function isEmail
|
|
133
|
-
* @param email - The email to check
|
|
134
|
-
* @returns {boolean} True if the email is valid, false otherwise
|
|
135
|
-
*/
|
|
136
|
-
function isEmail(email: string): boolean {
|
|
137
|
-
const regex = /^[a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
138
|
-
return regex.test(email);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Check if a URL is valid
|
|
143
|
-
* @function isURL
|
|
144
|
-
* @param url - The URL to check
|
|
145
|
-
* @returns {boolean} True if the URL is valid, false otherwise
|
|
146
|
-
*/
|
|
147
|
-
function isURL(url: string): boolean {
|
|
148
|
-
try {
|
|
149
|
-
new URL(url);
|
|
150
|
-
return true;
|
|
151
|
-
} catch (error) {
|
|
152
|
-
return false;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
*
|
|
158
|
-
* Object manipulation
|
|
159
|
-
*
|
|
160
|
-
*/
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Create a deep clone of any object or array
|
|
164
|
-
* @function deepClone
|
|
165
|
-
* @param obj - The object or array to clone
|
|
166
|
-
* @returns A deep clone of the object
|
|
167
|
-
*/
|
|
168
|
-
function deepClone<T>(obj: T): T {
|
|
169
|
-
if (obj === null || typeof obj !== "object") return obj;
|
|
170
|
-
|
|
171
|
-
if (Array.isArray(obj)) return obj.map(item => deepClone(item)) as T;
|
|
172
|
-
|
|
173
|
-
const cloned = {} as T;
|
|
174
|
-
for (const key in obj) {
|
|
175
|
-
if (obj.hasOwnProperty(key)) cloned[key] = deepClone(obj[key]);
|
|
176
|
-
}
|
|
177
|
-
return cloned;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Remove duplicate values from an array
|
|
182
|
-
* @function noTwins
|
|
183
|
-
* @param arr - The array to remove duplicates from
|
|
184
|
-
* @returns {unknown[]} A new array with unique values only
|
|
185
|
-
*/
|
|
186
|
-
function noTwins(arr: unknown[]): unknown[] {
|
|
187
|
-
return Array.from(new Set(arr));
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
*
|
|
192
|
-
* Transforamtion utilites
|
|
193
|
-
*
|
|
194
|
-
*/
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Transform a string to camelCase format
|
|
198
|
-
* @function camelify
|
|
199
|
-
* @param str - The string to transform
|
|
200
|
-
* @returns {string} The string in camelCase format
|
|
201
|
-
*/
|
|
202
|
-
function camelify(str: string): string {
|
|
203
|
-
let camelCased: string = "";
|
|
204
|
-
if (!isEmpty(str)) {
|
|
205
|
-
let cleaned = str.replace(/[^a-zA-Z0-9\s]/g, "");
|
|
206
|
-
let toCamelify = cleaned.split(" ");
|
|
207
|
-
|
|
208
|
-
camelCased = toCamelify.map((word, index) => {
|
|
209
|
-
if (index === 0) return word.toLowerCase();
|
|
210
|
-
return word[0].toUpperCase() + word.slice(1).toLowerCase();
|
|
211
|
-
})
|
|
212
|
-
.join('');
|
|
213
|
-
}
|
|
214
|
-
return camelCased;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Transform a string to kebab-case format
|
|
219
|
-
* @function kebabify
|
|
220
|
-
* @param str - The string to transform
|
|
221
|
-
* @returns {string} The string in kebab-case format
|
|
222
|
-
*/
|
|
223
|
-
function kebabify(str: string): string {
|
|
224
|
-
let kebabised: string = "";
|
|
225
|
-
if (!isEmpty(str)) {
|
|
226
|
-
let cleaned = str.replace(/[^a-zA-Z0-9\s]/g, "");
|
|
227
|
-
let toKebabify = cleaned.split(" ");
|
|
228
|
-
kebabised = toKebabify.map(word => word.toLowerCase())
|
|
229
|
-
.join("-");
|
|
230
|
-
}
|
|
231
|
-
return kebabised;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* Transform a string to snake_case format
|
|
236
|
-
* @function snakify
|
|
237
|
-
* @param str - The string to transform
|
|
238
|
-
* @returns {string} The string in snake_case format
|
|
239
|
-
*/
|
|
240
|
-
function snakify(str: string): string {
|
|
241
|
-
let snaked: string = "";
|
|
242
|
-
if (!isEmpty(str)) {
|
|
243
|
-
let cleaned = str.replace(/[^a-zA-Z0-9\s]/g, "");
|
|
244
|
-
let toSnakify = cleaned.split(" ");
|
|
245
|
-
snaked = toSnakify.map(word => word.toLowerCase())
|
|
246
|
-
.join("_");
|
|
247
|
-
}
|
|
248
|
-
return snaked;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* Capitalize the first character of a string
|
|
253
|
-
* @function capitalize
|
|
254
|
-
* @param str - The string to capitalize
|
|
255
|
-
* @returns {string} The string with the first character in uppercase
|
|
256
|
-
*/
|
|
257
|
-
function capitalize(str: string): string {
|
|
258
|
-
if (isEmpty(str)) return str;
|
|
259
|
-
return str[0].toUpperCase() + str.slice(1);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
// =======
|
|
263
|
-
// Exports
|
|
264
|
-
// =======
|
|
265
|
-
export {
|
|
266
|
-
getDate,
|
|
267
|
-
prettyError,
|
|
268
|
-
prettyWarn,
|
|
269
|
-
prettySuccess,
|
|
270
|
-
prettyInfo,
|
|
271
|
-
prettyDebug,
|
|
272
|
-
logSeparator,
|
|
273
|
-
logHeader,
|
|
274
|
-
isEmpty,
|
|
275
|
-
isType,
|
|
276
|
-
isEmail,
|
|
277
|
-
isURL,
|
|
278
|
-
deepClone,
|
|
279
|
-
noTwins,
|
|
280
|
-
camelify,
|
|
281
|
-
kebabify,
|
|
282
|
-
snakify,
|
|
283
|
-
capitalize
|
|
284
|
-
};
|
package/tsconfig.json
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"module": "commonjs",
|
|
5
|
-
"lib": [
|
|
6
|
-
"ES2020",
|
|
7
|
-
"DOM"
|
|
8
|
-
],
|
|
9
|
-
"outDir": "./dist",
|
|
10
|
-
"rootDir": "./src",
|
|
11
|
-
"strict": true,
|
|
12
|
-
"esModuleInterop": true,
|
|
13
|
-
"skipLibCheck": true,
|
|
14
|
-
"forceConsistentCasingInFileNames": true,
|
|
15
|
-
"declaration": true,
|
|
16
|
-
"declarationMap": true
|
|
17
|
-
},
|
|
18
|
-
"include": [
|
|
19
|
-
"src/**/*"
|
|
20
|
-
],
|
|
21
|
-
"exclude": [
|
|
22
|
-
"node_modules"
|
|
23
|
-
]
|
|
24
|
-
}
|