diff --git a/docs/fonts/FiraCode-Regular.ttf b/css/FiraCode-Regular.ttf similarity index 100% rename from docs/fonts/FiraCode-Regular.ttf rename to css/FiraCode-Regular.ttf diff --git a/src-docusaurus/css/custom.css b/css/custom.css similarity index 95% rename from src-docusaurus/css/custom.css rename to css/custom.css index f7d27894..a576fee0 100644 --- a/src-docusaurus/css/custom.css +++ b/css/custom.css @@ -73,3 +73,12 @@ img[src*='#center'] { var(--ifm-color-emphasis-100) 100% ); } + +code * { + font-family: 'Fira Code'; +} + +@font-face { + font-family: 'Fira Code'; + src: url(./FiraCode-Regular.ttf); +} diff --git a/docs-md/getting-started.md b/docs-md/getting-started.md index 82f50c57..0e4627cf 100644 --- a/docs-md/getting-started.md +++ b/docs-md/getting-started.md @@ -12,6 +12,21 @@ A package of commonly used JavaScript utilities. ![img](img/js-pkg.png#center) +#### Package Details + + + +[![npm version][npm-img]][npm-url] +[![coverage][codecov-img]][codecov-url] +[![downloads][downloads-img]][downloads-url] + +#### Repo Details + +[![open issues][issues-img]][issues-url] +[![open prs][pr-img]][pr-url] +![code size](https://img.shields.io/github/languages/code-size/iamdevlinph/common-utils-pkg.svg?style=flat-square&maxAge=7200) +[![contributors][contributor-img]][contributor-url] + ### Installation NPM @@ -64,3 +79,28 @@ UTILS.randomPastelColor(); UTILS.randomPastelColor(); ``` + +[contributor-img]: https://img.shields.io/github/contributors/iamdevlinph/common-utils-pkg.svg?style=flat-square&maxAge=7200 +[contributor-url]: https://github.com/iamdevlinph/common-utils-pkg/graphs/contributors +[deps-img]: https://img.shields.io/david/iamdevlinph/common-utils-pkg.svg?style=flat-square&maxAge=7200 +[deps-url]: https://david-dm.org/iamdevlinph/common-utils-pkg +[devdeps-img]: https://img.shields.io/david/dev/iamdevlinph/common-utils-pkg.svg?style=flat-square&maxAge=7200 +[devdeps-url]: https://david-dm.org/iamdevlinph/common-utils-pkg?type=dev +[downloads-img]: https://img.shields.io/npm/dm/common-utils-pkg.svg?style=flat-square&maxAge=7200 +[downloads-url]: https://npmcharts.com/compare/common-utils-pkg?minimal=true +[issues-img]: https://img.shields.io/github/issues/iamdevlinph/common-utils-pkg.svg?style=flat-square&maxAge=7200 +[issues-url]: https://github.com/iamdevlinph/common-utils-pkg/issues +[node-img]: https://img.shields.io/node/v/common-utils-pkg.svg?style=flat-square&maxAge=7200 +[node-url]: https://nodejs.org/en/ +[npm-img]: https://img.shields.io/npm/v/common-utils-pkg.svg?style=flat-square&maxAge=7200 +[npm-url]: https://www.npmjs.com/package/common-utils-pkg +[pr-img]: https://img.shields.io/github/issues-pr/iamdevlinph/common-utils-pkg.svg?style=flat-square&maxAge=7200 +[pr-url]: https://github.com/iamdevlinph/common-utils-pkg/pulls +[travis-img]: https://img.shields.io/travis/iamdevlinph/common-utils-pkg/master.svg?style=flat-square&maxAge=7200 +[travis-url]: https://travis-ci.org/iamdevlinph/common-utils-pkg +[codecov-img]: https://img.shields.io/codecov/c/github/iamdevlinph/common-utils-pkg.svg?style=flat-square&maxAge=7200 +[codecov-url]: https://codecov.io/gh/iamdevlinph/common-utils-pkg +[forks-img]: https://img.shields.io/github/forks/iamdevlinph/common-utils-pkg.svg?style=social&label=Fork&maxAge=7200 +[forks-url]: https://github.com/iamdevlinph/common-utils-pkg/network/members +[stars-img]: https://img.shields.io/github/stars/iamdevlinph/common-utils-pkg.svg?style=social&label=Stars&maxAge=7200 +[stars-url]: https://github.com/iamdevlinph/common-utils-pkg/stargazers diff --git a/docs/CNAME b/docs/CNAME deleted file mode 100644 index a2879310..00000000 --- a/docs/CNAME +++ /dev/null @@ -1 +0,0 @@ -common-utils-pkg.js.org diff --git a/docs/changelog.html b/docs/changelog.html deleted file mode 100644 index dfae0bb9..00000000 --- a/docs/changelog.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - Common Utilities Package | Changelog - - - - - - - - - - - - - - - - - -
- - -
- -
-

Changelog

- -
-
- - -
- - - - - - diff --git a/docs/changelog.js b/docs/changelog.js deleted file mode 100644 index ce37dfe7..00000000 --- a/docs/changelog.js +++ /dev/null @@ -1,24 +0,0 @@ -(function () { - $.getJSON('./changelog.json', function (data) { - var changeLogElem = document.getElementById('changelog-section'); - _.orderBy(data, ['version'], ['desc']).forEach(function (val) { - console.log(val); - var versionItem = document.createElement('div'); - var versionNumber = document.createElement('h5'); - var versionDescList = document.createElement('ul'); - versionDescList.setAttribute('class', 'styled'); - - val.description.forEach(function (desc) { - var versionDescItem = document.createElement('li'); - versionDescItem.innerHTML = desc; - versionDescList.appendChild(versionDescItem); - }); - - versionNumber.innerHTML = val.version; - versionItem.appendChild(versionNumber); - versionItem.appendChild(versionDescList); - changeLogElem.appendChild(versionItem); - }); - - }); -})(); diff --git a/docs/changelog.json b/docs/changelog.json deleted file mode 100644 index 8f47954c..00000000 --- a/docs/changelog.json +++ /dev/null @@ -1,144 +0,0 @@ -[ - { - "version": "4.1.1", - "description": ["Bugfix: TypeScript files not published"] - }, - { - "version": "4.1.0", - "description": ["[Add] Array | arrayRemoveItem"] - }, - { - "version": "4.0.0", - "description": [ - "Migrated to TypeScript", - "Removes the feature where an error is thrown when a wrong type is supplied since we're already on TypeScript" - ] - }, - { - "version": "3.1.1", - "description": ["[Update] Boolean | toBoolean()"] - }, - { - "version": "3.1.0", - "description": ["[Add] Browser | browserDetect()"] - }, - { - "version": "3.0.0", - "description": ["Major revision!", "Able to import each method separately"] - }, - { - "version": "2.1.0", - "description": ["Add SlugUtil.slugify()"] - }, - { - "version": "2.0.5", - "description": [ - "StorageUtil.getItem - return empty string of key is not found in storage" - ] - }, - { - "version": "2.0.4", - "description": ["StorageUtil.getItem - return JSON.parse(data)"] - }, - { - "version": "2.0.3", - "description": ["Fix SSR issue where window is undefined"] - }, - { - "version": "2.0.2", - "description": ["Transfer ownership"] - }, - { - "version": "2.0.1", - "description": ["Display method name on takes() error"] - }, - { - "version": "2.0.0", - "description": ["Update takes() to accept required and optional arguments"] - }, - { - "version": "1.9.1", - "description": ["Update typings"] - }, - { - "version": "1.9.0", - "description": [ - "Add StorageUtil.clear()", - "Add StorageUtil.getItem()", - "Add StorageUtil.removeItem()", - "Add StorageUtil.setItem()" - ] - }, - { - "version": "1.8.0", - "description": ["Add ObjectUtil.isEmpty()"] - }, - { - "version": "1.7.4", - "description": ["Fix npm deploy from travis"] - }, - { - "version": "1.7.3", - "description": ["Update dependencies", "Add greenkeeper"] - }, - { - "version": "1.7.2", - "description": ["Travis"] - }, - { - "version": "1.7.1", - "description": ["Add ColorUtil.brightness"] - }, - { - "version": "1.6.2", - "description": ["Changes to shield badge maxAge"] - }, - { - "version": "1.6.1", - "description": ["Add ColorUtil.invertHexColor()"] - }, - { - "version": "1.6.0", - "description": ["Overhaul on the structure"] - }, - { - "version": "1.5.2", - "description": ["Update dependencies"] - }, - { - "version": "1.5.1", - "description": ["Add typing for CoreUtil.argTypesMatch()"] - }, - { - "version": "1.5.0", - "description": [ - "Changes to CoreUtil", - "Clean-up CoreUtil", - "Add tests to CoreUtil.takes()", - "Add a new method CoreUtil.argTypesMatch()" - ] - }, - { - "version": "1.4.0", - "description": ["Automated documentation"] - }, - { - "version": "1.3.0", - "description": ["Add TypeScript type definitions for intellisense"] - }, - { - "version": "1.2.0", - "description": ["Travis, Codecov, etc"] - }, - { - "version": "1.1.0", - "description": ["Code coverage"] - }, - { - "version": "1.0.9", - "description": [ - "Here's some docs to make this look legit", - "We start at 1.0.9" - ] - } -] diff --git a/docs/docs.html b/docs/docs.html deleted file mode 100644 index a151bdcb..00000000 --- a/docs/docs.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - Common Utilities Package | Docs - - - - - - - - - - - - - - - - - -
-
- -
Common Utilities Package
-
- - - -
- - -
- - - - - - diff --git a/docs/docs.js b/docs/docs.js deleted file mode 100644 index e596dbbe..00000000 --- a/docs/docs.js +++ /dev/null @@ -1,97 +0,0 @@ -(function () { - $.getJSON('./mapped_source.json', function (data) { - var mapped_source = _(data).toPairs().sortBy(0).fromPairs().value(); - var reference = document.getElementById('reference'); - _.forOwn(mapped_source, function (val, key) { - // create card - var card = document.createElement('div'); - card.setAttribute('class', 'card'); - card.innerHTML = '
' + - '' + key + '' + - '
'; - reference.appendChild(card); - - // sidebar - var sidebar = document.getElementById('sidebar'); - var sidebarH6 = document.createElement('h6'); - sidebarH6.innerHTML = key; - sidebarH6.setAttribute('id', key + '-h6'); - sidebarH6.setAttribute('class', 'util-name'); - var sidebarUL = document.createElement('ul'); - sidebarUL.setAttribute('id', key + '-list') - sidebar.appendChild(sidebarH6); - sidebar.appendChild(sidebarUL); - - - generateUtilSection(val, key) - }) - - // write the util area - function generateUtilSection(util, key) { - _(util).forEach(function (val) { - var target = document.getElementById(key + '-card'); - var utilSection = document.createElement('section'); - utilSection.setAttribute('class', 'util'); - utilSection.innerHTML = '
' + val.utilArgs + '
' + - 'source' + - '
' + - '

' + val.description + '

' + - '
' + - 'Arguments' + - '' + - '
' + (val.returns ? - '
' + - 'Returns' + - '

' + - '(' + checkIfCustomType(val.returns.type) + ') ' + - '' + val.returns.desc + '' + - '

' + - '
' : '') + (val.example ? - '
' + - 'Example' + - '
' +
-            '' + val.example +
-            '' +
-          '
' + - '
' : ''); - target.appendChild(utilSection); - - // populate the ul with the child list - var targetList = document.getElementById(key + '-list'); - var list = document.createElement('li'); - list.innerHTML = '' + val.method + ''; - targetList.appendChild(list); - - }); - } - - function formatArgs(args) { - var argsText = ''; - _(args).forEach(function (val) { - val.type = checkIfCustomType(val.type); - argsText += '
  • ' + - '' + val.param + ' ' + - '(' + val.type + ') ' + - '' + val.description + '' + - '
  • '; - }); - return argsText; - } - - function checkIfCustomType(type) { - var pseudoType = ` ${type} `; - switch(type) { - case 'AnyArray': - pseudoType = ' Any [ ] '; - break; - case 'StringArray': - pseudoType = ' String [ ] '; - break; - } - return pseudoType; - } - - }); -})(); diff --git a/docs/img/codes-and-coffees-circle.svg b/docs/img/codes-and-coffees-circle.svg deleted file mode 100644 index 00948850..00000000 --- a/docs/img/codes-and-coffees-circle.svg +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/img/codes_and_coffees.ico b/docs/img/codes_and_coffees.ico deleted file mode 100644 index e399fec6..00000000 Binary files a/docs/img/codes_and_coffees.ico and /dev/null differ diff --git a/docs/img/js-pkg.ico b/docs/img/js-pkg.ico deleted file mode 100644 index 6bb83483..00000000 Binary files a/docs/img/js-pkg.ico and /dev/null differ diff --git a/docs/img/js-pkg.png b/docs/img/js-pkg.png deleted file mode 100644 index f7e23d06..00000000 Binary files a/docs/img/js-pkg.png and /dev/null differ diff --git a/docs/img/js-pkg.svg b/docs/img/js-pkg.svg deleted file mode 100644 index fa4d6101..00000000 --- a/docs/img/js-pkg.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - JS - diff --git a/docs/img/ts-type-def.png b/docs/img/ts-type-def.png deleted file mode 100644 index 11e2f815..00000000 Binary files a/docs/img/ts-type-def.png and /dev/null differ diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index ef04b4dc..00000000 --- a/docs/index.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - Common Utilities Package - - - - - - - - - - - - - - - - -
    - - -
    - -
    -

    Common Utilities Package

    -

    A package of commonly used JavaScript utilities.

    -
    -
    - - - npm - - - - - npm - - - - - npm - - - - - codecov - - - - - npm - - - - - npm - -
    -
    - - - stars - - - - - fork - - - - - contributors - -
    -
    - -
    Installation
    -

    NPM

    -
    -        npm i --save common-utils-pkg
    -      
    -

    Yarn

    -
    -        yarn add common-utils-pkg
    -      
    - -
    Usage
    -

    ES6

    -
    -        // Specific methods
    -
    -          import { randomPastelColor } from 'common-utils-pkg';
    -          randomPastelColor();
    -          // => "hsl(24.380295231593017,27.395530909987613%,86.86101287292395%)"
    -        
    -        
    - // All methods - - import * as UTILS from 'common-utils-pkg'; - UTILS.randomPastelColor(); - -
    - -

    Browser

    -
    -        
    -        <script src="https://unpkg.com/common-utils-pkg"></script>
    -            <script>
    -              // Specific methods
    -
    -              const randomPastelColor = window['common-utils-pkg].randomPastelColor;
    -              randomPastelColor();
    -            </script>
    -
    -            <script>
    -              // All methods
    -
    -              const UTILS = window['common-utils-pkg'];
    -              UTILS.randomPastelColor();
    -            </script>
    -        
    -      
    - - Read more about the usage here - -
    Available methods
    - Read more about the available methods here - -
    Changelog
    - Read the changelog here -
    - - -
    - - - - - - diff --git a/docs/index.js b/docs/index.js deleted file mode 100644 index 64a91f87..00000000 --- a/docs/index.js +++ /dev/null @@ -1,11 +0,0 @@ -(function () { - // generate list of available utilities - // $.getJSON('./mapped_source.json', function (data) { - // var targetList = $('ul#avail-utils'); - // var utilArray = []; - // _.forOwn(data, function (data, key) { - // utilArray.push('
  • - ' + key + '
  • ') - // }); - // targetList.append(utilArray) - // }) -})(); diff --git a/docs/js/custom.js b/docs/js/custom.js deleted file mode 100644 index addd6e0f..00000000 --- a/docs/js/custom.js +++ /dev/null @@ -1,3 +0,0 @@ -(function () { - -})(); diff --git a/docs/js/highlight.js b/docs/js/highlight.js deleted file mode 100644 index 10c26ccb..00000000 --- a/docs/js/highlight.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! highlight.js v9.12.0 | BSD3 License | git.io/hljslicense */ -!function(e){var t="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):t&&(t.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return t.hljs}))}(function(e){function t(e){return e.replace(/&/g,"&").replace(//g,">")}function r(e){return e.nodeName.toLowerCase()}function a(e,t){var r=e&&e.exec(t);return r&&0===r.index}function n(e){return E.test(e)}function i(e){var t,r,a,i,s=e.className+" ";if(s+=e.parentNode?e.parentNode.className:"",r=M.exec(s))return w(r[1])?r[1]:"no-highlight";for(s=s.split(/\s+/),t=0,a=s.length;a>t;t++)if(i=s[t],n(i)||w(i))return i}function s(e){var t,r={},a=Array.prototype.slice.call(arguments,1);for(t in e)r[t]=e[t];return a.forEach(function(e){for(t in e)r[t]=e[t]}),r}function c(e){var t=[];return function a(e,n){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?n+=i.nodeValue.length:1===i.nodeType&&(t.push({event:"start",offset:n,node:i}),n=a(i,n),r(i).match(/br|hr|img|input/)||t.push({event:"stop",offset:n,node:i}));return n}(e,0),t}function o(e,a,n){function i(){return e.length&&a.length?e[0].offset!==a[0].offset?e[0].offset"}function c(e){u+=""}function o(e){("start"===e.event?s:c)(e.node)}for(var l=0,u="",d=[];e.length||a.length;){var b=i();if(u+=t(n.substring(l,b[0].offset)),l=b[0].offset,b===e){d.reverse().forEach(c);do o(b.splice(0,1)[0]),b=i();while(b===e&&b.length&&b[0].offset===l);d.reverse().forEach(s)}else"start"===b[0].event?d.push(b[0].node):d.pop(),o(b.splice(0,1)[0])}return u+t(n.substr(l))}function l(e){return e.v&&!e.cached_variants&&(e.cached_variants=e.v.map(function(t){return s(e,{v:null},t)})),e.cached_variants||e.eW&&[s(e)]||[e]}function u(e){function t(e){return e&&e.source||e}function r(r,a){return new RegExp(t(r),"m"+(e.cI?"i":"")+(a?"g":""))}function a(n,i){if(!n.compiled){if(n.compiled=!0,n.k=n.k||n.bK,n.k){var s={},c=function(t,r){e.cI&&(r=r.toLowerCase()),r.split(" ").forEach(function(e){var r=e.split("|");s[r[0]]=[t,r[1]?Number(r[1]):1]})};"string"==typeof n.k?c("keyword",n.k):k(n.k).forEach(function(e){c(e,n.k[e])}),n.k=s}n.lR=r(n.l||/\w+/,!0),i&&(n.bK&&(n.b="\\b("+n.bK.split(" ").join("|")+")\\b"),n.b||(n.b=/\B|\b/),n.bR=r(n.b),n.e||n.eW||(n.e=/\B|\b/),n.e&&(n.eR=r(n.e)),n.tE=t(n.e)||"",n.eW&&i.tE&&(n.tE+=(n.e?"|":"")+i.tE)),n.i&&(n.iR=r(n.i)),null==n.r&&(n.r=1),n.c||(n.c=[]),n.c=Array.prototype.concat.apply([],n.c.map(function(e){return l("self"===e?n:e)})),n.c.forEach(function(e){a(e,n)}),n.starts&&a(n.starts,i);var o=n.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([n.tE,n.i]).map(t).filter(Boolean);n.t=o.length?r(o.join("|"),!0):{exec:function(){return null}}}}a(e)}function d(e,r,n,i){function s(e,t){var r,n;for(r=0,n=t.c.length;n>r;r++)if(a(t.c[r].bR,e))return t.c[r]}function c(e,t){if(a(e.eR,t)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?c(e.parent,t):void 0}function o(e,t){return!n&&a(t.iR,e)}function l(e,t){var r=v.cI?t[0].toLowerCase():t[0];return e.k.hasOwnProperty(r)&&e.k[r]}function p(e,t,r,a){var n=a?"":L.classPrefix,i='',i+t+s}function m(){var e,r,a,n;if(!N.k)return t(E);for(n="",r=0,N.lR.lastIndex=0,a=N.lR.exec(E);a;)n+=t(E.substring(r,a.index)),e=l(N,a),e?(M+=e[1],n+=p(e[0],t(a[0]))):n+=t(a[0]),r=N.lR.lastIndex,a=N.lR.exec(E);return n+t(E.substr(r))}function f(){var e="string"==typeof N.sL;if(e&&!x[N.sL])return t(E);var r=e?d(N.sL,E,!0,k[N.sL]):b(E,N.sL.length?N.sL:void 0);return N.r>0&&(M+=r.r),e&&(k[N.sL]=r.top),p(r.language,r.value,!1,!0)}function g(){C+=null!=N.sL?f():m(),E=""}function _(e){C+=e.cN?p(e.cN,"",!0):"",N=Object.create(e,{parent:{value:N}})}function h(e,t){if(E+=e,null==t)return g(),0;var r=s(t,N);if(r)return r.skip?E+=t:(r.eB&&(E+=t),g(),r.rB||r.eB||(E=t)),_(r,t),r.rB?0:t.length;var a=c(N,t);if(a){var n=N;n.skip?E+=t:(n.rE||n.eE||(E+=t),g(),n.eE&&(E=t));do N.cN&&(C+=R),N.skip||(M+=N.r),N=N.parent;while(N!==a.parent);return a.starts&&_(a.starts,""),n.rE?0:t.length}if(o(t,N))throw new Error('Illegal lexeme "'+t+'" for mode "'+(N.cN||"")+'"');return E+=t,t.length||1}var v=w(e);if(!v)throw new Error('Unknown language: "'+e+'"');u(v);var y,N=i||v,k={},C="";for(y=N;y!==v;y=y.parent)y.cN&&(C=p(y.cN,"",!0)+C);var E="",M=0;try{for(var B,S,$=0;;){if(N.t.lastIndex=$,B=N.t.exec(r),!B)break;S=h(r.substring($,B.index),B[0]),$=B.index+S}for(h(r.substr($)),y=N;y.parent;y=y.parent)y.cN&&(C+=R);return{r:M,value:C,language:e,top:N}}catch(A){if(A.message&&-1!==A.message.indexOf("Illegal"))return{r:0,value:t(r)};throw A}}function b(e,r){r=r||L.languages||k(x);var a={r:0,value:t(e)},n=a;return r.filter(w).forEach(function(t){var r=d(t,e,!1);r.language=t,r.r>n.r&&(n=r),r.r>a.r&&(n=a,a=r)}),n.language&&(a.second_best=n),a}function p(e){return L.tabReplace||L.useBR?e.replace(B,function(e,t){return L.useBR&&"\n"===e?"
    ":L.tabReplace?t.replace(/\t/g,L.tabReplace):""}):e}function m(e,t,r){var a=t?C[t]:r,n=[e.trim()];return e.match(/\bhljs\b/)||n.push("hljs"),-1===e.indexOf(a)&&n.push(a),n.join(" ").trim()}function f(e){var t,r,a,s,l,u=i(e);n(u)||(L.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):t=e,l=t.textContent,a=u?d(u,l,!0):b(l),r=c(t),r.length&&(s=document.createElementNS("http://www.w3.org/1999/xhtml","div"),s.innerHTML=a.value,a.value=o(r,c(s),l)),a.value=p(a.value),e.innerHTML=a.value,e.className=m(e.className,u,a.language),e.result={language:a.language,re:a.r},a.second_best&&(e.second_best={language:a.second_best.language,re:a.second_best.r}))}function g(e){L=s(L,e)}function _(){if(!_.called){_.called=!0;var e=document.querySelectorAll("pre code");N.forEach.call(e,f)}}function h(){addEventListener("DOMContentLoaded",_,!1),addEventListener("load",_,!1)}function v(t,r){var a=x[t]=r(e);a.aliases&&a.aliases.forEach(function(e){C[e]=t})}function y(){return k(x)}function w(e){return e=(e||"").toLowerCase(),x[e]||x[C[e]]}var N=[],k=Object.keys,x={},C={},E=/^(no-?highlight|plain|text)$/i,M=/\blang(?:uage)?-([\w-]+)\b/i,B=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,R="
    ",L={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};return e.highlight=d,e.highlightAuto=b,e.fixMarkup=p,e.highlightBlock=f,e.configure=g,e.initHighlighting=_,e.initHighlightingOnLoad=h,e.registerLanguage=v,e.listLanguages=y,e.getLanguage=w,e.inherit=s,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},e.C=function(t,r,a){var n=e.inherit({cN:"comment",b:t,e:r,c:[]},a||{});return n.c.push(e.PWM),n.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),n},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e.registerLanguage("apache",function(e){var t={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:!0,c:[e.HCM,{cN:"section",b:""},{cN:"attribute",b:/\w+/,r:0,k:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"meta",b:"\\s\\[",e:"\\]$"},{cN:"variable",b:"[\\$%]\\{",e:"\\}",c:["self",t]},t,e.QSM]}}],i:/\S/}}),e.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},r={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/\b-?[a-z\._]+\b/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,r,a,t]}}),e.registerLanguage("coffeescript",function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super yield import export from as default await then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},r="[A-Za-z$_][0-9A-Za-z$_]*",a={cN:"subst",b:/#\{/,e:/}/,k:t},n=[e.BNM,e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,a]},{b:/"/,e:/"/,c:[e.BE,a]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[a,e.HCM]},{b:"//[gim]*",r:0},{b:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{b:"@"+r},{sL:"javascript",eB:!0,eE:!0,v:[{b:"```",e:"```"},{b:"`",e:"`"}]}];a.c=n;var i=e.inherit(e.TM,{b:r}),s="(\\(.*\\))?\\s*\\B[-=]>",c={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:t,c:["self"].concat(n)}]};return{aliases:["coffee","cson","iced"],k:t,i:/\/\*/,c:n.concat([e.C("###","###"),e.HCM,{cN:"function",b:"^\\s*"+r+"\\s*=\\s*"+s,e:"[-=]>",rB:!0,c:[i,c]},{b:/[:\(,=]\s*/,r:0,c:[{cN:"function",b:s,e:"[-=]>",rB:!0,c:[c]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[i]},i]},{b:r+":",e:":",rB:!0,rE:!0,r:0}])}}),e.registerLanguage("cpp",function(e){var t={cN:"keyword",b:"\\b[a-z\\d_]*_t\\b"},r={cN:"string",v:[{b:'(u8?|U)?L?"',e:'"',i:"\\n",c:[e.BE]},{b:'(u8?|U)?R"',e:'"',c:[e.BE]},{b:"'\\\\?.",e:"'",i:"."}]},a={cN:"number",v:[{b:"\\b(0b[01']+)"},{b:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{b:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],r:0},n={cN:"meta",b:/#\s*[a-z]+\b/,e:/$/,k:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef include"},c:[{b:/\\\n/,r:0},e.inherit(r,{cN:"meta-string"}),{cN:"meta-string",b:/<[^\n>]*>/,e:/$/,i:"\\n"},e.CLCM,e.CBCM]},i=e.IR+"\\s*\\(",s={keyword:"int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and or not",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",literal:"true false nullptr NULL"},c=[t,e.CLCM,e.CBCM,a,r];return{aliases:["c","cc","h","c++","h++","hpp"],k:s,i:"",k:s,c:["self",t]},{b:e.IR+"::",k:s},{v:[{b:/=/,e:/;/},{b:/\(/,e:/\)/},{bK:"new throw return else",e:/;/}],k:s,c:c.concat([{b:/\(/,e:/\)/,k:s,c:c.concat(["self"]),r:0}]),r:0},{cN:"function",b:"("+e.IR+"[\\*&\\s]+)+"+i,rB:!0,e:/[{;=]/,eE:!0,k:s,i:/[^\w\s\*&]/,c:[{b:i,rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:s,r:0,c:[e.CLCM,e.CBCM,r,a,t]},e.CLCM,e.CBCM,n]},{cN:"class",bK:"class struct",e:/[{;:]/,c:[{b://,c:["self"]},e.TM]}]),exports:{preprocessor:n,strings:r,k:s}}}),e.registerLanguage("cs",function(e){var t={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long nameof object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while add alias ascending async await by descending dynamic equals from get global group into join let on orderby partial remove select set value var where yield",literal:"null false true"},r={cN:"string",b:'@"',e:'"',c:[{b:'""'}]},a=e.inherit(r,{i:/\n/}),n={cN:"subst",b:"{",e:"}",k:t},i=e.inherit(n,{i:/\n/}),s={cN:"string",b:/\$"/,e:'"',i:/\n/,c:[{b:"{{"},{b:"}}"},e.BE,i]},c={cN:"string",b:/\$@"/,e:'"',c:[{b:"{{"},{b:"}}"},{b:'""'},n]},o=e.inherit(c,{i:/\n/,c:[{b:"{{"},{b:"}}"},{b:'""'},i]});n.c=[c,s,r,e.ASM,e.QSM,e.CNM,e.CBCM],i.c=[o,s,a,e.ASM,e.QSM,e.CNM,e.inherit(e.CBCM,{i:/\n/})];var l={v:[c,s,r,e.ASM,e.QSM]},u=e.IR+"(<"+e.IR+"(\\s*,\\s*"+e.IR+")*>)?(\\[\\])?";return{aliases:["csharp"],k:t,i:/::/,c:[e.C("///","$",{rB:!0,c:[{cN:"doctag",v:[{b:"///",r:0},{b:""},{b:""}]}]}),e.CLCM,e.CBCM,{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},l,e.CNM,{bK:"class interface",e:/[{;=]/,i:/[^\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:"namespace",e:/[{;=]/,i:/[^\s:]/,c:[e.inherit(e.TM,{b:"[a-zA-Z](\\.?\\w)*"}),e.CLCM,e.CBCM]},{cN:"meta",b:"^\\s*\\[",eB:!0,e:"\\]",eE:!0,c:[{cN:"meta-string",b:/"/,e:/"/}]},{bK:"new return throw await else",r:0},{cN:"function",b:"("+u+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:t,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:t,r:0,c:[l,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}}),e.registerLanguage("css",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",r={b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\w-]+\(/,rB:!0,c:[{cN:"built_in",b:/[\w-]+/},{b:/\(/,e:/\)/,c:[e.ASM,e.QSM]}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"number",b:"#[0-9A-Fa-f]+"},{cN:"meta",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,{cN:"selector-id",b:/#[A-Za-z0-9_-]+/},{cN:"selector-class",b:/\.[A-Za-z0-9_-]+/},{cN:"selector-attr",b:/\[/,e:/\]/,i:"$"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{b:"@",e:"[{;]",i:/:/,c:[{cN:"keyword",b:/\w+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:"selector-tag",b:t,r:0},{b:"{",e:"}",i:/\S/,c:[e.CBCM,r]}]}}),e.registerLanguage("diff",function(e){return{aliases:["patch"],c:[{cN:"meta",r:10,v:[{b:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"comment",v:[{b:/Index: /,e:/$/},{b:/={3,}/,e:/$/},{b:/^\-{3}/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+{3}/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"addition",b:"^\\!",e:"$"}]}}),e.registerLanguage("http",function(e){var t="HTTP/[0-9\\.]+";return{aliases:["https"],i:"\\S",c:[{b:"^"+t,e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{b:"^[A-Z]+ (.*?) "+t+"$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0},{b:t},{cN:"keyword",b:"[A-Z]+"}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{e:"$",r:0}},{b:"\\n\\n",starts:{sL:[],eW:!0}}]}}),e.registerLanguage("ini",function(e){var t={cN:"string",c:[e.BE],v:[{b:"'''",e:"'''",r:10},{b:'"""',e:'"""',r:10},{b:'"',e:'"'},{b:"'",e:"'"}]};return{aliases:["toml"],cI:!0,i:/\S/,c:[e.C(";","$"),e.HCM,{cN:"section",b:/^\s*\[+/,e:/\]+/},{b:/^[a-z0-9\[\]_-]+\s*=\s*/,e:"$",rB:!0,c:[{cN:"attr",b:/[a-z0-9\[\]_-]+/},{b:/=/,eW:!0,r:0,c:[{cN:"literal",b:/\bon|off|true|false|yes|no\b/},{cN:"variable",v:[{b:/\$[\w\d"][\w\d_]*/},{b:/\$\{(.*?)}/}]},t,{cN:"number",b:/([\+\-]+)?[\d]+_[\d_]+/},e.NM]}]}]}}),e.registerLanguage("java",function(e){var t="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=t+"(<"+t+"(\\s*,\\s*"+t+")*>)?",a="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",n="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",i={cN:"number",b:n,r:0};return{aliases:["jsp"],k:a,i:/<\/|#/,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{b:/\w+@/,r:0},{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw return else",r:0},{cN:"function",b:"("+r+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:a,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:a,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},i,{cN:"meta",b:"@[A-Za-z]+"}]}}),e.registerLanguage("javascript",function(e){var t="[A-Za-z$_][0-9A-Za-z$_]*",r={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},a={cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},n={cN:"subst",b:"\\$\\{",e:"\\}",k:r,c:[]},i={cN:"string",b:"`",e:"`",c:[e.BE,n]};n.c=[e.ASM,e.QSM,i,a,e.RM];var s=n.c.concat([e.CBCM,e.CLCM]);return{aliases:["js","jsx"],k:r,c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,i,e.CLCM,e.CBCM,a,{b:/[{,]\s*/,r:0,c:[{b:t+"\\s*:",rB:!0,r:0,c:[{cN:"attr",b:t,r:0}]}]},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{cN:"function",b:"(\\(.*?\\)|"+t+")\\s*=>",rB:!0,e:"\\s*=>",c:[{cN:"params",v:[{b:t},{b:/\(\s*\)/},{b:/\(/,e:/\)/,eB:!0,eE:!0,k:r,c:s}]}]},{b://,sL:"xml",c:[{b:/<\w+\s*\/>/,skip:!0},{b:/<\w+/,e:/(\/\w+|\w+\/)>/,skip:!0,c:[{b:/<\w+\s*\/>/,skip:!0},"self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:t}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:s}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}}),e.registerLanguage("json",function(e){var t={literal:"true false null"},r=[e.QSM,e.CNM],a={e:",",eW:!0,eE:!0,c:r,k:t},n={b:"{",e:"}",c:[{cN:"attr",b:/"/,e:/"/,c:[e.BE],i:"\\n"},e.inherit(a,{b:/:/})],i:"\\S"},i={b:"\\[",e:"\\]",c:[e.inherit(a)],i:"\\S"};return r.splice(r.length,0,n,i),{c:r,k:t,i:"\\S"}}),e.registerLanguage("makefile",function(e){var t={cN:"variable",v:[{b:"\\$\\("+e.UIR+"\\)",c:[e.BE]},{b:/\$[@%`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],cI:!0,c:[{cN:"meta",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},e.C("",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{b:/<\?(php)?/,e:/\?>/,sL:"php",c:[{b:"/\\*",e:"\\*/",skip:!0}]},{cN:"tag",b:"|$)",e:">",k:{name:"style"},c:[r],starts:{e:"",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"|$)",e:">",k:{name:"script"},c:[r],starts:{e:"",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},{cN:"meta",v:[{b:/<\?xml/,e:/\?>/,r:10},{b:/<\?\w+/,e:/\?>/}]},{cN:"tag",b:"",c:[{cN:"name",b:/[^\/><\s]+/,r:0},r]}]}}),e.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"section",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"quote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"^```w*s*$",e:"^```s*$"},{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"string",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"symbol",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:/^\[[^\n]+\]:/,rB:!0,c:[{cN:"symbol",b:/\[/,e:/\]/,eB:!0,eE:!0},{cN:"link",b:/:\s*/,e:/$/,eB:!0}]}]}}),e.registerLanguage("nginx",function(e){var t={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},r={eW:!0,l:"[a-z/_]+",k:{literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,t],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0,c:[t]},{cN:"regexp",c:[e.BE,t],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},t]};return{aliases:["nginxconf"],c:[e.HCM,{b:e.UIR+"\\s+{",rB:!0,e:"{",c:[{cN:"section",b:e.UIR}],r:0},{b:e.UIR+"\\s",e:";|{",rB:!0,c:[{cN:"attribute",b:e.UIR,starts:r}],r:0}],i:"[^\\s\\}]"}}),e.registerLanguage("objectivec",function(e){var t={cN:"built_in",b:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},r={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},a=/[a-zA-Z@][a-zA-Z0-9_]*/,n="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],k:r,l:a,i:""}]}]},{cN:"class",b:"("+n.split(" ").join("|")+")\\b",e:"({|$)",eE:!0,k:n,l:a,c:[e.UTM]},{b:"\\."+e.UIR,r:0}]}}),e.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",r={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},a={b:"->{",e:"}"},n={v:[{b:/\$\d/},{b:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{b:/[\$%@][^\s\w{]/,r:0}]},i=[e.BE,r,n],s=[n,e.HCM,e.C("^\\=\\w","\\=cut",{eW:!0}),a,{cN:"string",c:i,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"function",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",eE:!0,r:5,c:[e.TM]},{b:"-\\w\\b",r:0},{b:"^__DATA__$",e:"^__END__$",sL:"mojolicious",c:[{b:"^@@.*",e:"$",cN:"comment"}]}];return r.c=s,a.c=s,{aliases:["pl","pm"],l:/[\w\.]+/,k:t,c:s}}),e.registerLanguage("php",function(e){var t={b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},r={cN:"meta",b:/<\?(php)?|\?>/},a={cN:"string",c:[e.BE,r],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},n={v:[e.BNM,e.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.HCM,e.C("//","$",{c:[r]}),e.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"}]}),e.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:e.UIR}),{cN:"string",b:/<<<['"]?\w+['"]?$/,e:/^\w+;?$/,c:[e.BE,{cN:"subst",v:[{b:/\$\w+/},{b:/\{\$/,e:/\}/}]}]},r,{cN:"keyword",b:/\$this\b/},t,{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",t,e.CBCM,a,n]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},a,n]}}),e.registerLanguage("python",function(e){var t={keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},r={cN:"meta",b:/^(>>>|\.\.\.) /},a={cN:"subst",b:/\{/,e:/\}/,k:t,i:/#/},n={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[r],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[r],r:10},{b:/(fr|rf|f)'''/,e:/'''/,c:[r,a]},{b:/(fr|rf|f)"""/,e:/"""/,c:[r,a]},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},{b:/(fr|rf|f)'/,e:/'/,c:[a]},{b:/(fr|rf|f)"/,e:/"/,c:[a]},e.ASM,e.QSM]},i={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},s={cN:"params",b:/\(/,e:/\)/,c:["self",r,i,n]};return a.c=[n,i,r],{aliases:["py","gyp"],k:t,i:/(<\/|->|\?)|=>/,c:[r,i,n,e.HCM,{v:[{cN:"function",bK:"def"},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n,]/,c:[e.UTM,s,{b:/->/,eW:!0,k:"None"}]},{cN:"meta",b:/^[\t ]*@/,e:/$/},{b:/\b(print|exec)\(/}]}}),e.registerLanguage("ruby",function(e){ - var t="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},a={cN:"doctag",b:"@[A-Za-z]+"},n={b:"#<",e:">"},i=[e.C("#","$",{c:[a]}),e.C("^\\=begin","^\\=end",{c:[a],r:10}),e.C("^__END__","\\n$")],s={cN:"subst",b:"#\\{",e:"}",k:r},c={cN:"string",c:[e.BE,s],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{b:/<<(-?)\w+$/,e:/^\s*\w+$/}]},o={cN:"params",b:"\\(",e:"\\)",endsParent:!0,k:r},l=[c,n,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{b:"<\\s*",c:[{b:"("+e.IR+"::)?"+e.IR}]}].concat(i)},{cN:"function",bK:"def",e:"$|;",c:[e.inherit(e.TM,{b:t}),o].concat(i)},{b:e.IR+"::"},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":(?!\\s)",c:[c,{b:t}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{cN:"params",b:/\|/,e:/\|/,k:r},{b:"("+e.RSR+"|unless)\\s*",k:"unless",c:[n,{cN:"regexp",c:[e.BE,s],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}].concat(i),r:0}].concat(i);s.c=l,o.c=l;var u="[>?]>",d="[\\w#]+\\(\\w+\\):\\d+:\\d+>",b="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",p=[{b:/^\s*=>/,starts:{e:"$",c:l}},{cN:"meta",b:"^("+u+"|"+d+"|"+b+")",starts:{e:"$",c:l}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:r,i:/\/\*/,c:i.concat(p).concat(l)}}),e.registerLanguage("shell",function(e){return{aliases:["console"],c:[{cN:"meta",b:"^\\s{0,3}[\\w\\d\\[\\]()@-]*[>%$#]",starts:{e:"$",sL:"bash"}}]}}),e.registerLanguage("sql",function(e){var t=e.C("--","$");return{cI:!0,i:/[<>{}*#]/,c:[{bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment",e:/;/,eW:!0,l:/[\w\.]+/,k:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}}),e}); diff --git a/docs/mapped_source.json b/docs/mapped_source.json deleted file mode 100644 index 7d6d0043..00000000 --- a/docs/mapped_source.json +++ /dev/null @@ -1,359 +0,0 @@ -{ - "Array": [ - { - "description": "Removes provided element from an array.", - "args": [ - { - "description": "of strings to remove element from", - "param": "array", - "type": "array", - "optional": false - }, - { - "description": "to remove from the array", - "param": "toRemove", - "type": "string", - "optional": false - } - ], - "module": "Array", - "method": "arrayRemoveItem", - "returns": { - "desc": "of strings without the removed element.", - "type": "array" - }, - "example": "arrayRemoveItem(['The', 'quick', 'brown'], 'The');\n// => ['quick', 'brown']", - "utilArgs": "arrayRemoveItem(array, toRemove)", - "sourceUrl": "https://github.com/iamdevlinph/common-utils-pkg/blob/main/src/array-remove-item/array-remove-item.ts#L16-L18" - }, - { - "description": "Splits a string to an array based on the delimiter passed.", - "args": [ - { - "description": "to convert to array", - "param": "string", - "type": "string", - "optional": false - }, - { - "description": "character where to split the string", - "param": "delimiter", - "type": "string", - "optional": false - } - ], - "module": "Array", - "method": "stringToArray", - "returns": { - "desc": "of the split string.", - "type": "array" - }, - "example": "stringToArray('apple;banana;orange', ';');\n// => ['apple', 'banana', 'orange']", - "utilArgs": "stringToArray(string, delimiter)", - "sourceUrl": "https://github.com/iamdevlinph/common-utils-pkg/blob/main/src/string-to-array/string-to-array.ts#L15-L16" - } - ], - "String": [ - { - "description": "Convert an array to a string and combine on the delimiter passed.", - "args": [ - { - "description": "to convert to string", - "param": "array", - "type": "array", - "optional": false - }, - { - "description": "characater to use in combining to string", - "param": "delimiter", - "type": "string", - "optional": false - } - ], - "module": "String", - "method": "arrayToString", - "returns": { - "desc": "from the array.", - "type": "string" - }, - "example": "arrayToString(['The', 'quick', 'brown'], '-');\n// => 'The-brown-fox'", - "utilArgs": "arrayToString(array, delimiter)", - "sourceUrl": "https://github.com/iamdevlinph/common-utils-pkg/blob/main/src/array-to-string/array-to-string.ts#L16-L17" - }, - { - "description": "Converts a string into a slug for URL usage.", - "args": [ - { - "description": "to convert to slug", - "param": "string", - "type": "string", - "optional": false - } - ], - "module": "String", - "method": "slugify", - "returns": { - "desc": "slug version of the string.", - "type": "string" - }, - "example": "slugify('The quick brown fox');\n// => 'the-quick-brown-fox'\n\nslugify('A. more-Complicated string!..');\n// => 'a-more-complicated-string'\n\nslugify('wïth speciäl chærs');\n// => 'with-special-chars'", - "utilArgs": "slugify(string)", - "sourceUrl": "https://github.com/iamdevlinph/common-utils-pkg/blob/main/src/slugify/slugify.ts#L21-L39" - }, - { - "description": "Converts a string to Sentence case.", - "args": [ - { - "description": "to convert to Sentence case", - "param": "string", - "type": "string", - "optional": false - } - ], - "module": "String", - "method": "toSentenceCase", - "returns": { - "desc": "in sentence case.", - "type": "string" - }, - "example": "toSentenceCase('THE QUICK BROWN FOX');\n// => 'The quick brown fox'", - "utilArgs": "toSentenceCase(string)", - "sourceUrl": "https://github.com/iamdevlinph/common-utils-pkg/blob/main/src/to-sentence-case/to-sentence-case.ts#L14-L17" - }, - { - "description": "Converts a string to a Title Case.", - "args": [ - { - "description": "to convert to Title Case", - "param": "string", - "type": "string", - "optional": false - } - ], - "module": "String", - "method": "toTitleCase", - "returns": { - "desc": "in Title Case.", - "type": "string" - }, - "example": "toTitleCase('the quick brown fox');\n// => 'The Quick Brown Fox'", - "utilArgs": "toTitleCase(string)", - "sourceUrl": "https://github.com/iamdevlinph/common-utils-pkg/blob/main/src/to-title-case/to-title-case.ts#L16-L22" - } - ], - "Browser": [ - { - "description": "Detects browser being used.", - "args": [], - "module": "Browser", - "method": "browserDetect", - "returns": { - "desc": "of browser name.", - "type": "string" - }, - "example": "browserDetect();\n// => 'Chrome", - "utilArgs": "browserDetect()", - "sourceUrl": "https://github.com/iamdevlinph/common-utils-pkg/blob/main/src/browser-detect/browser-detect.ts#L17-L52" - } - ], - "Color": [ - { - "description": "Brightens or darkens a HEX color based on the amount specified. Behaves like the SASS lighen and darken.\nWill always return with # symbol.", - "args": [ - { - "description": "HEX color to change brightness", - "param": "hex", - "type": "string", - "optional": false - }, - { - "description": "positive or negative percentage", - "param": "amount", - "type": "number", - "optional": false - } - ], - "module": "Color", - "method": "colorBrightness", - "returns": { - "desc": "of manipulated HEX color.", - "type": "string" - }, - "example": "colorBrightness('#3CB878', 50);\n// => '#6EEAAA'\n\ncolorBrightness('#3CB878', -50);\n// => '#A8646'", - "utilArgs": "colorBrightness(hex, amount)", - "sourceUrl": "https://github.com/iamdevlinph/common-utils-pkg/blob/main/src/color-brightness/color-brightness.ts#L23-L52" - }, - { - "description": "Inverts a HEX color.", - "args": [ - { - "description": "hex color to convert", - "param": "hex", - "type": "string", - "optional": false - } - ], - "module": "Color", - "method": "invertColor", - "returns": { - "desc": "of HEX color.", - "type": "string" - }, - "example": "invertColor('#E3CCA8');\n// => '#1C3357'\n\ninvertColor('ccc');\n// => '#333333'", - "utilArgs": "invertColor(hex)", - "sourceUrl": "https://github.com/iamdevlinph/common-utils-pkg/blob/main/src/invert-hex-color/invert-hex-color.ts#L27-L46" - }, - { - "description": "Get a random pastel color.", - "args": [], - "module": "Color", - "method": "randomPastelColor", - "returns": { - "desc": "of HSL color.", - "type": "string" - }, - "example": "randomPastelColor();\n// => 'hsl(85.78009756824814,31.861668997564585%,90.94781190317771%)'", - "utilArgs": "randomPastelColor()", - "sourceUrl": "https://github.com/iamdevlinph/common-utils-pkg/blob/main/src/random-pastel-color/random-pastel-color.ts#L13-L18" - } - ], - "Key": [ - { - "description": "Generates a GUID.", - "args": [], - "module": "Key", - "method": "guid", - "returns": { - "desc": "of guid.", - "type": "string" - }, - "example": "guid();\n// => \"0153a717-3ba2-b1ac-67f1-49db6551a28d\"", - "utilArgs": "guid()", - "sourceUrl": "https://github.com/iamdevlinph/common-utils-pkg/blob/main/src/guid/guid.ts#L14-L20" - } - ], - "File": [ - { - "description": "Converts a number of bytes to a human readable file size.", - "args": [ - { - "description": "of bytes to show", - "param": "bytes", - "type": "number", - "optional": false - }, - { - "description": "optional number of decimals to show", - "param": "decimals", - "type": "number", - "optional": true - } - ], - "module": "File", - "method": "readableBytes", - "returns": { - "desc": "of human readable file size.", - "type": "string" - }, - "example": "readableBytes(1234);\n// => 1.205078125 kB\n\nreadableBytes(1234, 2);\n// => 1.21 kB", - "utilArgs": "readableBytes(bytes, [decimals])", - "sourceUrl": "https://github.com/iamdevlinph/common-utils-pkg/blob/main/src/readable-bytes/readable-bytes.ts#L20-L30" - } - ], - "Storage": [ - { - "description": "Removes all data stored in the local storage.", - "args": [], - "module": "Storage", - "method": "storageClear", - "example": "storageClear();", - "utilArgs": "storageClear()", - "sourceUrl": "https://github.com/iamdevlinph/common-utils-pkg/blob/main/src/storage-clear/storage-clear.ts#L12-L12" - }, - { - "description": "Retrieves data from the local storage.", - "args": [ - { - "description": "to retrieve", - "param": "key", - "type": "string", - "optional": false - } - ], - "module": "Storage", - "method": "storageGet", - "returns": { - "desc": "data from the local storage. Returns '' if key is not found" - }, - "example": "storageGet('key');", - "utilArgs": "storageGet(key)", - "sourceUrl": "https://github.com/iamdevlinph/common-utils-pkg/blob/main/src/storage-get/storage-get.ts#L16-L25" - }, - { - "description": "Removes an entry from the local storage.", - "args": [ - { - "description": "of the entry to remove", - "param": "key", - "type": "string", - "optional": false - } - ], - "module": "Storage", - "method": "storageRemove", - "example": "storageRemove('key');", - "utilArgs": "storageRemove(key)", - "sourceUrl": "https://github.com/iamdevlinph/common-utils-pkg/blob/main/src/storage-remove/storage-remove.ts#L12-L13" - }, - { - "description": "Stores data to the local storage.", - "args": [ - { - "description": "name of the entry", - "param": "key", - "type": "string", - "optional": false - }, - { - "description": "data to store in the local storage", - "param": "data", - "type": "*", - "optional": false - } - ], - "module": "Storage", - "method": "storageSet", - "example": "storageSet('key', data);", - "utilArgs": "storageSet(key, data)", - "sourceUrl": "https://github.com/iamdevlinph/common-utils-pkg/blob/main/src/storage-set/storage-set.ts#L15-L16" - } - ], - "Boolean": [ - { - "description": "Converts any value to a Boolean equivalent.", - "args": [ - { - "description": "value to check if true or false", - "param": "val", - "type": "*", - "optional": false - }, - { - "description": "of user defined true values", - "param": "trueValuesArr", - "type": "array", - "optional": true - } - ], - "module": "Boolean", - "method": "toBoolean", - "returns": { - "desc": "equivalent of the value.", - "type": "boolean" - }, - "example": "toBoolean('y');\n // => true\n\ntoBoolean(null);\n// => false", - "utilArgs": "toBoolean(val, [trueValuesArr])", - "sourceUrl": "https://github.com/iamdevlinph/common-utils-pkg/blob/main/src/to-boolean/to-boolean.ts#L24-L39" - } - ] -} \ No newline at end of file diff --git a/docs/source.json b/docs/source.json deleted file mode 100644 index bdf54ee3..00000000 --- a/docs/source.json +++ /dev/null @@ -1,2756 +0,0 @@ -[ - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "Removes provided element from an array." - } - ] - } - ] - }, - "tags": [ - { - "title": "version", - "description": "4.0.8", - "lineNumber": 3 - }, - { - "title": "module", - "description": null, - "lineNumber": 4, - "type": null, - "name": "Array" - }, - { - "title": "name", - "description": null, - "lineNumber": 5, - "name": "arrayRemoveItem" - }, - { - "title": "param", - "description": "of strings to remove element from", - "lineNumber": 6, - "type": { - "type": "NameExpression", - "name": "array" - }, - "name": "array" - }, - { - "title": "param", - "description": "to remove from the array", - "lineNumber": 7, - "type": { - "type": "NameExpression", - "name": "string" - }, - "name": "toRemove" - }, - { - "title": "returns", - "description": "of strings without the removed element.", - "lineNumber": 8, - "type": { - "type": "NameExpression", - "name": "array" - } - }, - { - "title": "example", - "description": "arrayRemoveItem(['The', 'quick', 'brown'], 'The');\n// => ['quick', 'brown']", - "lineNumber": 9 - } - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 14, - "column": 3 - } - }, - "context": { - "loc": { - "start": { - "line": 16, - "column": 0 - }, - "end": { - "line": 18, - "column": 2 - } - }, - "file": "/home/iamdevlinph/projects/iamdevlinph/common-utils-pkg/src/array-remove-item/array-remove-item.ts" - }, - "augments": [], - "examples": [ - { - "description": "arrayRemoveItem(['The', 'quick', 'brown'], 'The');\n// => ['quick', 'brown']" - } - ], - "implements": [], - "params": [ - { - "title": "param", - "name": "array", - "lineNumber": 6, - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "of strings to remove element from" - } - ] - } - ] - }, - "type": { - "type": "NameExpression", - "name": "array" - } - }, - { - "title": "param", - "name": "toRemove", - "lineNumber": 7, - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "to remove from the array" - } - ] - } - ] - }, - "type": { - "type": "NameExpression", - "name": "string" - } - } - ], - "properties": [], - "returns": [ - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "of strings without the removed element." - } - ] - } - ] - }, - "title": "returns", - "type": { - "type": "NameExpression", - "name": "array" - } - } - ], - "sees": [], - "throws": [], - "todos": [], - "yields": [], - "version": "4.0.8", - "kind": "module", - "name": "arrayRemoveItem", - "members": { - "global": [], - "inner": [], - "instance": [], - "events": [], - "static": [] - }, - "path": [ - { - "name": "arrayRemoveItem", - "kind": "module" - } - ], - "namespace": "arrayRemoveItem" - }, - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "Convert an array to a string and combine on the delimiter passed." - } - ] - } - ] - }, - "tags": [ - { - "title": "version", - "description": "1.0.0", - "lineNumber": 3 - }, - { - "title": "module", - "description": null, - "lineNumber": 4, - "type": null, - "name": "String" - }, - { - "title": "name", - "description": null, - "lineNumber": 5, - "name": "arrayToString" - }, - { - "title": "param", - "description": "to convert to string", - "lineNumber": 6, - "type": { - "type": "NameExpression", - "name": "array" - }, - "name": "array" - }, - { - "title": "param", - "description": "characater to use in combining to string", - "lineNumber": 7, - "type": { - "type": "NameExpression", - "name": "string" - }, - "name": "delimiter" - }, - { - "title": "returns", - "description": "from the array.", - "lineNumber": 8, - "type": { - "type": "NameExpression", - "name": "string" - } - }, - { - "title": "example", - "description": "arrayToString(['The', 'quick', 'brown'], '-');\n// => 'The-brown-fox'", - "lineNumber": 9 - } - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 14, - "column": 3 - } - }, - "context": { - "loc": { - "start": { - "line": 16, - "column": 0 - }, - "end": { - "line": 17, - "column": 24 - } - }, - "file": "/home/iamdevlinph/projects/iamdevlinph/common-utils-pkg/src/array-to-string/array-to-string.ts" - }, - "augments": [], - "examples": [ - { - "description": "arrayToString(['The', 'quick', 'brown'], '-');\n// => 'The-brown-fox'" - } - ], - "implements": [], - "params": [ - { - "title": "param", - "name": "array", - "lineNumber": 6, - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "to convert to string" - } - ] - } - ] - }, - "type": { - "type": "NameExpression", - "name": "array" - } - }, - { - "title": "param", - "name": "delimiter", - "lineNumber": 7, - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "characater to use in combining to string" - } - ] - } - ] - }, - "type": { - "type": "NameExpression", - "name": "string" - } - } - ], - "properties": [], - "returns": [ - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "from the array." - } - ] - } - ] - }, - "title": "returns", - "type": { - "type": "NameExpression", - "name": "string" - } - } - ], - "sees": [], - "throws": [], - "todos": [], - "yields": [], - "version": "1.0.0", - "kind": "module", - "name": "arrayToString", - "members": { - "global": [], - "inner": [], - "instance": [], - "events": [], - "static": [] - }, - "path": [ - { - "name": "arrayToString", - "kind": "module" - } - ], - "namespace": "arrayToString" - }, - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "Detects browser being used." - } - ] - } - ] - }, - "tags": [ - { - "title": "version", - "description": "3.1.0", - "lineNumber": 3 - }, - { - "title": "module", - "description": null, - "lineNumber": 4, - "type": null, - "name": "Browser" - }, - { - "title": "name", - "description": null, - "lineNumber": 5, - "name": "browserDetect" - }, - { - "title": "returns", - "description": "of browser name.", - "lineNumber": 6, - "type": { - "type": "NameExpression", - "name": "string" - } - }, - { - "title": "example", - "description": "browserDetect();\n// => 'Chrome", - "lineNumber": 7 - } - ], - "loc": { - "start": { - "line": 4, - "column": 0 - }, - "end": { - "line": 15, - "column": 3 - } - }, - "context": { - "loc": { - "start": { - "line": 17, - "column": 0 - }, - "end": { - "line": 52, - "column": 2 - } - }, - "file": "/home/iamdevlinph/projects/iamdevlinph/common-utils-pkg/src/browser-detect/browser-detect.ts" - }, - "augments": [], - "examples": [ - { - "description": "browserDetect();\n// => 'Chrome" - } - ], - "implements": [], - "params": [], - "properties": [], - "returns": [ - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "of browser name." - } - ] - } - ] - }, - "title": "returns", - "type": { - "type": "NameExpression", - "name": "string" - } - } - ], - "sees": [], - "throws": [], - "todos": [], - "yields": [], - "version": "3.1.0", - "kind": "module", - "name": "browserDetect", - "members": { - "global": [], - "inner": [], - "instance": [], - "events": [], - "static": [] - }, - "path": [ - { - "name": "browserDetect", - "kind": "module" - } - ], - "namespace": "browserDetect" - }, - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "Brightens or darkens a HEX color based on the amount specified. Behaves like the SASS lighen and darken.\nWill always return with # symbol." - } - ] - } - ] - }, - "tags": [ - { - "title": "version", - "description": "1.7.1", - "lineNumber": 4 - }, - { - "title": "module", - "description": null, - "lineNumber": 5, - "type": null, - "name": "Color" - }, - { - "title": "name", - "description": null, - "lineNumber": 6, - "name": "colorBrightness" - }, - { - "title": "param", - "description": "HEX color to change brightness", - "lineNumber": 7, - "type": { - "type": "NameExpression", - "name": "string" - }, - "name": "hex" - }, - { - "title": "param", - "description": "positive or negative percentage", - "lineNumber": 8, - "type": { - "type": "NameExpression", - "name": "number" - }, - "name": "amount" - }, - { - "title": "returns", - "description": "of manipulated HEX color.", - "lineNumber": 9, - "type": { - "type": "NameExpression", - "name": "string" - } - }, - { - "title": "example", - "description": "colorBrightness('#3CB878', 50);\n// => '#6EEAAA'\n\ncolorBrightness('#3CB878', -50);\n// => '#A8646'", - "lineNumber": 10 - } - ], - "loc": { - "start": { - "line": 4, - "column": 0 - }, - "end": { - "line": 21, - "column": 3 - } - }, - "context": { - "loc": { - "start": { - "line": 23, - "column": 0 - }, - "end": { - "line": 52, - "column": 2 - } - }, - "file": "/home/iamdevlinph/projects/iamdevlinph/common-utils-pkg/src/color-brightness/color-brightness.ts" - }, - "augments": [], - "examples": [ - { - "description": "colorBrightness('#3CB878', 50);\n// => '#6EEAAA'\n\ncolorBrightness('#3CB878', -50);\n// => '#A8646'" - } - ], - "implements": [], - "params": [ - { - "title": "param", - "name": "hex", - "lineNumber": 7, - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "HEX color to change brightness" - } - ] - } - ] - }, - "type": { - "type": "NameExpression", - "name": "string" - } - }, - { - "title": "param", - "name": "amount", - "lineNumber": 8, - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "positive or negative percentage" - } - ] - } - ] - }, - "type": { - "type": "NameExpression", - "name": "number" - } - } - ], - "properties": [], - "returns": [ - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "of manipulated HEX color." - } - ] - } - ] - }, - "title": "returns", - "type": { - "type": "NameExpression", - "name": "string" - } - } - ], - "sees": [], - "throws": [], - "todos": [], - "yields": [], - "version": "1.7.1", - "kind": "module", - "name": "colorBrightness", - "members": { - "global": [], - "inner": [], - "instance": [], - "events": [], - "static": [] - }, - "path": [ - { - "name": "colorBrightness", - "kind": "module" - } - ], - "namespace": "colorBrightness" - }, - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "Generates a GUID." - } - ] - } - ] - }, - "tags": [ - { - "title": "version", - "description": "1.0.0", - "lineNumber": 3 - }, - { - "title": "module", - "description": null, - "lineNumber": 4, - "type": null, - "name": "Key" - }, - { - "title": "name", - "description": null, - "lineNumber": 5, - "name": "guid" - }, - { - "title": "returns", - "description": "of guid.", - "lineNumber": 6, - "type": { - "type": "NameExpression", - "name": "string" - } - }, - { - "title": "example", - "description": "guid();\n// => \"0153a717-3ba2-b1ac-67f1-49db6551a28d\"", - "lineNumber": 7 - } - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 12, - "column": 3 - } - }, - "context": { - "loc": { - "start": { - "line": 14, - "column": 0 - }, - "end": { - "line": 20, - "column": 2 - } - }, - "file": "/home/iamdevlinph/projects/iamdevlinph/common-utils-pkg/src/guid/guid.ts" - }, - "augments": [], - "examples": [ - { - "description": "guid();\n// => \"0153a717-3ba2-b1ac-67f1-49db6551a28d\"" - } - ], - "implements": [], - "params": [], - "properties": [], - "returns": [ - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "of guid." - } - ] - } - ] - }, - "title": "returns", - "type": { - "type": "NameExpression", - "name": "string" - } - } - ], - "sees": [], - "throws": [], - "todos": [], - "yields": [], - "version": "1.0.0", - "kind": "module", - "name": "guid", - "members": { - "global": [], - "inner": [], - "instance": [], - "events": [], - "static": [] - }, - "path": [ - { - "name": "guid", - "kind": "module" - } - ], - "namespace": "guid" - }, - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "Inverts a HEX color." - } - ] - } - ] - }, - "tags": [ - { - "title": "version", - "description": "1.6.1", - "lineNumber": 3 - }, - { - "title": "module", - "description": null, - "lineNumber": 4, - "type": null, - "name": "Color" - }, - { - "title": "name", - "description": null, - "lineNumber": 5, - "name": "invertColor" - }, - { - "title": "param", - "description": "hex color to convert", - "lineNumber": 6, - "type": { - "type": "NameExpression", - "name": "string" - }, - "name": "hex" - }, - { - "title": "returns", - "description": "of HEX color.", - "lineNumber": 7, - "type": { - "type": "NameExpression", - "name": "string" - } - }, - { - "title": "example", - "description": "invertColor('#E3CCA8');\n// => '#1C3357'\n\ninvertColor('ccc');\n// => '#333333'", - "lineNumber": 8 - } - ], - "loc": { - "start": { - "line": 10, - "column": 0 - }, - "end": { - "line": 25, - "column": 3 - } - }, - "context": { - "loc": { - "start": { - "line": 27, - "column": 0 - }, - "end": { - "line": 46, - "column": 2 - } - }, - "file": "/home/iamdevlinph/projects/iamdevlinph/common-utils-pkg/src/invert-hex-color/invert-hex-color.ts" - }, - "augments": [], - "examples": [ - { - "description": "invertColor('#E3CCA8');\n// => '#1C3357'\n\ninvertColor('ccc');\n// => '#333333'" - } - ], - "implements": [], - "params": [ - { - "title": "param", - "name": "hex", - "lineNumber": 6, - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "hex color to convert" - } - ] - } - ] - }, - "type": { - "type": "NameExpression", - "name": "string" - } - } - ], - "properties": [], - "returns": [ - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "of HEX color." - } - ] - } - ] - }, - "title": "returns", - "type": { - "type": "NameExpression", - "name": "string" - } - } - ], - "sees": [], - "throws": [], - "todos": [], - "yields": [], - "version": "1.6.1", - "kind": "module", - "name": "invertColor", - "members": { - "global": [], - "inner": [], - "instance": [], - "events": [], - "static": [] - }, - "path": [ - { - "name": "invertColor", - "kind": "module" - } - ], - "namespace": "invertColor" - }, - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "Get a random pastel color." - } - ] - } - ] - }, - "tags": [ - { - "title": "version", - "description": "1.0.0", - "lineNumber": 3 - }, - { - "title": "module", - "description": null, - "lineNumber": 4, - "type": null, - "name": "Color" - }, - { - "title": "name", - "description": null, - "lineNumber": 5, - "name": "randomPastelColor" - }, - { - "title": "returns", - "description": "of HSL color.", - "lineNumber": 6, - "type": { - "type": "NameExpression", - "name": "string" - } - }, - { - "title": "example", - "description": "randomPastelColor();\n// => 'hsl(85.78009756824814,31.861668997564585%,90.94781190317771%)'", - "lineNumber": 7 - } - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 12, - "column": 3 - } - }, - "context": { - "loc": { - "start": { - "line": 13, - "column": 0 - }, - "end": { - "line": 18, - "column": 2 - } - }, - "file": "/home/iamdevlinph/projects/iamdevlinph/common-utils-pkg/src/random-pastel-color/random-pastel-color.ts" - }, - "augments": [], - "examples": [ - { - "description": "randomPastelColor();\n// => 'hsl(85.78009756824814,31.861668997564585%,90.94781190317771%)'" - } - ], - "implements": [], - "params": [], - "properties": [], - "returns": [ - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "of HSL color." - } - ] - } - ] - }, - "title": "returns", - "type": { - "type": "NameExpression", - "name": "string" - } - } - ], - "sees": [], - "throws": [], - "todos": [], - "yields": [], - "version": "1.0.0", - "kind": "module", - "name": "randomPastelColor", - "members": { - "global": [], - "inner": [], - "instance": [], - "events": [], - "static": [] - }, - "path": [ - { - "name": "randomPastelColor", - "kind": "module" - } - ], - "namespace": "randomPastelColor" - }, - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "Converts a number of bytes to a human readable file size." - } - ] - } - ] - }, - "tags": [ - { - "title": "version", - "description": "1.0.0", - "lineNumber": 3 - }, - { - "title": "module", - "description": null, - "lineNumber": 4, - "type": null, - "name": "File" - }, - { - "title": "name", - "description": null, - "lineNumber": 5, - "name": "readableBytes" - }, - { - "title": "param", - "description": "of bytes to show", - "lineNumber": 6, - "type": { - "type": "NameExpression", - "name": "number" - }, - "name": "bytes" - }, - { - "title": "param", - "description": "optional number of decimals to show", - "lineNumber": 7, - "type": { - "type": "OptionalType", - "expression": { - "type": "NameExpression", - "name": "number" - } - }, - "name": "decimals" - }, - { - "title": "returns", - "description": "of human readable file size.", - "lineNumber": 8, - "type": { - "type": "NameExpression", - "name": "string" - } - }, - { - "title": "example", - "description": "readableBytes(1234);\n// => 1.205078125 kB\n\nreadableBytes(1234, 2);\n// => 1.21 kB", - "lineNumber": 9 - } - ], - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 19, - "column": 3 - } - }, - "context": { - "loc": { - "start": { - "line": 20, - "column": 0 - }, - "end": { - "line": 30, - "column": 2 - } - }, - "file": "/home/iamdevlinph/projects/iamdevlinph/common-utils-pkg/src/readable-bytes/readable-bytes.ts" - }, - "augments": [], - "examples": [ - { - "description": "readableBytes(1234);\n// => 1.205078125 kB\n\nreadableBytes(1234, 2);\n// => 1.21 kB" - } - ], - "implements": [], - "params": [ - { - "title": "param", - "name": "bytes", - "lineNumber": 6, - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "of bytes to show" - } - ] - } - ] - }, - "type": { - "type": "NameExpression", - "name": "number" - } - }, - { - "title": "param", - "name": "decimals", - "lineNumber": 7, - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "optional number of decimals to show" - } - ] - } - ] - }, - "type": { - "type": "OptionalType", - "expression": { - "type": "NameExpression", - "name": "number" - } - } - } - ], - "properties": [], - "returns": [ - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "of human readable file size." - } - ] - } - ] - }, - "title": "returns", - "type": { - "type": "NameExpression", - "name": "string" - } - } - ], - "sees": [], - "throws": [], - "todos": [], - "yields": [], - "version": "1.0.0", - "kind": "module", - "name": "readableBytes", - "members": { - "global": [], - "inner": [], - "instance": [], - "events": [], - "static": [] - }, - "path": [ - { - "name": "readableBytes", - "kind": "module" - } - ], - "namespace": "readableBytes" - }, - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "Converts a string into a slug for URL usage." - } - ] - } - ] - }, - "tags": [ - { - "title": "version", - "description": "2.1.0", - "lineNumber": 3 - }, - { - "title": "module", - "description": null, - "lineNumber": 4, - "type": null, - "name": "String" - }, - { - "title": "name", - "description": null, - "lineNumber": 5, - "name": "slugify" - }, - { - "title": "param", - "description": "to convert to slug", - "lineNumber": 6, - "type": { - "type": "NameExpression", - "name": "string" - }, - "name": "string" - }, - { - "title": "returns", - "description": "slug version of the string.", - "lineNumber": 7, - "type": { - "type": "NameExpression", - "name": "string" - } - }, - { - "title": "example", - "description": "slugify('The quick brown fox');\n// => 'the-quick-brown-fox'\n\nslugify('A. more-Complicated string!..');\n// => 'a-more-complicated-string'\n\nslugify('wïth speciäl chærs');\n// => 'with-special-chars'", - "lineNumber": 8 - } - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 19, - "column": 3 - } - }, - "context": { - "loc": { - "start": { - "line": 21, - "column": 0 - }, - "end": { - "line": 39, - "column": 2 - } - }, - "file": "/home/iamdevlinph/projects/iamdevlinph/common-utils-pkg/src/slugify/slugify.ts" - }, - "augments": [], - "examples": [ - { - "description": "slugify('The quick brown fox');\n// => 'the-quick-brown-fox'\n\nslugify('A. more-Complicated string!..');\n// => 'a-more-complicated-string'\n\nslugify('wïth speciäl chærs');\n// => 'with-special-chars'" - } - ], - "implements": [], - "params": [ - { - "title": "param", - "name": "string", - "lineNumber": 6, - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "to convert to slug" - } - ] - } - ] - }, - "type": { - "type": "NameExpression", - "name": "string" - } - } - ], - "properties": [], - "returns": [ - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "slug version of the string." - } - ] - } - ] - }, - "title": "returns", - "type": { - "type": "NameExpression", - "name": "string" - } - } - ], - "sees": [], - "throws": [], - "todos": [], - "yields": [], - "version": "2.1.0", - "kind": "module", - "name": "slugify", - "members": { - "global": [], - "inner": [], - "instance": [], - "events": [], - "static": [] - }, - "path": [ - { - "name": "slugify", - "kind": "module" - } - ], - "namespace": "slugify" - }, - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "Removes all data stored in the local storage." - } - ] - } - ] - }, - "tags": [ - { - "title": "version", - "description": "1.9.0", - "lineNumber": 3 - }, - { - "title": "module", - "description": null, - "lineNumber": 4, - "type": null, - "name": "Storage" - }, - { - "title": "name", - "description": null, - "lineNumber": 5, - "name": "storageClear" - }, - { - "title": "example", - "description": "storageClear();", - "lineNumber": 6 - } - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 11, - "column": 3 - } - }, - "context": { - "loc": { - "start": { - "line": 12, - "column": 0 - }, - "end": { - "line": 12, - "column": 62 - } - }, - "file": "/home/iamdevlinph/projects/iamdevlinph/common-utils-pkg/src/storage-clear/storage-clear.ts" - }, - "augments": [], - "examples": [ - { - "description": "storageClear();" - } - ], - "implements": [], - "params": [], - "properties": [], - "returns": [], - "sees": [], - "throws": [], - "todos": [], - "yields": [], - "version": "1.9.0", - "kind": "module", - "name": "storageClear", - "members": { - "global": [], - "inner": [], - "instance": [], - "events": [], - "static": [] - }, - "path": [ - { - "name": "storageClear", - "kind": "module" - } - ], - "namespace": "storageClear" - }, - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "Retrieves data from the local storage." - } - ] - } - ] - }, - "tags": [ - { - "title": "version", - "description": "1.9.0", - "lineNumber": 3 - }, - { - "title": "module", - "description": null, - "lineNumber": 4, - "type": null, - "name": "Storage" - }, - { - "title": "name", - "description": null, - "lineNumber": 5, - "name": "storageGet" - }, - { - "title": "param", - "description": "to retrieve", - "lineNumber": 6, - "type": { - "type": "NameExpression", - "name": "string" - }, - "name": "key" - }, - { - "title": "returns", - "description": "data from the local storage. Returns '' if key is not found", - "lineNumber": 7, - "type": { - "type": "AllLiteral" - } - }, - { - "title": "example", - "description": "storageGet('key');", - "lineNumber": 8 - } - ], - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 14, - "column": 3 - } - }, - "context": { - "loc": { - "start": { - "line": 16, - "column": 0 - }, - "end": { - "line": 25, - "column": 2 - } - }, - "file": "/home/iamdevlinph/projects/iamdevlinph/common-utils-pkg/src/storage-get/storage-get.ts" - }, - "augments": [], - "examples": [ - { - "description": "storageGet('key');" - } - ], - "implements": [], - "params": [ - { - "title": "param", - "name": "key", - "lineNumber": 6, - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "to retrieve" - } - ] - } - ] - }, - "type": { - "type": "NameExpression", - "name": "string" - } - } - ], - "properties": [], - "returns": [ - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "data from the local storage. Returns '' if key is not found" - } - ] - } - ] - }, - "title": "returns", - "type": { - "type": "AllLiteral" - } - } - ], - "sees": [], - "throws": [], - "todos": [], - "yields": [], - "version": "1.9.0", - "kind": "module", - "name": "storageGet", - "members": { - "global": [], - "inner": [], - "instance": [], - "events": [], - "static": [] - }, - "path": [ - { - "name": "storageGet", - "kind": "module" - } - ], - "namespace": "storageGet" - }, - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "Removes an entry from the local storage." - } - ] - } - ] - }, - "tags": [ - { - "title": "version", - "description": "1.9.0", - "lineNumber": 3 - }, - { - "title": "module", - "description": null, - "lineNumber": 4, - "type": null, - "name": "Storage" - }, - { - "title": "name", - "description": null, - "lineNumber": 5, - "name": "storageRemove" - }, - { - "title": "param", - "description": "of the entry to remove", - "lineNumber": 6, - "type": { - "type": "NameExpression", - "name": "string" - }, - "name": "key" - }, - { - "title": "example", - "description": "storageRemove('key');", - "lineNumber": 7 - } - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 11, - "column": 3 - } - }, - "context": { - "loc": { - "start": { - "line": 12, - "column": 0 - }, - "end": { - "line": 13, - "column": 38 - } - }, - "file": "/home/iamdevlinph/projects/iamdevlinph/common-utils-pkg/src/storage-remove/storage-remove.ts" - }, - "augments": [], - "examples": [ - { - "description": "storageRemove('key');" - } - ], - "implements": [], - "params": [ - { - "title": "param", - "name": "key", - "lineNumber": 6, - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "of the entry to remove" - } - ] - } - ] - }, - "type": { - "type": "NameExpression", - "name": "string" - } - } - ], - "properties": [], - "returns": [], - "sees": [], - "throws": [], - "todos": [], - "yields": [], - "version": "1.9.0", - "kind": "module", - "name": "storageRemove", - "members": { - "global": [], - "inner": [], - "instance": [], - "events": [], - "static": [] - }, - "path": [ - { - "name": "storageRemove", - "kind": "module" - } - ], - "namespace": "storageRemove" - }, - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "Stores data to the local storage." - } - ] - } - ] - }, - "tags": [ - { - "title": "version", - "description": "1.9.0", - "lineNumber": 3 - }, - { - "title": "module", - "description": null, - "lineNumber": 4, - "type": null, - "name": "Storage" - }, - { - "title": "name", - "description": null, - "lineNumber": 5, - "name": "storageSet" - }, - { - "title": "param", - "description": "name of the entry", - "lineNumber": 6, - "type": { - "type": "NameExpression", - "name": "string" - }, - "name": "key" - }, - { - "title": "param", - "description": "data to store in the local storage", - "lineNumber": 7, - "type": { - "type": "AllLiteral" - }, - "name": "data" - }, - { - "title": "example", - "description": "storageSet('key', data);", - "lineNumber": 8 - } - ], - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 14, - "column": 3 - } - }, - "context": { - "loc": { - "start": { - "line": 15, - "column": 0 - }, - "end": { - "line": 16, - "column": 76 - } - }, - "file": "/home/iamdevlinph/projects/iamdevlinph/common-utils-pkg/src/storage-set/storage-set.ts" - }, - "augments": [], - "examples": [ - { - "description": "storageSet('key', data);" - } - ], - "implements": [], - "params": [ - { - "title": "param", - "name": "key", - "lineNumber": 6, - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "name of the entry" - } - ] - } - ] - }, - "type": { - "type": "NameExpression", - "name": "string" - } - }, - { - "title": "param", - "name": "data", - "lineNumber": 7, - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "data to store in the local storage" - } - ] - } - ] - }, - "type": { - "type": "AllLiteral" - } - } - ], - "properties": [], - "returns": [], - "sees": [], - "throws": [], - "todos": [], - "yields": [], - "version": "1.9.0", - "kind": "module", - "name": "storageSet", - "members": { - "global": [], - "inner": [], - "instance": [], - "events": [], - "static": [] - }, - "path": [ - { - "name": "storageSet", - "kind": "module" - } - ], - "namespace": "storageSet" - }, - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "Splits a string to an array based on the delimiter passed." - } - ] - } - ] - }, - "tags": [ - { - "title": "version", - "description": "1.0.0", - "lineNumber": 3 - }, - { - "title": "module", - "description": null, - "lineNumber": 4, - "type": null, - "name": "Array" - }, - { - "title": "name", - "description": null, - "lineNumber": 5, - "name": "stringToArray" - }, - { - "title": "param", - "description": "to convert to array", - "lineNumber": 6, - "type": { - "type": "NameExpression", - "name": "string" - }, - "name": "string" - }, - { - "title": "param", - "description": "character where to split the string", - "lineNumber": 7, - "type": { - "type": "NameExpression", - "name": "string" - }, - "name": "delimiter" - }, - { - "title": "returns", - "description": "of the split string.", - "lineNumber": 8, - "type": { - "type": "NameExpression", - "name": "array" - } - }, - { - "title": "example", - "description": "stringToArray('apple;banana;orange', ';');\n// => ['apple', 'banana', 'orange']", - "lineNumber": 9 - } - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 14, - "column": 3 - } - }, - "context": { - "loc": { - "start": { - "line": 15, - "column": 0 - }, - "end": { - "line": 16, - "column": 26 - } - }, - "file": "/home/iamdevlinph/projects/iamdevlinph/common-utils-pkg/src/string-to-array/string-to-array.ts" - }, - "augments": [], - "examples": [ - { - "description": "stringToArray('apple;banana;orange', ';');\n// => ['apple', 'banana', 'orange']" - } - ], - "implements": [], - "params": [ - { - "title": "param", - "name": "string", - "lineNumber": 6, - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "to convert to array" - } - ] - } - ] - }, - "type": { - "type": "NameExpression", - "name": "string" - } - }, - { - "title": "param", - "name": "delimiter", - "lineNumber": 7, - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "character where to split the string" - } - ] - } - ] - }, - "type": { - "type": "NameExpression", - "name": "string" - } - } - ], - "properties": [], - "returns": [ - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "of the split string." - } - ] - } - ] - }, - "title": "returns", - "type": { - "type": "NameExpression", - "name": "array" - } - } - ], - "sees": [], - "throws": [], - "todos": [], - "yields": [], - "version": "1.0.0", - "kind": "module", - "name": "stringToArray", - "members": { - "global": [], - "inner": [], - "instance": [], - "events": [], - "static": [] - }, - "path": [ - { - "name": "stringToArray", - "kind": "module" - } - ], - "namespace": "stringToArray" - }, - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "Converts any value to a Boolean equivalent." - } - ] - }, - { - "type": "paragraph", - "children": [ - { - "type": "strong", - "children": [ - { - "type": "text", - "value": "Note:" - } - ] - }, - { - "type": "text", - "value": " If no user-defined array is passed, the default true values are:" - } - ] - }, - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "['true', 'yes', 'y', '1']." - } - ] - } - ] - }, - "tags": [ - { - "title": "version", - "description": "3.1.1", - "lineNumber": 7 - }, - { - "title": "module", - "description": null, - "lineNumber": 8, - "type": null, - "name": "Boolean" - }, - { - "title": "name", - "description": null, - "lineNumber": 9, - "name": "toBoolean" - }, - { - "title": "param", - "description": "value to check if true or false", - "lineNumber": 10, - "type": { - "type": "AllLiteral" - }, - "name": "val" - }, - { - "title": "param", - "description": "of user defined true values", - "lineNumber": 11, - "type": { - "type": "OptionalType", - "expression": { - "type": "NameExpression", - "name": "array" - } - }, - "name": "trueValuesArr", - "default": "true,'true','yes','y','1',1" - }, - { - "title": "returns", - "description": "equivalent of the value.", - "lineNumber": 12, - "type": { - "type": "NameExpression", - "name": "boolean" - } - }, - { - "title": "example", - "description": "toBoolean('y');\n // => true\n\ntoBoolean(null);\n// => false", - "lineNumber": 13 - } - ], - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 23, - "column": 3 - } - }, - "context": { - "loc": { - "start": { - "line": 24, - "column": 0 - }, - "end": { - "line": 39, - "column": 2 - } - }, - "file": "/home/iamdevlinph/projects/iamdevlinph/common-utils-pkg/src/to-boolean/to-boolean.ts" - }, - "augments": [], - "examples": [ - { - "description": "toBoolean('y');\n // => true\n\ntoBoolean(null);\n// => false" - } - ], - "implements": [], - "params": [ - { - "title": "param", - "name": "val", - "lineNumber": 10, - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "value to check if true or false" - } - ] - } - ] - }, - "type": { - "type": "AllLiteral" - } - }, - { - "title": "param", - "name": "trueValuesArr", - "lineNumber": 11, - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "of user defined true values" - } - ] - } - ] - }, - "type": { - "type": "NameExpression", - "name": "array" - }, - "default": "true,'true','yes','y','1',1" - } - ], - "properties": [], - "returns": [ - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "equivalent of the value." - } - ] - } - ] - }, - "title": "returns", - "type": { - "type": "NameExpression", - "name": "boolean" - } - } - ], - "sees": [], - "throws": [], - "todos": [], - "yields": [], - "version": "3.1.1", - "kind": "module", - "name": "toBoolean", - "members": { - "global": [], - "inner": [], - "instance": [], - "events": [], - "static": [] - }, - "path": [ - { - "name": "toBoolean", - "kind": "module" - } - ], - "namespace": "toBoolean" - }, - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "Converts a string to Sentence case." - } - ] - } - ] - }, - "tags": [ - { - "title": "version", - "description": "1.0.0", - "lineNumber": 3 - }, - { - "title": "module", - "description": null, - "lineNumber": 4, - "type": null, - "name": "String" - }, - { - "title": "name", - "description": null, - "lineNumber": 5, - "name": "toSentenceCase" - }, - { - "title": "param", - "description": "to convert to Sentence case", - "lineNumber": 6, - "type": { - "type": "NameExpression", - "name": "string" - }, - "name": "string" - }, - { - "title": "returns", - "description": "in sentence case.", - "lineNumber": 7, - "type": { - "type": "NameExpression", - "name": "string" - } - }, - { - "title": "example", - "description": "toSentenceCase('THE QUICK BROWN FOX');\n// => 'The quick brown fox'", - "lineNumber": 8 - } - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 13, - "column": 3 - } - }, - "context": { - "loc": { - "start": { - "line": 14, - "column": 0 - }, - "end": { - "line": 17, - "column": 2 - } - }, - "file": "/home/iamdevlinph/projects/iamdevlinph/common-utils-pkg/src/to-sentence-case/to-sentence-case.ts" - }, - "augments": [], - "examples": [ - { - "description": "toSentenceCase('THE QUICK BROWN FOX');\n// => 'The quick brown fox'" - } - ], - "implements": [], - "params": [ - { - "title": "param", - "name": "string", - "lineNumber": 6, - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "to convert to Sentence case" - } - ] - } - ] - }, - "type": { - "type": "NameExpression", - "name": "string" - } - } - ], - "properties": [], - "returns": [ - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "in sentence case." - } - ] - } - ] - }, - "title": "returns", - "type": { - "type": "NameExpression", - "name": "string" - } - } - ], - "sees": [], - "throws": [], - "todos": [], - "yields": [], - "version": "1.0.0", - "kind": "module", - "name": "toSentenceCase", - "members": { - "global": [], - "inner": [], - "instance": [], - "events": [], - "static": [] - }, - "path": [ - { - "name": "toSentenceCase", - "kind": "module" - } - ], - "namespace": "toSentenceCase" - }, - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "Converts a string to a Title Case." - } - ] - } - ] - }, - "tags": [ - { - "title": "version", - "description": "1.0.0", - "lineNumber": 3 - }, - { - "title": "module", - "description": null, - "lineNumber": 4, - "type": null, - "name": "String" - }, - { - "title": "name", - "description": null, - "lineNumber": 5, - "name": "toTitleCase" - }, - { - "title": "param", - "description": "to convert to Title Case", - "lineNumber": 6, - "type": { - "type": "NameExpression", - "name": "string" - }, - "name": "string" - }, - { - "title": "returns", - "description": "in Title Case.", - "lineNumber": 7, - "type": { - "type": "NameExpression", - "name": "string" - } - }, - { - "title": "example", - "description": "toTitleCase('the quick brown fox');\n// => 'The Quick Brown Fox'", - "lineNumber": 8 - } - ], - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 15, - "column": 3 - } - }, - "context": { - "loc": { - "start": { - "line": 16, - "column": 0 - }, - "end": { - "line": 22, - "column": 6 - } - }, - "file": "/home/iamdevlinph/projects/iamdevlinph/common-utils-pkg/src/to-title-case/to-title-case.ts" - }, - "augments": [], - "examples": [ - { - "description": "toTitleCase('the quick brown fox');\n// => 'The Quick Brown Fox'" - } - ], - "implements": [], - "params": [ - { - "title": "param", - "name": "string", - "lineNumber": 6, - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "to convert to Title Case" - } - ] - } - ] - }, - "type": { - "type": "NameExpression", - "name": "string" - } - } - ], - "properties": [], - "returns": [ - { - "description": { - "type": "root", - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "text", - "value": "in Title Case." - } - ] - } - ] - }, - "title": "returns", - "type": { - "type": "NameExpression", - "name": "string" - } - } - ], - "sees": [], - "throws": [], - "todos": [], - "yields": [], - "version": "1.0.0", - "kind": "module", - "name": "toTitleCase", - "members": { - "global": [], - "inner": [], - "instance": [], - "events": [], - "static": [] - }, - "path": [ - { - "name": "toTitleCase", - "kind": "module" - } - ], - "namespace": "toTitleCase" - } -] \ No newline at end of file diff --git a/docs/styles/highlight.css b/docs/styles/highlight.css deleted file mode 100644 index 77f9339b..00000000 --- a/docs/styles/highlight.css +++ /dev/null @@ -1 +0,0 @@ -.hljs{display:block;overflow-x:auto;padding:0.5em;background:#F0F0F0}.hljs,.hljs-subst{color:#444}.hljs-comment{color:#888888}.hljs-keyword,.hljs-attribute,.hljs-selector-tag,.hljs-meta-keyword,.hljs-doctag,.hljs-name{font-weight:bold}.hljs-type,.hljs-string,.hljs-number,.hljs-selector-id,.hljs-selector-class,.hljs-quote,.hljs-template-tag,.hljs-deletion{color:#880000}.hljs-title,.hljs-section{color:#880000;font-weight:bold}.hljs-regexp,.hljs-symbol,.hljs-variable,.hljs-template-variable,.hljs-link,.hljs-selector-attr,.hljs-selector-pseudo{color:#BC6060}.hljs-literal{color:#78A960}.hljs-built_in,.hljs-bullet,.hljs-code,.hljs-addition{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta-string{color:#4d99bf}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold} diff --git a/docs/styles/main.css b/docs/styles/main.css deleted file mode 100644 index 2405d42b..00000000 --- a/docs/styles/main.css +++ /dev/null @@ -1,182 +0,0 @@ -@font-face { - font-family: "fira-code"; - src: url("../fonts/FiraCode-Regular.ttf") format("truetype"); - font-weight: normal; - font-style: normal; -} - -body { - font-family: "Montserrat", sans-serif; - margin: 0; - height: 100vh; - background: #263238; - /* color: white; */ -} - -* { - /* border: 1px solid white; */ -} - -pre { - white-space: normal; -} - -code { - font-family: "fira-code"; - white-space: pre-line; -} - -ul { - margin: 0; -} - -.center { - text-align: center; -} - -.bold { - font-weight: bold; -} - -.heading { - margin-top: 30px; -} - -.hidden { - display: none; -} - -/* main page */ - -.home-page { - display: grid; - grid-template-columns: auto auto auto; - grid-template-rows: 50px 100px 100px min-content 70px; - grid-template-areas: "left pad right" - "left banner-top right" - "left banner-bottom right" - "left main right" - "left footer right"; -} - -.home-page .banner { - grid-area: banner-top/banner-bottom; - text-align: center; - z-index: 1; -} - -.home-page .banner .banner__logo { - height: 200px; - border: 5px solid #263238; -} - -.home-page .color-only { - grid-area: banner-bottom; - background: white; -} - -.home-page .main { - grid-area: main; - background: white; - padding: 0 20px 20px; -} - -.footer { - grid-area: footer; - text-align: center; - color: white; - margin-top: 20px; -} - -/* docs */ - -.docs { - display: grid; - grid-template-columns: 250px auto; - grid-template-rows: 50px min-content 70px; - grid-template-areas: "header header" - "sidebar reference" - "sidebar footer"; -} - -.docs .header { - grid-area: header; - display: grid; - grid-template-columns: 90px auto; - color: white; - position: fixed; - width: 100vw; - background: #263238; - z-index: 2; -} - -.docs .header .logo { - width: 50px; -} - -.docs .header .logo-link { - text-align: center; -} - -.docs .header .package-name { - line-height: 18px; -} - -.docs .sidebar { - grid-area: sidebar; - color: white; - padding: 0 20px; - position: fixed; - top: 50px; -} - -.docs .sidebar a { - color: #DEDEDE; -} - -.docs .sidebar a:hover { - color: white; -} - -.docs .sidebar ul { - padding-left: 10px; - border-left: 1px dashed #dcdcdc; - font-size: 12px; -} - -.docs .sidebar .util-name:not(:first-child) { - margin-top: 20px; -} - -.docs .reference { - grid-area: reference; - padding: 0 20px; -} - -/* footer */ - -.footer a { - color: white; -} - -.footer a:hover { - text-decoration: underline; -} - -.footer span { - display: block; -} - -/* override materializecss */ - -.card:first-of-type { - margin-top: 0px; -} - -ul.styled { - padding: 0 0 10px 20px; -} - -a.dashed { - border-bottom: 1px dashed; -} diff --git a/docs/styles/usage.css b/docs/styles/usage.css deleted file mode 100644 index 6feecfe2..00000000 --- a/docs/styles/usage.css +++ /dev/null @@ -1,3 +0,0 @@ -.red-code { - color: #880000; -} diff --git a/docs/styles/utils.css b/docs/styles/utils.css deleted file mode 100644 index 9bdda8f6..00000000 --- a/docs/styles/utils.css +++ /dev/null @@ -1,73 +0,0 @@ -.reference .card .util:not(:first-of-type) { - padding-top: 25px; -} - -.util__section { - padding-top: 10px; -} -.util__func { - font-weight: bold; - font-family: monospace; - padding-top: 50px; - margin-top: -50px; - display: inline-block; -} - -.util__source { - margin-left: 10px; - font-size: 12px; -} - -.util p { - padding-left: 20px; -} -.util__desc { - padding-left: 0px !important; -} - -.arg {} -.arg__list { - padding-left: 20px !important; -} -.arg__name { - color: #00a0f0; -} -.arg__type { - color: #00a0f0; - font-weight: bold; - font-style: italic; -} -.arg__desc {} -.arg__optional { - font-weight: bold; -} - -.return {} -.return__type { - color: #00a0f0; - font-weight: bold; - font-style: italic; -} -.return__desc {} - -.example {} -.example__code { - margin: 0 -24px; -} -.example__code code { - padding: 10px 24px; - background: #E3CCA8; - color: black; -} - -.divider--fade { - border: 0; - height: 1px; - background: red; - background-image: linear-gradient(90deg, red, #fff, #fff); - margin-bottom: 10px; -} - -.card .card-content { - padding: 24px 24px 0 24px; -} diff --git a/docs/usage.html b/docs/usage.html deleted file mode 100644 index 7e5332b8..00000000 --- a/docs/usage.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - Common Utilities Package | Usage - - - - - - - - - - - - - - - - - -
    - - -
    - -
    -

    How to use?

    - - - - -
    ES6
    -

    For ES6, you can import a single method like this

    -
    import { randomPastelColor } from 'common-utils-pkg';
    - -

    Or you may choose to import multiple methods like so

    -
    import { randomPastelColor, stringToArray } from 'common-utils-pkg';
    - -

    Or you can also import all and store them to a variable

    -
    -        import * as UTILS from 'common-utils-pkg';
    -      
    - -
    Browser
    -

    You can also use this package directly in your browser by importing the script from UNPKG

    -
    <script src="https://unpkg.com/common-utils-pkg"></script>
    -

    This adds the package to the window object. You can access the common-utils-pkg variable by

    -
    window['common-utils-pkg]
    -

    And it would be easier to assign the methods to a variable like

    -
    -        <script>
    -          const randomPastelColor = window['common-utils-pkg'].randomPastelColor;
    -          </script>
    -        
    -      
    - -

    Or you can export the whole package into a variable.

    -
    -        <script>
    -          const UTILS = window['common-utils-pkg'];
    -          </script>
    -        
    -      
    - -
    Usage
    - -
    -        randomPastelColor();
    -
    -          /-- OR --/
    -          UTILS.randomPastelColor();
    -        
    -      
    - - Read more about the available methods here -
    - - -
    - - - - - - diff --git a/docs/usage.js b/docs/usage.js deleted file mode 100644 index be33cd06..00000000 --- a/docs/usage.js +++ /dev/null @@ -1,22 +0,0 @@ -(function () { - // $.getJSON('./mapped_source.json', function (data) { - // var utilsList = $('ul#utils-list'); - // var utilsListCode = $('code#utils-list-code'); - // var utilArray = []; - // _.forOwn(data, function (data, key) { - // utilArray.push('
  • - ' + key + '
  • ') - // }); - // utilsList.append(utilArray); - // utilsListCode.html('<script>\n' + - // generateUtilsCode(data) + - // '</script>') - - // function generateUtilsCode(utilArray) { - // var arr = []; - // _.forEach(utilArray, function (data, key) { - // arr.push('const ' + key + ' = window[\'common-utils-pkg\'].' + key + '\n'); - // }) - // return arr.join(''); - // } - // }); -})(); diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 457f7378..f227a01f 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -51,7 +51,7 @@ const config: Config = { // 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', // }, theme: { - customCss: './src-docusaurus/css/custom.css', + customCss: './css/custom.css', }, gtag: { trackingID: 'G-J633J2X891', diff --git a/docusaurus/Array/arrayRemoveItem.md b/docusaurus/Array/arrayRemoveItem.md deleted file mode 100644 index 841cc769..00000000 --- a/docusaurus/Array/arrayRemoveItem.md +++ /dev/null @@ -1,5 +0,0 @@ -## arrayRemoveItemRemoves provided element from an array.### Parameters* `array` **StringArray** array to remove element from -* `toRemove` **[String][1]** element to remove from the array### Examples```javascript -arrayRemoveItem(['The', 'quick', 'brown'], 'The'); -// => ['quick', 'brown'] -```Returns **StringArray** Returns an array without the removed element.**Meta*** **version**: 4.0.8[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String diff --git a/docusaurus/Array/stringToArray.md b/docusaurus/Array/stringToArray.md deleted file mode 100644 index 7f026e7b..00000000 --- a/docusaurus/Array/stringToArray.md +++ /dev/null @@ -1,5 +0,0 @@ -## stringToArraySplits a string to an array based on the delimiter passed.### Parameters* `string` **[String][1]** string to convert to array -* `delimiter` **[String][1]** where to split the string### Examples```javascript -stringToArray('apple;banana;orange', ';'); -// => ['apple', 'banana', 'orange'] -```Returns **StringArray** Returns an array of the split string.**Meta*** **version**: 1.0.0[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String diff --git a/docusaurus/Boolean/toBoolean.md b/docusaurus/Boolean/toBoolean.md deleted file mode 100644 index cf8f9722..00000000 --- a/docusaurus/Boolean/toBoolean.md +++ /dev/null @@ -1,8 +0,0 @@ -## toBooleanConverts any value to a Boolean equivalent.**Note:** If no user-defined array is passed, the default true values are:\['true', 'yes', 'y', '1'].### Parameters* `val` **any** value to check if true or false -* `trueValuesArr` **AnyArray?** optional array of user defined true values### Examples```javascript -toBoolean('y'); - // => true - -toBoolean(null); -// => false -```Returns **[Boolean][1]** Returns a boolean equivalent of the value.**Meta*** **version**: 3.1.1[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean diff --git a/docusaurus/Browser/browserDetect.md b/docusaurus/Browser/browserDetect.md deleted file mode 100644 index 0ecaf150..00000000 --- a/docusaurus/Browser/browserDetect.md +++ /dev/null @@ -1,4 +0,0 @@ -## browserDetectDetects browser being used.### Examples```javascript -browserDetect(); -// => 'Chrome -```Returns **[String][1]** Returns browser name**Meta*** **version**: 3.1.0[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String diff --git a/docusaurus/Color/colorBrightness.md b/docusaurus/Color/colorBrightness.md deleted file mode 100644 index 5ff9de15..00000000 --- a/docusaurus/Color/colorBrightness.md +++ /dev/null @@ -1,9 +0,0 @@ -## colorBrightnessBrightens or darkens a HEX color based on the amount specified. Behaves like the SASS lighen and darken. -Will always return with # symbol.### Parameters* `hex` **[String][1]** HEX color to change brightness -* `amount` **[Number][2]** positive or negative percentage### Examples```javascript -colorBrightness('#3CB878', 50); -// => '#6EEAAA' - -colorBrightness('#3CB878', -50); -// => '#A8646' -```Returns **[String][1]** Returns a manipulated HEX color**Meta*** **version**: 1.7.1[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number diff --git a/docusaurus/Color/invertColor.md b/docusaurus/Color/invertColor.md deleted file mode 100644 index 096c9172..00000000 --- a/docusaurus/Color/invertColor.md +++ /dev/null @@ -1,7 +0,0 @@ -## invertColorInverts a HEX color.### Parameters* `hex` **[String][1]** hex color to convert### Examples```javascript -invertColor('#E3CCA8'); -// => '#1C3357' - -invertColor('ccc'); -// => '#333333' -```Returns **[String][1]** Returns a HEX color string.**Meta*** **version**: 1.6.1[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String diff --git a/docusaurus/Color/randomPastelColor.md b/docusaurus/Color/randomPastelColor.md deleted file mode 100644 index e43845be..00000000 --- a/docusaurus/Color/randomPastelColor.md +++ /dev/null @@ -1,4 +0,0 @@ -## randomPastelColorGet a random pastel color.### Examples```javascript -randomPastelColor(); -// => 'hsl(85.78009756824814,31.861668997564585%,90.94781190317771%)' -```Returns **[String][1]** Returns an HSL color.**Meta*** **version**: 1.0.0[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String diff --git a/docusaurus/File/readableBytes.md b/docusaurus/File/readableBytes.md deleted file mode 100644 index 0c77f381..00000000 --- a/docusaurus/File/readableBytes.md +++ /dev/null @@ -1,8 +0,0 @@ -## readableBytesConverts a number of bytes to a human readable file size.### Parameters* `bytes` **[Number][1]** number of bytes to show -* `decimals` **[Number][1]?** optional number of decimals to show### Examples```javascript -readableBytes(1234); -// => 1.205078125 kB - -readableBytes(1234, 2); -// => 1.21 kB -```Returns **[String][2]** Returns a human readable file size.**Meta*** **version**: 1.0.0[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String diff --git a/docusaurus/Key/guid.md b/docusaurus/Key/guid.md deleted file mode 100644 index a1bb0389..00000000 --- a/docusaurus/Key/guid.md +++ /dev/null @@ -1,4 +0,0 @@ -## guidGenerates a GUID.### Examples```javascript -guid(); -// => "0153a717-3ba2-b1ac-67f1-49db6551a28d" -```Returns **[String][1]** guid string**Meta*** **version**: 1.0.0[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String diff --git a/docusaurus/Storage/storageClear.md b/docusaurus/Storage/storageClear.md deleted file mode 100644 index 5c05b7b0..00000000 --- a/docusaurus/Storage/storageClear.md +++ /dev/null @@ -1,3 +0,0 @@ -## storageClearRemoves all data stored in the local storage.### Examples```javascript -storageClear(); -```**Meta*** **version**: 1.9.0 diff --git a/docusaurus/Storage/storageGet.md b/docusaurus/Storage/storageGet.md deleted file mode 100644 index 7dfc5ac6..00000000 --- a/docusaurus/Storage/storageGet.md +++ /dev/null @@ -1,3 +0,0 @@ -## storageGetRetrieves data from the local storage.### Parameters* `key` **[String][1]** key to retrieve### Examples```javascript -storageGet('key'); -```Returns **Any** Returns data from the local storage. Returns '' if key is not found**Meta*** **version**: 1.9.0[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String diff --git a/docusaurus/Storage/storageRemove.md b/docusaurus/Storage/storageRemove.md deleted file mode 100644 index 9554a166..00000000 --- a/docusaurus/Storage/storageRemove.md +++ /dev/null @@ -1,3 +0,0 @@ -## storageRemoveRemoves an entry from the local storage.### Parameters* `key` **[String][1]** key of the entry to remove### Examples```javascript -storageRemove('key'); -```**Meta*** **version**: 1.9.0[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String diff --git a/docusaurus/Storage/storageSet.md b/docusaurus/Storage/storageSet.md deleted file mode 100644 index c6299b65..00000000 --- a/docusaurus/Storage/storageSet.md +++ /dev/null @@ -1,4 +0,0 @@ -## storageSetStores data to the local storage.### Parameters* `key` **[String][1]** name of the entry -* `data` **any** data to store in the local storage### Examples```javascript -storageSet('key', data); -```**Meta*** **version**: 1.9.0[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String diff --git a/docusaurus/String/arrayToString.md b/docusaurus/String/arrayToString.md deleted file mode 100644 index 2fb1a114..00000000 --- a/docusaurus/String/arrayToString.md +++ /dev/null @@ -1,5 +0,0 @@ -## arrayToStringConvert an array to a string and combine on the delimiter passed.### Parameters* `array` **AnyArray** array to convert to string -* `delimiter` **[String][1]** characater to use in combining to string### Examples```javascript -arrayToString(['The', 'quick', 'brown'], '-'); -// => 'The-brown-fox' -```Returns **[String][1]** Returns a string from the array.**Meta*** **version**: 1.0.0[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String diff --git a/docusaurus/String/slugify.md b/docusaurus/String/slugify.md deleted file mode 100644 index 6c9419f8..00000000 --- a/docusaurus/String/slugify.md +++ /dev/null @@ -1,10 +0,0 @@ -## slugifyConverts a string into a slug for URL usage.### Parameters* `string` **[String][1]** string to convert to slug### Examples```javascript -slugify('The quick brown fox'); -// => 'the-quick-brown-fox' - -slugify('A. more-Complicated string!..'); -// => 'a-more-complicated-string' - -slugify('wïth speciäl chærs'); -// => 'with-special-chars' -```Returns **[String][1]** Returns slug version of the string.**Meta*** **version**: 2.1.0[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String diff --git a/docusaurus/String/toSentenceCase.md b/docusaurus/String/toSentenceCase.md deleted file mode 100644 index fb946a02..00000000 --- a/docusaurus/String/toSentenceCase.md +++ /dev/null @@ -1,4 +0,0 @@ -## toSentenceCaseConverts a string to Sentence case.### Parameters* `string` **[String][1]** string to convert to Sentence case### Examples```javascript -toSentenceCase('THE QUICK BROWN FOX'); -// => 'The quick brown fox' -```Returns **[String][1]** Returns a Sentence case string.**Meta*** **version**: 1.0.0[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String diff --git a/docusaurus/String/toTitleCase.md b/docusaurus/String/toTitleCase.md deleted file mode 100644 index c4761368..00000000 --- a/docusaurus/String/toTitleCase.md +++ /dev/null @@ -1,4 +0,0 @@ -## toTitleCaseConverts a string to a Title Case.### Parameters* `string` **[String][1]** string to convert to Title Case### Examples```javascript -toTitleCase('the quick brown fox'); -// => 'The Quick Brown Fox' -```Returns **[String][1]** Returns a Tile Case string.**Meta*** **version**: 1.0.0[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String diff --git a/package.json b/package.json index cdb7adf3..b58c98e6 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "LICENSE" ], "scripts": { + "dev": "pnpm docusaurus:start", "build": "rm -rf dist/; npm run generate-index; tsup", "format:check": "eslint ./src", "format:fix": "eslint ./src --fix", @@ -49,12 +50,12 @@ "generate-index": "node scripts/generate-index.mjs" }, "dependencies": { - "@docusaurus/plugin-google-gtag": "3.9.2", "lz-string": "1.5.0" }, "devDependencies": { "@docusaurus/core": "3.10.1", "@docusaurus/module-type-aliases": "3.10.1", + "@docusaurus/plugin-google-gtag": "3.9.2", "@docusaurus/preset-classic": "3.10.1", "@docusaurus/tsconfig": "3.10.1", "@docusaurus/types": "3.10.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 34714aff..77f2969d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,9 +8,6 @@ importers: .: dependencies: - '@docusaurus/plugin-google-gtag': - specifier: 3.9.2 - version: 3.9.2(@mdx-js/react@3.1.1(@types/react@19.2.14)(react@19.2.5))(esbuild@0.24.2)(postcss@8.5.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(typescript@6.0.2) lz-string: specifier: 1.5.0 version: 1.5.0 @@ -21,6 +18,9 @@ importers: '@docusaurus/module-type-aliases': specifier: 3.10.1 version: 3.10.1(esbuild@0.24.2)(postcss@8.5.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@docusaurus/plugin-google-gtag': + specifier: 3.9.2 + version: 3.9.2(@mdx-js/react@3.1.1(@types/react@19.2.14)(react@19.2.5))(esbuild@0.24.2)(postcss@8.5.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(typescript@6.0.2) '@docusaurus/preset-classic': specifier: 3.10.1 version: 3.10.1(@algolia/client-search@5.52.1)(@mdx-js/react@3.1.1(@types/react@19.2.14)(react@19.2.5))(@types/react@19.2.14)(esbuild@0.24.2)(postcss@8.5.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(search-insights@2.17.3)(typescript@6.0.2) diff --git a/scripts/documentation.js b/scripts/documentation.js deleted file mode 100644 index 549bcfc8..00000000 --- a/scripts/documentation.js +++ /dev/null @@ -1,146 +0,0 @@ -const fs = require('fs'); -const COLORS = require('./colors'); - -console.info( - `\n${COLORS.BgBlue}${COLORS.FgWhite}START documentation generation${COLORS.end}` -); -console.info( - `${COLORS.FgGreen}source.json file has been generated${COLORS.end}\n` -); -console.info(`${COLORS.FgYellow}START clean up of source.json${COLORS.end}`); - -// assuming only that the description is just plain text -function getDesc(descArr) { - let descString = ''; - descArr.forEach((desc) => { - descString += desc.value; - }); - return descString; -} - -// get param details -function getParamType(param) { - switch (param.type.type) { - case 'OptionalType': - return param.type.expression.name; - case 'AllLiteral': - return '*'; - default: - return param.type.name; - } -} - -// only get needed args data -function getArgs(params) { - const returnArgs = []; - params.forEach((val) => { - returnArgs.push({ - description: val.description, - param: val.name, - type: getParamType(val), - optional: val.type.type === 'OptionalType', - }); - }); - return returnArgs; -} - -// append params to util name -function appendParamsToName(name, params) { - let appendedName = `${name}(`; - params.forEach((val, i, arr) => { - appendedName += val.optional ? `[${val.param}]` : val.param; - // add comma if not yet last index - if (i !== arr.length - 1) { - appendedName += ', '; - } - }); - appendedName += ')'; - return appendedName; -} - -// iterate through the generated source.json file -// get only the needed data for documentation -// store it to mapped_source.json file -const utils = {}; -fs.readFile('docs/source.json', 'utf8', (err, data) => { - const methods = JSON.parse(data); - methods.forEach((val) => { - const MODULE_NAME_IDX = 1; - // create a module entry if it doesnt exist yet - const moduleName = val.tags[MODULE_NAME_IDX].name; - if (!(moduleName in utils)) { - utils[moduleName] = []; - } - const utilObj = { - description: getDesc(val.description.children[0].children), - args: [], - }; - val.tags.forEach((tag) => { - switch (tag.title) { - case 'module': - utilObj.module = tag.name; - break; - case 'name': - utilObj.method = tag.name; - break; - case 'param': - // for params that has multiple types - if ( - tag.type.type === 'UnionType' && - Array.isArray(tag.type.elements) - ) { - const types = []; - tag.type.elements.forEach((type) => types.push(type.name)); - const modifiedTag = { - ...tag, - type: { - type: 'NameExpression', - name: types.join(' | '), - }, - }; - - utilObj.args.push(modifiedTag); - } else { - utilObj.args.push(tag); - } - break; - case 'returns': - utilObj.returns = { - desc: tag.description, - type: tag.type.name, - }; - break; - case 'example': - utilObj.example = tag.description; - break; - } - }); - utilObj.args = getArgs(utilObj.args); - utilObj.utilArgs = appendParamsToName(utilObj.method, utilObj.args); - const lineStart = val.context.loc.start.line; - const lineEnd = val.context.loc.end.line; - const file = val.context.file.split('/common-utils-pkg/')[1]; - const sourceUrl = `https://github.com/iamdevlinph/common-utils-pkg/blob/main/${file}#L${lineStart}-L${lineEnd}`; - utilObj.sourceUrl = sourceUrl; - - utils[moduleName].push(utilObj); - }); - fs.writeFile( - 'docs/mapped_source.json', - JSON.stringify(utils, null, 2), - (writeError) => { - if (writeError) { - console.info( - `${COLORS.FgRed}ERROR mapped_source.json not generated${COLORS.end}` - ); - } else { - console.info( - `${COLORS.FgGreen}generated mapped_source.json${COLORS.end}` - ); - } - console.info( - `${COLORS.BgBlue}${COLORS.FgWhite}END documentation generation${COLORS.end}` - ); - } - ); -}); diff --git a/scripts/makeIndexJs.js b/scripts/makeIndexJs.js deleted file mode 100644 index da50177a..00000000 --- a/scripts/makeIndexJs.js +++ /dev/null @@ -1,58 +0,0 @@ -const fs = require('fs'); -const path = require('path'); -const COLORS = require('./colors'); - -console.info(`\n${COLORS.FgGreen}Generate new index.js file${COLORS.end}`); -const srcPath = path.join(__dirname, '/../src'); -const srcIndexFile = `${srcPath}/index.js`; - -function createIndexFile(methods) { - console.info(`${COLORS.FgGreen}Creating src/index.js${COLORS.end}`); - methods.forEach((method) => { - const code = `export { default as ${method} } from './${method}/${method}';\n`; - fs.appendFileSync(srcIndexFile, code, (indexWriteErr) => { - if (indexWriteErr) { - console.info(`${COLORS.FgRed}ERROR cannot append ${method} to src/index.js${COLORS.end}`); - } - }); - }); - console.info(`${COLORS.FgGreen}SUCCESS src/index.js created${COLORS.end}`); -} - -console.info(`${COLORS.FgGreen}Reading methods${COLORS.end}`); -fs.readdir(srcPath, (err, files) => { - const methods = []; - if (err) { - console.info(`${COLORS.FgRed}ERROR cannot read directory${COLORS.end}`); - } - - // only get folders - files.forEach((file) => { - const filesToIgnore = [ - 'index.d.ts', - 'index.js', - 'expects' - ]; - if (!filesToIgnore.includes(file)) { - methods.push(file); - } - }); - - // remove src/index.js - try { - if (fs.existsSync(srcIndexFile)) { - fs.unlink(srcIndexFile, (unlinkErr) => { - if (unlinkErr) { - console.info(`${COLORS.FgRed}ERROR cannot delete src/index.js${COLORS.end}`); - } - console.info(`${COLORS.FgGreen}Deleted src/index.js${COLORS.end}`); - createIndexFile(methods); - }); - } else { - console.info(`${COLORS.FgGreen}src/index.js does not exist${COLORS.end}`); - createIndexFile(methods); - } - } catch (cannotCheckIndexFile) { - console.info(`${COLORS.FgRed}ERROR cannot check if src/index.js exists${COLORS.end}`); - } -}); diff --git a/scripts/makeTypings.js b/scripts/makeTypings.js deleted file mode 100644 index c2c9e174..00000000 --- a/scripts/makeTypings.js +++ /dev/null @@ -1,120 +0,0 @@ -const fs = require('fs'); -const path = require('path'); -const COLORS = require('./colors'); - -console.info(`\n${COLORS.FgGreen}Generate new index.d.ts file${COLORS.end}`); -const srcPath = path.join(__dirname, '/../src'); -const typeDefFile = `${srcPath}/index.d.ts`; - -function getDataType(tag) { - let newType; - if (tag.title === 'returns') { - newType = tag.type.name.toLowerCase(); - } - - if (tag.title === 'param') { - let type; - if (tag.type.type === 'OptionalType') { - type = 'optional'; - } - if (tag.type.type === 'AllLiteral') { - type = 'all'; - } - switch (type) { - case 'optional': - newType = tag.type.expression.name.toLowerCase(); - break; - case 'all': - newType = 'any'; - break; - default: - newType = tag.type.name.toLowerCase(); - } - } - - switch (newType) { - case 'anyarray': - newType = 'any[]'; - break; - case 'stringarray': - newType = 'string[]'; - break; - } - - return newType; -} - -function removeLastComma(string) { - const lastCommaIdx = string.lastIndexOf(', '); - if (lastCommaIdx === -1) { - return string; - } - return string.slice(0, lastCommaIdx); -} - -function createIndexFile(methods) { - console.info(`${COLORS.FgGreen}Creating src/index.d.ts${COLORS.end}`); - methods.forEach((method) => { - let exportString = 'export function'; - let paramLen = 0; - let hasReturn = false; - method.tags.forEach((tag) => { - switch (tag.title) { - case 'name': - exportString = `${exportString} ${tag.name}(`; - break; - case 'param': { - const optional = tag.type.type === 'OptionalType'; - const questionMark = optional ? '?' : ''; - exportString = `${exportString}${tag.name}${questionMark}: ${getDataType(tag)}, `; - paramLen += 1; - break; - } - case 'returns': { - if (paramLen > 0) { - exportString = removeLastComma(exportString); - } - exportString = `${exportString}): ${getDataType(tag)};`; - hasReturn = true; - break; - } - } - }); - if (!hasReturn) { - exportString = removeLastComma(exportString); - exportString = `${exportString}): void;`; - } - fs.appendFileSync(typeDefFile, `${exportString}\n\n`, (appendError) => { - if (appendError) { - console.info(`${COLORS.FgRed}ERROR cannot append ${method.tags[0].name} to src/index.d.ts${COLORS.end}`); - } - }); - }); - console.info(`${COLORS.FgGreen}SUCCESS src/index.d.ts created${COLORS.end}`); -} - -console.info(`${COLORS.FgGreen}Reading methods${COLORS.end}`); -fs.readFile('docs/source.json', 'utf8', (err, data) => { - if (err) { - console.info(`${COLORS.FgRed}ERROR cannot read docs/source.json${COLORS.end}`); - } - const methods = JSON.parse(data); - - // remove src/index.d.ts - try { - if (fs.existsSync(typeDefFile)) { - fs.unlink(typeDefFile, (unlinkErr) => { - if (unlinkErr) { - console.info(`${COLORS.FgRed}ERROR cannot delete src/index.d.ts${COLORS.end}`); - } - console.info(`${COLORS.FgGreen}Deleted src/index.d.ts${COLORS.end}`); - createIndexFile(methods); - }); - } else { - console.info(`${COLORS.FgGreen}src/index.d.ts does not exist${COLORS.end}`); - createIndexFile(methods); - } - } catch (cannotCheckIndexFile) { - console.info(`${COLORS.FgRed}ERROR cannot check if src/index.d.ts exists${COLORS.end}`); - } -}); diff --git a/src-docusaurus/components/HomepageFeatures/index.tsx b/src-docusaurus/components/HomepageFeatures/index.tsx deleted file mode 100644 index 50a9e6f4..00000000 --- a/src-docusaurus/components/HomepageFeatures/index.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import clsx from 'clsx'; -import Heading from '@theme/Heading'; -import styles from './styles.module.css'; - -type FeatureItem = { - title: string; - Svg: React.ComponentType>; - description: JSX.Element; -}; - -const FeatureList: FeatureItem[] = [ - { - title: 'Easy to Use', - Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, - description: ( - <> - Docusaurus was designed from the ground up to be easily installed and - used to get your website up and running quickly. - - ), - }, - { - title: 'Focus on What Matters', - Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, - description: ( - <> - Docusaurus lets you focus on your docs, and we'll do the chores. Go - ahead and move your docs into the docs directory. - - ), - }, - { - title: 'Powered by React', - Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, - description: ( - <> - Extend or customize your website layout by reusing React. Docusaurus can - be extended while reusing the same header and footer. - - ), - }, -]; - -function Feature({title, Svg, description}: FeatureItem) { - return ( -
    -
    - -
    -
    - {title} -

    {description}

    -
    -
    - ); -} - -export default function HomepageFeatures(): JSX.Element { - return ( -
    -
    -
    - {FeatureList.map((props, idx) => ( - - ))} -
    -
    -
    - ); -} diff --git a/src-docusaurus/components/HomepageFeatures/styles.module.css b/src-docusaurus/components/HomepageFeatures/styles.module.css deleted file mode 100644 index b248eb2e..00000000 --- a/src-docusaurus/components/HomepageFeatures/styles.module.css +++ /dev/null @@ -1,11 +0,0 @@ -.features { - display: flex; - align-items: center; - padding: 2rem 0; - width: 100%; -} - -.featureSvg { - height: 200px; - width: 200px; -} diff --git a/src-docusaurus/pages/index.module.css b/src-docusaurus/pages/index.module.css deleted file mode 100644 index 9f71a5da..00000000 --- a/src-docusaurus/pages/index.module.css +++ /dev/null @@ -1,23 +0,0 @@ -/** - * CSS files with the .module.css suffix will be treated as CSS modules - * and scoped locally. - */ - -.heroBanner { - padding: 4rem 0; - text-align: center; - position: relative; - overflow: hidden; -} - -@media screen and (max-width: 996px) { - .heroBanner { - padding: 2rem; - } -} - -.buttons { - display: flex; - align-items: center; - justify-content: center; -} diff --git a/src-docusaurus/pages/index.tsx b/src-docusaurus/pages/index.tsx deleted file mode 100644 index 400a3e19..00000000 --- a/src-docusaurus/pages/index.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import clsx from 'clsx'; -import Link from '@docusaurus/Link'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import Layout from '@theme/Layout'; -import HomepageFeatures from '@site/src/components/HomepageFeatures'; -import Heading from '@theme/Heading'; - -import styles from './index.module.css'; - -function HomepageHeader() { - const {siteConfig} = useDocusaurusContext(); - return ( -
    -
    - - {siteConfig.title} - -

    {siteConfig.tagline}

    -
    - - Docusaurus Tutorial - 5min ⏱️ - -
    -
    -
    - ); -} - -export default function Home(): JSX.Element { - const {siteConfig} = useDocusaurusContext(); - return ( - - -
    - -
    -
    - ); -} diff --git a/src-docusaurus/pages/markdown-page.md b/src-docusaurus/pages/markdown-page.md deleted file mode 100644 index 9756c5b6..00000000 --- a/src-docusaurus/pages/markdown-page.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Markdown page example ---- - -# Markdown page example - -You don't need React to write simple standalone pages. diff --git a/tsup.config.ts b/tsup.config.ts index 25a69af7..b0857b5e 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -2,14 +2,14 @@ import { defineConfig } from 'tsup'; export default defineConfig({ entry: ['src/index.ts'], - format: ['cjs', 'esm'], // Build for commonJS and ESmodules + format: ['esm'], // Build for commonJS and ESmodules // dts: true, // Generate declaration file (.d.ts) dts: { compilerOptions: { ignoreDeprecations: '6.0', }, }, - splitting: false, - sourcemap: true, + // splitting: false, + // sourcemap: true, clean: true, });