diff --git a/CHANGELOG.md b/CHANGELOG.md index 106e0565..3486d5f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# v0.11.0 Mar 17th, 2024 + +## Changelog + +- #252 [Bug] TypeError: Illegal invocation when calling setTimeout +- #246 [Bug] Package sizes are too large +- #241 Remove removed function link from readme +- #244 Fix CreateIteratorContext `n` documentation + # v0.10.5 Feb 6th, 2024 Minification and minor performance improvements, adds `createcacheValue`, `safe` implementations. diff --git a/README.md b/README.md index ff0c9057..72fcebe8 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ Install the npm packare: `npm install @nevware21/ts-utils --save` > It is suggested / recommended that you use the following definition in your `package.json` so that you are compatible with any future releases as they become available > we do not intend to make ANY known breaking changes moving forward until v2.x > ```json -> "@nevware21/ts-utils": ">= 0.10.5 < 2.x" +> "@nevware21/ts-utils": ">= 0.11.0 < 2.x" > ``` And then just import the helpers and use them. diff --git a/docs/typedoc/assets/icons.js b/docs/typedoc/assets/icons.js new file mode 100644 index 00000000..b79c9e89 --- /dev/null +++ b/docs/typedoc/assets/icons.js @@ -0,0 +1,15 @@ +(function(svg) { + svg.innerHTML = ``; + svg.style.display = 'none'; + if (location.protocol === 'file:') { + if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', updateUseElements); + else updateUseElements() + function updateUseElements() { + document.querySelectorAll('use').forEach(el => { + if (el.getAttribute('href').includes('#icon-')) { + el.setAttribute('href', el.getAttribute('href').replace(/.*#/, '#')); + } + }); + } + } +})(document.body.appendChild(document.createElementNS('http://www.w3.org/2000/svg', 'svg'))) \ No newline at end of file diff --git a/docs/typedoc/assets/icons.svg b/docs/typedoc/assets/icons.svg new file mode 100644 index 00000000..7dead611 --- /dev/null +++ b/docs/typedoc/assets/icons.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/typedoc/assets/main.js b/docs/typedoc/assets/main.js index 3092fea0..1daeb690 100644 --- a/docs/typedoc/assets/main.js +++ b/docs/typedoc/assets/main.js @@ -1,8 +1,8 @@ "use strict"; -"use strict";(()=>{var Ie=Object.create;var ne=Object.defineProperty;var Pe=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var Me=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Fe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oe(e))!Re.call(t,i)&&i!==n&&ne(t,i,{get:()=>e[i],enumerable:!(r=Pe(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Ie(_e(t)):{},Fe(e||!t||!t.__esModule?ne(n,"default",{value:t,enumerable:!0}):n,t));var ae=Me((se,oe)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. -`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),v=s.str.charAt(1),f;v in s.node.edges?f=s.node.edges[v]:(f=new t.TokenSet,s.node.edges[v]=f),s.str.length==1&&(f.final=!0),i.push({node:f,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof se=="object"?oe.exports=n():e.lunr=n()}(this,function(){return t})})()});var re=[];function G(t,e){re.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureActivePageVisible(),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible())}createComponents(e){re.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r}}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(n&&n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let r=document.createElement("p");r.classList.add("warning"),r.textContent="This member is normally hidden due to your filter settings.",n.prepend(r)}}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent="Copied!",e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var de=De(ae());async function le(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=de.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function he(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{le(e,t)}),le(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");let s=!1;i.addEventListener("mousedown",()=>s=!0),i.addEventListener("mouseup",()=>{s=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{s||(s=!1,t.classList.remove("has-focus"))}),Ae(t,i,r,e)}function Ae(t,e,n,r){n.addEventListener("input",ie(()=>{Ne(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ve(e,n):s.key=="Escape"?n.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),n.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!n.matches(":focus")&&s.key==="/"&&(n.focus(),s.preventDefault())})}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=ce(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` - ${ce(l.parent,i)}.${d}`);let v=document.createElement("li");v.classList.value=l.classes??"";let f=document.createElement("a");f.href=r.base+l.url,f.innerHTML=u+d,v.append(f),e.appendChild(v)}}function ue(t,e){let n=t.querySelector(".current");if(!n)n=t.querySelector(e==1?"li:first-child":"li:last-child"),n&&n.classList.add("current");else{let r=n;if(e===1)do r=r.nextElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);else do r=r.previousElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);r&&(n.classList.remove("current"),r.classList.add("current"))}}function Ve(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),e.blur()}}function ce(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(K(t.substring(s))),i.join("")}var He={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>He[e])}var C=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",pe="mousemove",H="mouseup",J={x:0,y:0},fe=!1,ee=!1,Be=!1,D=!1,me=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(me?"is-mobile":"not-mobile");me&&"ontouchstart"in document.documentElement&&(Be=!0,F="touchstart",pe="touchmove",H="touchend");document.addEventListener(F,t=>{ee=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(pe,t=>{if(ee&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(H,()=>{ee=!1});document.addEventListener("click",t=>{fe&&(t.preventDefault(),t.stopImmediatePropagation(),fe=!1)});var X=class extends C{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(H,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(H,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var ve=document.head.appendChild(document.createElement("style"));ve.dataset.for="filters";var Y=class extends C{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ve.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } -`,this.updateIndexHeadingVisibility()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.updateIndexHeadingVisibility()}updateIndexHeadingVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}};var Z=class extends C{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ge(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ye(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ye(t.value)})}function ye(t){document.documentElement.dataset.theme=t}var Le;function be(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",xe),xe())}async function xe(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();Le=t.dataset.base+"/",t.innerHTML="";for(let s of i)we(s,t,[]);window.app.createComponents(t),window.app.ensureActivePageVisible()}function we(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-index-accordion`:"tsd-index-accordion",s.dataset.key=i.join("$");let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.innerHTML='',Ee(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)we(u,l,i)}else Ee(t,r,t.class)}function Ee(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=Le+t.path,n&&(r.className=n),location.href===r.href&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Se=document.getElementById("tsd-theme");Se&&ge(Se);var je=new U;Object.defineProperty(window,"app",{value:je});he();be();})(); +"use strict";(()=>{var Ce=Object.create;var ne=Object.defineProperty;var Pe=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var Me=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Fe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oe(e))!Re.call(t,i)&&i!==n&&ne(t,i,{get:()=>e[i],enumerable:!(r=Pe(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Ce(_e(t)):{},Fe(e||!t||!t.__esModule?ne(n,"default",{value:t,enumerable:!0}):n,t));var ae=Me((se,oe)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. +`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),y=s.str.charAt(1),p;y in s.node.edges?p=s.node.edges[y]:(p=new t.TokenSet,s.node.edges[y]=p),s.str.length==1&&(p.final=!0),i.push({node:p,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof se=="object"?oe.exports=n():e.lunr=n()}(this,function(){return t})})()});var re=[];function G(t,e){re.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible()),document.body.style.display||(this.scrollToHash(),this.updateIndexVisibility())}createComponents(e){re.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}showPage(){document.body.style.display&&(document.body.style.removeProperty("display"),this.scrollToHash(),this.updateIndexVisibility())}scrollToHash(){if(location.hash){let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e&&!e.checkVisibility()){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(n&&n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let r=document.createElement("p");r.classList.add("warning"),r.textContent="This member is normally hidden due to your filter settings.",n.prepend(r)}}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent="Copied!",e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var de=De(ae());async function le(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=de.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function he(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{le(e,t)}),le(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");let s=!1;i.addEventListener("mousedown",()=>s=!0),i.addEventListener("mouseup",()=>{s=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{s||(s=!1,t.classList.remove("has-focus"))}),Ae(t,i,r,e)}function Ae(t,e,n,r){n.addEventListener("input",ie(()=>{Ne(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ve(e,n):s.key=="Escape"?n.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),n.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!n.matches(":focus")&&s.key==="/"&&(n.focus(),s.preventDefault())})}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=ce(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` + ${ce(l.parent,i)}.${d}`);let y=document.createElement("li");y.classList.value=l.classes??"";let p=document.createElement("a");p.href=r.base+l.url,p.innerHTML=u+d,y.append(p),e.appendChild(y)}}function ue(t,e){let n=t.querySelector(".current");if(!n)n=t.querySelector(e==1?"li:first-child":"li:last-child"),n&&n.classList.add("current");else{let r=n;if(e===1)do r=r.nextElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);else do r=r.previousElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);r&&(n.classList.remove("current"),r.classList.add("current"))}}function Ve(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),e.blur()}}function ce(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(K(t.substring(s))),i.join("")}var He={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>He[e])}var I=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",fe="mousemove",H="mouseup",J={x:0,y:0},pe=!1,ee=!1,Be=!1,D=!1,me=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(me?"is-mobile":"not-mobile");me&&"ontouchstart"in document.documentElement&&(Be=!0,F="touchstart",fe="touchmove",H="touchend");document.addEventListener(F,t=>{ee=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(fe,t=>{if(ee&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(H,()=>{ee=!1});document.addEventListener("click",t=>{pe&&(t.preventDefault(),t.stopImmediatePropagation(),pe=!1)});var X=class extends I{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(H,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(H,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var ye=document.head.appendChild(document.createElement("style"));ye.dataset.for="filters";var Y=class extends I{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ye.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`,this.app.updateIndexVisibility()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}};var Z=class extends I{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ge(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ve(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ve(t.value)})}function ve(t){document.documentElement.dataset.theme=t}var Le;function be(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",xe),xe())}async function xe(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();Le=t.dataset.base+"/",t.innerHTML="";for(let s of i)we(s,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function we(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-index-accordion`:"tsd-index-accordion",s.dataset.key=i.join("$");let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.innerHTML='',Ee(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)we(u,l,i)}else Ee(t,r,t.class)}function Ee(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=Le+t.path,n&&(r.className=n),location.pathname===r.pathname&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Se=document.getElementById("tsd-theme");Se&&ge(Se);var je=new U;Object.defineProperty(window,"app",{value:je});he();be();})(); /*! Bundled license information: lunr/lunr.js: diff --git a/docs/typedoc/assets/navigation.js b/docs/typedoc/assets/navigation.js index c564653b..a77df5b1 100644 --- a/docs/typedoc/assets/navigation.js +++ b/docs/typedoc/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAACp2bXXPbuBWG/4uuM02b6W7bvbNlOdEmsT2WU190egGRkIQ1CXIAMLay0/9egOIHSJ4P7N4let/zSATxcQ4A/+f3lZNvbvXL6sqYW1OVX0V9q1fvVrVwJ/+pO9fSvo+1v5xcWXjDi9L56pcPf/3XP/7204f/vYs53rcWRbEX2QvImugJvAcjc5UJJ0kq4Ppz7A9p8A8J9EeZNxn9s+cWjroupDBPqpRV4+6/S2NULpdg2MWyjfSPuHXSCFeZdaXbzwe08v83B5EFPuSc4X/6OUY31lXlxpjWbZ1pMh8Is0ErBd/oplwXdt4I3cfcUwfbnSil75YQoZNSKE8+CKF0Ugrl36JoMEyvcZyP0n2R+uhO27IuwFaeOKjG3a5FdpJ5+80gKTaQoC/ix5nADDIJud//diNlva7q8yeh80KaG+mEit9+DEXt5JfsxEE+StcYDVNHncSEAWi6r4VBsYNCLR9j3juWDq6PtBEHpeWDqeobaTOjamxMIl72Jy9DgI6NO7lH8AFv59tGZ05V2jPm5LnO8cb3GsbrnDZVORY7R//h6Xke4J9rMedBHpbrI4Mxz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ZDQyoekWGaafR4Q8iR1KVQWQBaIISyTTkUdZSYIiLyADU8YTGB40OR/8kodeYcC1eJPEuB53BYGlsrzHhoZ2piWk0MCA0NbcJafngQTYkYp3BEJm9TcrqLZ7RWzabt2Qmb1Oy+M5EzBS9zEOoLj7oPIYarCmVhLd9q2t0ymk1KpwqQmxCAWKZ4sOmFR7uZKpX9NLOqHKI9gI/zRktHCycAdOswcGhvmnb1HVlHHxaPPcQuAYtzxq4NPvv/wEFxd3vakIAAA==" \ No newline at end of file +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAACp2b2XLjuBWG30XXXemkKzNJ+s6L7Pa4vZTlji9SuYDIIwltEmABYNvqqbx7ChRJgdRZMHPn8v+fjyTWg0X/+X0R4D0sPi/OnLtytr5TzZVZfFg0KuwWnxdh34D/mGp/2YW6WnxYvGpTLj5/+uu//vG3Xz7970PKuVPNhaqqtSpeUdZEz+A9Oih1oQKwVMT159if8uCfMuhPULYF/9pzi0S9qEC5Z12DbcPDD3BOl3AKxl0i24EKcBPAqWDdhTXd/0e0NgHcRhWRjzln+F9+TdGtD7ZeOte5fXBtEazD2aiVgy9NW19Ufl4I/b+lr462e1XDnWowQi/lUJ73DUXppRzKv1XVUphBkzjXEL6C2YbdTd1UaClPHFzh3lyoYgdl92SUlBpY0Ff1c89gRpmFPKy/XwI0F7bZf1GmrMBdQlA6rf0UStrZh6zUBp4gtM7g1KPOYmIHdP1jcVDq4FCnnzFvHacOqY10ERtt4NHZ5hJ84XRD9UnCK77yaQjSsGmn9AmPzr7vr1pTBG3NJWzm5Lku8Y71GvvrnDZVJZY4Rv/h4Xke0JriZMzDPCJ333TGONKdAlNRIr1AVd0a+2ZW+3pt0z4Jpq39x7k+5f0zISnnzpoGTHlEbPp69B9HcRr/69+ngDgtKW08gRhkHrL8AW5PEDqND7/SVUg76yT+IEoAsgyiJAffmBLeGUKny5ivygeGEuU8iPQ+o0fAWbdUxY4CHVQB4WxNxTtb88E3pqjaEqjGNcgSpIT3h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sngHzrNEhob4Z3zaNdQE/LZ57GFxLLs9afGn23/8DBcXd72pCAAA=" \ No newline at end of file diff --git a/docs/typedoc/assets/search.js b/docs/typedoc/assets/search.js index ff6e34cf..08bdd4b4 100644 --- a/docs/typedoc/assets/search.js +++ b/docs/typedoc/assets/search.js @@ -1 +1 @@ -window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAACsVdXZPbNrL9L+NXx1G3vvPm+GPj3WySip3NQyq1xZE4M4wlUUVSHk9S+e8XAEmpu9UNETO+tS+b9TT6AOwDNIADkPrrqirv66tvfvvr6mOxW199M5s8v9pl2/zqm6usql7u97n76/OrQ7Vxf7k57FZNUe7qr4+2F3fNduMKrDZZXecO6erq7+c9GI6Wc5jiEfFlVf1U5etilTX5q2yzuc5WH9/ujvDNwz6vv9YLReuZTafj2bGW//7XAw1HfXZ0IODPr/ZZle8au9Wpj4mDWoT/Pw+KT3hSjD/qv7N9jEtm/gIPd4434Kl4G6OP87Yqt6649ihH0xd4DI414BFO7SJVscH65lNePehjNZjirWZQb4tNk1c6VmtLArNSiLckAr3brfPPNlowJ0J+n9WNjeitjwC80M5jkRTosnqTre4M0NaYAuc6lIHlLAlAr8pdkxW7WgfrrQmA73arzWGdG4C9NQnQRfrHGwsvGBPgjuRZkKRAAqwb3TqcM6ROsz/n68MqOsfKEl8gp6mQA1LbWWOtCLUF9SC1toRwv98UFlYwpUCVWwvJWYYC3ezckmqjZfDOMhzoWz3ltobhMJ4SFcYbhsKsqtwtJ97uXuc3eeVWFz9V5WftIdVyaZUEl7cOUUsdsshQaOe2flndapC9KWl0HlvgMdzDinEkzU8dlyrepUF51sZTlTDCU2xkXolV9mI3uLoXXfOMWrM6pdpQ+ovUW+1T6g2lH1uv7DQfnNk7/OD+KZ+e2Yb26qL2bqU2gfWm4VC/uLnuptjlWs4h1uGAPxw2mx+rOKwoMxz8dQT0dSrY+6YqdrcqVmsaDtV3CBWsNw6H+/H6j3ylLWx703AoN0dnWsruLAmhdxlYj7szpHSP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Tf9Dv6yrfgRuwdv0iCULdTdJWF5tUzbStFb12huUA2tlHsvVBzKd85nw9nGjHzWKfzVnoojdg4EjF9/8ZezDTfWPQn5vu9TAY0BY7NFKhu++h+BM2DZHPLR/dOaN6AEW8Y0ZWseVTf3FU+61XyNScq4Zlb/eAcXi5SEOjCzRyUAcEvwhUAqnqbt/EDwGFXO7pK/8ECtmUlUTPfm7zw7iUdJ+Z5msQ4e1WL6pho7rubUr0OhBP2Pq+VlHvJuMl4iqGX/9C88XW2EaKXtcBcKHo3/7i+JH8xmL45bVV62J1twWmgzMNDx/eq3PsbBDzMtM1o7okVVYQkBfP1o0+sa5Ggtke0z69g1H34AvpPXsC4/4vJ+fndXKolgMkXV9ypNArmHu0+32yINCs2BuyNdbW5vz+/2hf7fONPXb/57fe///4/WhOzkZzhAAA="; \ No newline at end of file +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAACsWdW5PbNtKG/4t8O3HUrbPvHB+y3hzsip3NhSu1RUnQDG2KZJGUx5NU/vtXACmpu9XNIWb81V750EADxAs0gAcg9feoKm7r0bOPf48+p/l29Gw+vRrlyd6Nno2Sqnpeli7fjq5GhyobPRvtDvmmSYu8/v5ke3rT7LPR1WiTJXXt6tGz0eifq6MzHK8WMMOTx+dV9a5y23STNO5FkmXrZPP5dX5y39yVrv5eT9Rbznw2m8xPpfz3v97RcK9PThmI86tRmVQub+xaxz4mDqoR/v88KD7iSbH/UX9Jyj4tmfkbPNylvwFPxevY+zivq2L/S1Jqj3IyfYPH4L4GPMK5XqQoNlhffXHVnT5Wg6m/1szV6zRrXKX7am1RzqwQ4i2Rjt7kW/fV9hbMkS5/TurG9uitD3B4Tz1PSWJcF9WrZHNjOG2NMe6qYm/4qop9hKMXRd4kaV7rzo7WCIdv8k122DrD4dEa5XDrvr7dWf6CMcLdSTzLJUkQ4faXpNTd/ZKUsdPsb2572PTOsTLFN4hpqssBoe2islYLtQn1RmptEc39PkstX8EU46rYW56K/WBHu/x5WWZaBO8swx39oI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0T/NOPddNIRfuEeWhwOXNP2VslZo2bapPsXbZJ+MkS0Dst/rNBdnbtbTp6WxLN61N1U7l8W8sODPSmJppg21w0sfeZrAAdcl+8QoWUGqB5m8Vn7o5c3b7kW12k187QvDpPXNzepI2rSznR0Ldf0NyU1U312a2T9aWAtBrm7be6sd4mQ3rpBM17ut6B2/GuR2/4oj0j+JxN46rLqtOhb4eQpsqKW3GAw96JMhcgdVOVyVYuNmnkQvNSeJv3cp1Jb/yheZpSN1XlSpeIvLTD25NvU1Xp9Y1oa/rA9vzZKK+d0TuOaF7l8Vnz5LO7VIk+sHnF0We/iE305AnN1Z7P6pv5IkAgvVSK5itz+p5ozF7TMyPxMe/Fe3A0QNjLDWM7RVdZaK6pta0Ue7nTfMfK2EaxVzzNt1e6zJfDmbaYea7T5b7soezdSnsRa+3f2NuRk55gcihLGQxoCDRPsPVtH938oHmSbG75JuyFUuuhxUKarmTNmwXNTeWjXiXfwaMIz9zqh8zh9SLFA124mYMyePCLcMUBRf3mK07BwSGvD2VZ+E8WsM0uaTXz/OOety/pODEP1KSPi5e1KMdE8/2YppCvidDLAPPuiwpgLp+aQr1QhPQQFs37Hkfk3CQ8RNF7W2hy54uNFL3xCOZC02fzzeVT8leL6bvXVoMd8ostPG1o8/TxkNebovRXEMTimE7Z5p5aoSokqJiv6H5hwhJJTp+9GB//gqdj76PmZp/5cnG7l7IIMPXixJ6iVTD3eLcuywja5W1H361E/X7fn1ejMi1d5o9tn338859//g/iuOV7NeQAAA=="; \ No newline at end of file diff --git a/docs/typedoc/assets/style.css b/docs/typedoc/assets/style.css index 98a43779..072daed8 100644 --- a/docs/typedoc/assets/style.css +++ b/docs/typedoc/assets/style.css @@ -405,7 +405,8 @@ dd { } body { background: var(--color-background); - font-family: "Segoe UI", sans-serif; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", + Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; color: var(--color-text); } diff --git a/docs/typedoc/enums/WellKnownSymbols.html b/docs/typedoc/enums/WellKnownSymbols.html index dfbe487e..70bf63c0 100644 --- a/docs/typedoc/enums/WellKnownSymbols.html +++ b/docs/typedoc/enums/WellKnownSymbols.html @@ -1,28 +1,28 @@ -WellKnownSymbols | @nevware21/ts-utils

Enumeration WellKnownSymbolsConst

Identifies the Symbol static properties which are symbols themselves as a constant +WellKnownSymbols | @nevware21/ts-utils

Enumeration WellKnownSymbolsConst

Identifies the Symbol static properties which are symbols themselves as a constant enum to aid in minification when fetching them from the global symbol implementation.

See: Well Known Symbols

-

Enumeration Members

asyncIterator: 0

The Symbol.asyncIterator symbol is a builtin symbol that is used to access an +

Enumeration Members

asyncIterator: 0

The Symbol.asyncIterator symbol is a builtin symbol that is used to access an object's @@asyncIterator method. In order for an object to be async iterable, it must have a Symbol.asyncIterator key.

See: Symbol.asyncIterator

-
hasInstance: 1

The Symbol.hasInstance well-known symbol is used to determine if a constructor +

hasInstance: 1

The Symbol.hasInstance well-known symbol is used to determine if a constructor object recognizes an object as its instance. The instanceof operator's behavior can be customized by this symbol.

See: Symbol.hasInstance

-
isConcatSpreadable: 2

The @@isConcatSpreadable symbol (Symbol.isConcatSpreadable) can be defined as an +

isConcatSpreadable: 2

The @@isConcatSpreadable symbol (Symbol.isConcatSpreadable) can be defined as an own or inherited property and its value is a boolean. It can control behavior for arrays and array-like objects:

    @@ -32,51 +32,51 @@ Symbol.isConcatSpreadable can force flattening in these cases.

See: Symbol.isConcatSpreadable

-
iterator: 3

Whenever an object needs to be iterated (such as at the beginning of a for..of loop), +

iterator: 3

Whenever an object needs to be iterated (such as at the beginning of a for..of loop), its @@iterator method is called with no arguments, and the returned iterator is used to obtain the values to be iterated.

See: Symbol.iterator

-
match: 4

This function is also used to identify if objects have the behavior of regular expressions. +

match: 4

This function is also used to identify if objects have the behavior of regular expressions. For example, the methods String.prototype.startsWith(), String.prototype.endsWith() and String.prototype.includes(), check if their first argument is a regular expression and will throw a TypeError if they are. Now, if the match symbol is set to false (or a Falsy value), it indicates that the object is not intended to be used as a regular expression object.

See: Symbol.match

-
matchAll: 5

The Symbol.matchAll well-known symbol returns an iterator, that yields matches of the regular +

matchAll: 5

The Symbol.matchAll well-known symbol returns an iterator, that yields matches of the regular expression against a string. This function is called by the String.prototype.matchAll() method.

See: Symbol.matchAll

-
replace: 6

The Symbol.replace well-known symbol specifies the method that replaces matched substrings +

replace: 6

The Symbol.replace well-known symbol specifies the method that replaces matched substrings of a string. This function is called by the String.prototype.replace() method.

For more information, RegExp.prototype[@@replace]() and String.prototype.replace().

See: Symbol.replace

-
search: 7

The Symbol.search well-known symbol specifies the method that returns the index within a +

search: 7

The Symbol.search well-known symbol specifies the method that returns the index within a string that matches the regular expression. This function is called by the String.prototype.search() method.

For more information, see RegExp.prototype[@@search]() and String.prototype.search().

See: Symbol.species

-
species: 8

The well-known symbol Symbol.species specifies a function-valued property that the constructor +

species: 8

The well-known symbol Symbol.species specifies a function-valued property that the constructor function uses to create derived objects. See: Symbol.species

-
split: 9

The Symbol.split well-known symbol specifies the method that splits a string at the indices +

split: 9

The Symbol.split well-known symbol specifies the method that splits a string at the indices that match a regular expression. This function is called by the String.prototype.split() method.

For more information, see RegExp.prototype[@@split]() and String.prototype.split(). See: Symbol.split

-
toPrimitive: 10

With the help of the Symbol.toPrimitive property (used as a function value), an object can be +

toPrimitive: 10

With the help of the Symbol.toPrimitive property (used as a function value), an object can be converted to a primitive value. The function is called with a string argument hint, which specifies the preferred type of the result primitive value. The hint argument can be one of "number", "string", and "default".

See: Symbol.toPrimitive

-
toStringTag: 11

The Symbol.toStringTag well-known symbol is a string valued property that is used in the +

toStringTag: 11

The Symbol.toStringTag well-known symbol is a string valued property that is used in the creation of the default string description of an object. It is accessed internally by the Object.prototype.toString() method.

See: Symbol.toStringTag

-
unscopables: 12

The Symbol.unscopables well-known symbol is used to specify an object value of whose own +

unscopables: 12

The Symbol.unscopables well-known symbol is used to specify an object value of whose own and inherited property names are excluded from the with environment bindings of the associated object.

See: Symbol.unscopables

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/arrAppend.html b/docs/typedoc/functions/arrAppend.html index 42f50df7..96bc71b9 100644 --- a/docs/typedoc/functions/arrAppend.html +++ b/docs/typedoc/functions/arrAppend.html @@ -1,10 +1,10 @@ -arrAppend | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/arrContains.html b/docs/typedoc/functions/arrContains.html index 7cc621c0..8a06f6d9 100644 --- a/docs/typedoc/functions/arrContains.html +++ b/docs/typedoc/functions/arrContains.html @@ -1,8 +1,8 @@ -arrContains | @nevware21/ts-utils

Function arrContains

  • The arrContains() method determines whether an array contains a certain value among its +arrContains | @nevware21/ts-utils

    Function arrContains

    • The arrContains() method determines whether an array contains a certain value among its entries, returning true or false as appropriate.

      -

      Type Parameters

      • T

      Parameters

      • theArray: ArrayLike<T>

        The array or array like object of elements to be searched.

        -
      • searchElement: T

        The value to search for

        -
      • Optional fromIndex: number

        The optional Zero-based index at which to start searching, converted to an integer.

        +

        Type Parameters

        • T

        Parameters

        • theArray: ArrayLike<T>

          The array or array like object of elements to be searched.

          +
        • searchElement: T

          The value to search for

          +
        • Optional fromIndex: number

          The optional Zero-based index at which to start searching, converted to an integer.

          • Negative index counts back from the end of the array — if fromIndex < 0, fromIndex + array.length is used. However, the array is still searched from front to back in this case.
          • @@ -14,4 +14,4 @@

            Since

            0.8.0

            Example

            arrContains([1, 2, 3], 2);       // true
            arrContains([1, 2, 3], 4); // false
            arrContains([1, 2, 3], 3, 3); // false
            arrContains([1, 2, 3], 3, -1); // true
            arrContains([1, 2, NaN], NaN); // true
            arrContains(["1", "2", "3"], 3 as any); // false

            // Array Like
            arrContains({ length: 3, 0: 1, 1: 2, 2: 3 }, 2); // true
            arrContains({ length: 3, 0: 1, 1: 2, 2: 3 }, 4); // false
            arrContains({ length: 3, 0: 1, 1: 2, 2: 3 }, 3, 3); // false
            arrContains({ length: 3, 0: 1, 1: 2, 2: 3 }, 3, -1); // true
            arrContains({ length: 3, 0: 1, 1: 2, 2: NaN }, NaN); // true
            arrContains({ length: 3, 0: "1", 1: "2", 2: "3" }, 3 as any); // false
            -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/arrEvery.html b/docs/typedoc/functions/arrEvery.html index f1976ef5..2e0d729d 100644 --- a/docs/typedoc/functions/arrEvery.html +++ b/docs/typedoc/functions/arrEvery.html @@ -1,16 +1,16 @@ -arrEvery | @nevware21/ts-utils
  • The arrEvery() method is an iterative method. It calls a provided callbackFn function once for +arrEvery | @nevware21/ts-utils

    • The arrEvery() method is an iterative method. It calls a provided callbackFn function once for each element in an array, until the callbackFn returns a falsy value. If such an element is found, arrEvery() immediately returns false and stops iterating through the array. Otherwise, if callbackFn returns a truthy value for all elements, every() returns true.

      -

      Type Parameters

      • T

        Identifies the base type of array elements

        -
      • E

        Identifies a more specific instance of the base array type

        -

      Parameters

      • theArray: ArrayLike<T>

        The array or array like object of elements to be searched.

        -
      • callbackFn: ArrPredicateCallbackFn<T, E> | ArrPredicateCallbackFn2<T>

        A function that accepts up to three arguments of type ArrPredicateCallbackFn or +

        Type Parameters

        • T

          Identifies the base type of array elements

          +
        • E

          Identifies a more specific instance of the base array type

          +

        Parameters

        • theArray: ArrayLike<T>

          The array or array like object of elements to be searched.

          +
        • callbackFn: ArrPredicateCallbackFn<T, E> | ArrPredicateCallbackFn2<T>

          A function that accepts up to three arguments of type ArrPredicateCallbackFn or ArrPredicateCallbackFn2. The predicate function is called for each element in the thArray until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.

          -
        • Optional thisArg: any

          A value to use as this when executing callbackFn. Defaults to the array if not provided.

          +
        • Optional thisArg: any

          A value to use as this when executing callbackFn. Defaults to the array if not provided.

        Returns theArray is T[]

        true if the callbackFn returns a truthy value for every array elements. Otherwise false.

        Since

        0.8.0

        Example

        function isBigEnough<T>(element: T, index: number, array: T[]) {
        return element >= 10;
        }

        arrEvery([12, 5, 8, 130, 44], isBigEnough); // false
        arrEvery([12, 54, 18, 130, 44], isBigEnough); // true

        const isSubset = <T>(array1: T[], array2: T[]) => arrEvery(array2, (element) => arrIncludes(array1, element));

        isSubset([1, 2, 3, 4, 5, 6, 7], [5, 7, 6]); // true
        isSubset([1, 2, 3, 4, 5, 6, 7], [5, 8, 7]); // false

        arrEvery([1, , 3], (x) => x !== undefined); // true
        arrEvery([2, , 2], (x) => x === 2); // true

        // Array Like combinations
        isSubset([1, 2, 3, 4, 5, 6, 7], { length: 3, 0: 5, 1: 7, 2: 6}); // true
        isSubset([1, 2, 3, 4, 5, 6, 7], { length: 3, 0: 5, 1: 8, 2: 7}); // false

        isSubset({ length: 7, 0: 1, 1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 7 }, [ 5, 7, 6 ]); // true
        isSubset({ length: 7, 0: 1, 1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 7 }, [5, 8, 7]); // false

        isSubset({ length: 7, 0: 1, 1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 7 }, { length: 3, 0: 5, 1: 7, 2: 6}); // true
        isSubset({ length: 7, 0: 1, 1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 7 }, { length: 3, 0: 5, 1: 8, 2: 7}); // false
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/arrFilter.html b/docs/typedoc/functions/arrFilter.html index 598df45d..f0386244 100644 --- a/docs/typedoc/functions/arrFilter.html +++ b/docs/typedoc/functions/arrFilter.html @@ -1,4 +1,4 @@ -arrFilter | @nevware21/ts-utils
  • The arrFilter() method creates a shallow copy of a portion of a given array, filtered down to just the elements +arrFilter | @nevware21/ts-utils

    • The arrFilter() method creates a shallow copy of a portion of a given array, filtered down to just the elements from the given array that pass the test implemented by the provided function.

      The filter() method is an iterative method. It calls a provided callbackFn function once for each element in an array, and constructs a new array of all the values for which callbackFn returns a truthy value. Array elements @@ -16,17 +16,17 @@

    • If an existing, yet-unvisited element of the array is changed by callbackFn, its value passed to the callbackFn will be the value at the time that element gets visited. Deleted elements are not visited.
    -

    Type Parameters

    • T

      Identifies the base type of the elements.

      -
    • E

      Identifies a more specific instance of the base array type.

      -

    Parameters

    • theArray: ArrayLike<T>

      The array or array like object of elements to be searched.

      -
    • callbackFn: ArrPredicateCallbackFn<T, E> | ArrPredicateCallbackFn2<T>

      A function that accepts up to three arguments of type ArrPredicateCallbackFn or +

      Type Parameters

      • T

        Identifies the base type of the elements.

        +
      • E

        Identifies a more specific instance of the base array type.

        +

      Parameters

      • theArray: ArrayLike<T>

        The array or array like object of elements to be searched.

        +
      • callbackFn: ArrPredicateCallbackFn<T, E> | ArrPredicateCallbackFn2<T>

        A function that accepts up to three arguments of type ArrPredicateCallbackFn or ArrPredicateCallbackFn2. The predicate function is called for each element in the thArray until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.

        -
      • Optional thisArg: any

        A value to use as this when executing callbackFn. Defaults to the array if not provided.

        +
      • Optional thisArg: any

        A value to use as this when executing callbackFn. Defaults to the array if not provided.

      Returns T[] | E[]

      A shallow copy of a portion of the given array, filtered down to just the elements from the given array that pass the test implemented by the provided function. If no elements pass the test, an empty array will be returned.

      Since

      0.8.0

      Example

      function isBigEnough<T>(value: T) {
      return value >= 10;
      }

      const filtered = arrFilter([12, 5, 8, 130, 44], isBigEnough);
      // filtered is [12, 130, 44]

      const arrayLikeFiltered = arrFilter({ length: 5, 0: 12, 1: 5, 2: 8, 3: 130, 4: 44}, isBigEnough);
      // arrayLikeFiltered is [12, 130, 44]

      const array = [-3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];

      function isPrime(num) {
      for (let i = 2; num > i; i++) {
      if (num % i === 0) {
      return false;
      }
      }
      return num > 1;
      }

      console.log(arrFilter(array, isPrime)); // [2, 3, 5, 7, 11, 13]
      -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/arrFind.html b/docs/typedoc/functions/arrFind.html index ba5f0d21..a7ddf3eb 100644 --- a/docs/typedoc/functions/arrFind.html +++ b/docs/typedoc/functions/arrFind.html @@ -1,4 +1,4 @@ -arrFind | @nevware21/ts-utils
  • The arrFind() method returns the first element in the provided array that satisfies +arrFind | @nevware21/ts-utils

    • The arrFind() method returns the first element in the provided array that satisfies the provided testing function. If no values satisfy the testing function, undefined is returned.

        @@ -24,16 +24,16 @@ callbackFn will be the value at the time that element gets visited. Deleted elements are visited as if they were undefined.
      -

      Type Parameters

      • T

        Identifies the base type of array elements

        -
      • E

        Identifies a more specific instance of the base array type

        -

      Parameters

      • theArray: ArrayLike<T>

        The array or array like object of elements to be searched.

        -
      • callbackFn: ArrPredicateCallbackFn<T, E> | ArrPredicateCallbackFn2<T>

        A function that accepts up to three arguments of type ArrPredicateCallbackFn or +

        Type Parameters

        • T

          Identifies the base type of array elements

          +
        • E

          Identifies a more specific instance of the base array type

          +

        Parameters

        • theArray: ArrayLike<T>

          The array or array like object of elements to be searched.

          +
        • callbackFn: ArrPredicateCallbackFn<T, E> | ArrPredicateCallbackFn2<T>

          A function that accepts up to three arguments of type ArrPredicateCallbackFn or ArrPredicateCallbackFn2. The predicate function is called for each element in the thArray until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.

          -
        • Optional thisArg: any

          A value to use as this when executing callbackFn. Defaults to the array if not provided.

          +
        • Optional thisArg: any

          A value to use as this when executing callbackFn. Defaults to the array if not provided.

        Returns T | E

        The first element in the array that satisfies the provided testing function. Otherwise, undefined is returned.

        Since

        0.8.0

        Example

        const inventory = [
        { name: "apples", quantity: 2 },
        { name: "bananas", quantity: 0 },
        { name: "cherries", quantity: 5 },
        ];

        function isCherries(fruit) {
        return fruit.name === "cherries";
        }

        console.log(arrFind(inventory, isCherries));
        // { name: 'cherries', quantity: 5 }

        function isPrime(element, index, array) {
        let start = 2;
        while (start <= Math.sqrt(element)) {
        if (element % start++ < 1) {
        return false;
        }
        }
        return element > 1;
        }

        console.log(arrFind([4, 6, 8, 12], isPrime)); // undefined, not found
        console.log(arrFind([4, 5, 8, 12], isPrime)); // 5

        // Array Like
        console.log(arrFind({ length: 4, 0: 4, 1: 6, 2: 8, 3: 12 }, isPrime)); // undefined, not found
        console.log(arrFind({ length: 4:, 0: 4, 1: 5, 2: 8, 3: 12 }, isPrime)); // 5
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/arrFindIndex.html b/docs/typedoc/functions/arrFindIndex.html index 6e620913..eb77dffc 100644 --- a/docs/typedoc/functions/arrFindIndex.html +++ b/docs/typedoc/functions/arrFindIndex.html @@ -1,4 +1,4 @@ -arrFindIndex | @nevware21/ts-utils

Function arrFindIndex

  • The arrFindIndex() method returns the index of the first element in an array that satisfies the provided testing +arrFindIndex | @nevware21/ts-utils

    Function arrFindIndex

    • The arrFindIndex() method returns the index of the first element in an array that satisfies the provided testing function. If no elements satisfy the testing function, -1 is returned.

      The arrFindIndex() is an iterative method. It calls a provided callbackFn function once for each element in an array in ascending-index order, until callbackFn returns a truthy value. arrFindIndex() then returns the index @@ -14,15 +14,15 @@ If an existing, yet-unvisited element of the array is changed by callbackFn, its value passed to the callbackFn will be the value at the time that element gets visited. Deleted elements are visited as if they were undefined.

    -

    Type Parameters

    • T

      Identifies the base type of array elements

      -
    • E

      Identifies a more specific instance of the base array type

      -

    Parameters

    • theArray: ArrayLike<T>

      The array or array like object of elements to be searched.

      -
    • callbackFn: ArrPredicateCallbackFn<T, E> | ArrPredicateCallbackFn2<T>

      A function that accepts up to three arguments of type ArrPredicateCallbackFn or +

      Type Parameters

      • T

        Identifies the base type of array elements

        +
      • E

        Identifies a more specific instance of the base array type

        +

      Parameters

      • theArray: ArrayLike<T>

        The array or array like object of elements to be searched.

        +
      • callbackFn: ArrPredicateCallbackFn<T, E> | ArrPredicateCallbackFn2<T>

        A function that accepts up to three arguments of type ArrPredicateCallbackFn or ArrPredicateCallbackFn2. The predicate function is called for each element in the thArray until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.

        -
      • Optional thisArg: any

        A value to use as this when executing callbackFn. Defaults to the array if not provided.

        +
      • Optional thisArg: any

        A value to use as this when executing callbackFn. Defaults to the array if not provided.

      Returns number

      The index of the first element in the array that passes the test. Otherwise, -1.

      Since

      0.8.0

      Example

      const inventory: Array<{ name: string, quantity: number}> = [
      { name: "apples", quantity: 2 },
      { name: "bananas", quantity: 0 },
      { name: "cherries", quantity: 5 }
      ];

      function isCherries(fruit: { name: string, quantity: number}) {
      return fruit.name === "cherries";
      }

      arrFindIndex(inventory, isCherries); // 2

      function isPrime(element: number) {
      if (element % 2 === 0 || element < 2) {
      return false;
      }

      for (let factor = 3; factor <= Math.sqrt(element); factor += 2) {
      if (element % factor === 0) {
      return false;
      }
      }
      return true;
      }

      arrFindIndex([4, 6, 8, 9, 12], isPrime) // -1
      arrFindIndex([4, 6, 7, 9, 12], isPrime) // 2

      // Array Like
      arrFindIndex({ length: 5, 0: 4, 1: 6, 2: 8, 3: 9, 4: 12 }, isPrime) // -1
      arrFindIndex({ length: 5:, 0: 4, 1: 6, 2: 7, 3: 9, 4: 12 }, isPrime) // 2
      -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/arrFindLast.html b/docs/typedoc/functions/arrFindLast.html index 27af85d8..ce8e8d49 100644 --- a/docs/typedoc/functions/arrFindLast.html +++ b/docs/typedoc/functions/arrFindLast.html @@ -1,4 +1,4 @@ -arrFindLast | @nevware21/ts-utils

Function arrFindLast

  • The arrFindLast() method iterates the array in reverse order and returns the value of the first element that +arrFindLast | @nevware21/ts-utils

    Function arrFindLast

    • The arrFindLast() method iterates the array in reverse order and returns the value of the first element that satisfies the provided testing function. If no elements satisfy the testing function, undefined is returned.

      • If you need the index of the found element in the array, use arrFindLastIndex().
      • @@ -22,16 +22,16 @@
      • If an existing, yet-unvisited element of the array is changed by callbackFn, its value passed to the callbackFn will be the value at the time that element gets visited. Deleted elements are visited as if they were undefined.
      -

      Type Parameters

      • T

        Identifies the base type of array elements

        -
      • E

        Identifies a more specific instance of the base array type

        -

      Parameters

      • theArray: ArrayLike<T>

        The array or array like object of elements to be searched.

        -
      • callbackFn: ArrPredicateCallbackFn<T, E> | ArrPredicateCallbackFn2<T>

        A function that accepts up to three arguments of type ArrPredicateCallbackFn or +

        Type Parameters

        • T

          Identifies the base type of array elements

          +
        • E

          Identifies a more specific instance of the base array type

          +

        Parameters

        • theArray: ArrayLike<T>

          The array or array like object of elements to be searched.

          +
        • callbackFn: ArrPredicateCallbackFn<T, E> | ArrPredicateCallbackFn2<T>

          A function that accepts up to three arguments of type ArrPredicateCallbackFn or ArrPredicateCallbackFn2. The predicate function is called for each element in the thArray until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.

          -
        • Optional thisArg: any

          A value to use as this when executing callbackFn. Defaults to the array if not provided.

          +
        • Optional thisArg: any

          A value to use as this when executing callbackFn. Defaults to the array if not provided.

        Returns T | E

        The last element in the array that satisfies the provided testing function. Otherwise, undefined is returned.

        Since

        0.8.0

        Example

        const inventory = [
        { name: "apples", quantity: 2 },
        { name: "bananas", quantity: 0 },
        { name: "cherries", quantity: 5 },
        ];

        function isCherries(fruit) {
        return fruit.name === "cherries";
        }

        console.log(arrFindLast(inventory, isCherries));
        // { name: 'cherries', quantity: 5 }

        function isPrime(element, index, array) {
        let start = 2;
        while (start <= Math.sqrt(element)) {
        if (element % start++ < 1) {
        return false;
        }
        }
        return element > 1;
        }

        console.log(arrFindLast([4, 6, 8, 12], isPrime)); // undefined, not found
        console.log(arrFindLast([4, 5, 7, 12], isPrime)); // 7

        // Array Like
        console.log(arrFindLast({ length: 4, 0: 4, 1: 6, 2: 8, 3: 12 }, isPrime)); // undefined, not found
        console.log(arrFindLast({ length: 4, 0: 4, 1: 5, 2: 7, 3: 12 }, isPrime)); // 7
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/arrFindLastIndex.html b/docs/typedoc/functions/arrFindLastIndex.html index 69a18b4f..552a70cc 100644 --- a/docs/typedoc/functions/arrFindLastIndex.html +++ b/docs/typedoc/functions/arrFindLastIndex.html @@ -1,4 +1,4 @@ -arrFindLastIndex | @nevware21/ts-utils

Function arrFindLastIndex

  • The arrFindLastIndex() method iterates the array in reverse order and returns the index of the first element that +arrFindLastIndex | @nevware21/ts-utils

    Function arrFindLastIndex

    • The arrFindLastIndex() method iterates the array in reverse order and returns the index of the first element that satisfies the provided testing function. If no elements satisfy the testing function, -1 is returned.

      The arrFindLastIndex() method is an iterative method. It calls a provided callbackFn function once for each element in an array in descending-index order, until callbackFn returns a truthy value. arrFindLastIndex() then returns the @@ -13,16 +13,16 @@

    • If an existing, yet-unvisited element of the array is changed by callbackFn, its value passed to the callbackFn will be the value at the time that element gets visited. Deleted elements are visited as if they were undefined.
    -

    Type Parameters

    • T

      Identifies the base type of array elements

      -
    • E

      Identifies a more specific instance of the base array type

      -

    Parameters

    • theArray: ArrayLike<T>

      The array or array like object of elements to be searched.

      -
    • callbackFn: ArrPredicateCallbackFn<T, E> | ArrPredicateCallbackFn2<T>

      A function that accepts up to three arguments of type ArrPredicateCallbackFn or +

      Type Parameters

      • T

        Identifies the base type of array elements

        +
      • E

        Identifies a more specific instance of the base array type

        +

      Parameters

      • theArray: ArrayLike<T>

        The array or array like object of elements to be searched.

        +
      • callbackFn: ArrPredicateCallbackFn<T, E> | ArrPredicateCallbackFn2<T>

        A function that accepts up to three arguments of type ArrPredicateCallbackFn or ArrPredicateCallbackFn2. The predicate function is called for each element in the thArray until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.

        -
      • Optional thisArg: any

        A value to use as this when executing callbackFn. Defaults to the array if not provided.

        +
      • Optional thisArg: any

        A value to use as this when executing callbackFn. Defaults to the array if not provided.

      Returns number

      The index of the last (highest-index) element in the array that passes the test. Otherwise -1 if no matching element is found.

      Since

      0.8.0

      Example

      const inventory: Array<{ name: string, quantity: number}> = [
      { name: "apples", quantity: 2 },
      { name: "bananas", quantity: 0 },
      { name: "cherries", quantity: 5 }
      ];

      let called = 0;
      function isCherries(fruit: { name: string, quantity: number}) {
      called++;
      return fruit.name === "cherries";
      }

      arrFindLastIndex(inventory, isCherries)' // 2
      // called === 1

      called = 0;
      function isPrime(element: number) {
      called++;
      if (element % 2 === 0 || element < 2) {
      return false;
      }
      for (let factor = 3; factor <= Math.sqrt(element); factor += 2) {
      if (element % factor === 0) {
      return false;
      }
      }
      return true;
      }

      arrFindLastIndex([4, 6, 8, 9, 12], isPrime); // -1
      // called === 5

      called = 0;
      arrFindLastIndex([4, 6, 7, 9, 12], isPrime); // 2
      // called === 3

      // Array Like
      called = 0;
      arrFindLastIndex({ length: 5: 0: 4, 1: 6, 2: 8, 3: 9, 4: 12 }, isPrime); // -1
      // called === 5

      called = 0;
      arrFindLastIndex({ length: 5: 0: 4, 1: 6, 2: 7, 3: 9, 4: 12 }, isPrime); // 2
      // called === 3
      -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/arrForEach.html b/docs/typedoc/functions/arrForEach.html index 3ec893a6..400fc82c 100644 --- a/docs/typedoc/functions/arrForEach.html +++ b/docs/typedoc/functions/arrForEach.html @@ -1,15 +1,15 @@ -arrForEach | @nevware21/ts-utils
  • Calls the provided callbackFn function once for each element in an array in ascending index order. It is not invoked for index properties +arrForEach | @nevware21/ts-utils

    • Calls the provided callbackFn function once for each element in an array in ascending index order. It is not invoked for index properties that have been deleted or are uninitialized. And unlike the ES6 forEach() you CAN stop or break the iteration by returning -1 from the callbackFn function.

      The range (number of elements) processed by arrForEach() is set before the first call to the callbackFn. Any elements added beyond the range or elements which as assigned to indexes already processed will not be visited by the callbackFn.

      -

      Type Parameters

      • T = any

        Identifies the element type of the array

        -

      Parameters

      • theArray: ArrayLike<T>

        The array or array like object of elements to be searched.

        -
      • callbackfn: ((value, index, array) => number | void)

        A synchronous function that accepts up to three arguments. arrForEach calls the callbackfn function one time for each element in the array.

        -
          • (value, index, array): number | void
          • Parameters

            • value: T
            • index: number
            • array: T[]

            Returns number | void

      • Optional thisArg: any

        An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, null or undefined +

        Type Parameters

        • T = any

          Identifies the element type of the array

          +

        Parameters

        • theArray: ArrayLike<T>

          The array or array like object of elements to be searched.

          +
        • callbackfn: ((value, index, array) => number | void)

          A synchronous function that accepts up to three arguments. arrForEach calls the callbackfn function one time for each element in the array.

          +
            • (value, index, array): number | void
            • Parameters

              • value: T
              • index: number
              • array: T[]

              Returns number | void

        • Optional thisArg: any

          An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, null or undefined the array will be used as the this value.

        Returns void

        Remarks

        arrForEach expects a synchronous function. arrForEach does not wait for promises. Make sure you are aware of the implications while using promises (or async functions) as forEach callback.

        Example

        const items = ['item1', 'item2', 'item3'];
        const copyItems = [];

        // before using for loop
        for (let i = 0; i < items.length; i++) {
        copyItems.push(items[i]);
        }

        // before using forEach()
        items.forEach((item) => {
        copyItems.push(item);
        });

        // after
        arrForEach(items, (item) => {
        copyItems.push(item);
        // May return -1 to abort the iteration
        });

        // Also supports input as an array like object
        const items = { length: 3, 0: 'item1', 1: 'item2', 2: 'item3' };
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/arrFrom.html b/docs/typedoc/functions/arrFrom.html index 6ba04170..017d21b4 100644 --- a/docs/typedoc/functions/arrFrom.html +++ b/docs/typedoc/functions/arrFrom.html @@ -1,9 +1,9 @@ -arrFrom | @nevware21/ts-utils
  • Creates an new shallow-copied array from an array-like object or an iterable.

    -

    Type Parameters

    • T

      Identifies the element type of the array-like or iterable.

      -
    • U = T

      Identifies returned type of the array

      -

    Parameters

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/arrIncludes.html b/docs/typedoc/functions/arrIncludes.html index 0aaf5672..d4aee4cc 100644 --- a/docs/typedoc/functions/arrIncludes.html +++ b/docs/typedoc/functions/arrIncludes.html @@ -1,8 +1,8 @@ -arrIncludes | @nevware21/ts-utils

Function arrIncludes

  • The arrIncludes() method determines whether an array includes a certain value among its +arrIncludes | @nevware21/ts-utils

    Function arrIncludes

    • The arrIncludes() method determines whether an array includes a certain value among its entries, returning true or false as appropriate.

      -

      Type Parameters

      • T

      Parameters

      • theArray: ArrayLike<T>

        The array or array like object of elements to be searched.

        -
      • searchElement: T

        The value to search for

        -
      • Optional fromIndex: number

        The optional Zero-based index at which to start searching, converted to an integer.

        +

        Type Parameters

        • T

        Parameters

        • theArray: ArrayLike<T>

          The array or array like object of elements to be searched.

          +
        • searchElement: T

          The value to search for

          +
        • Optional fromIndex: number

          The optional Zero-based index at which to start searching, converted to an integer.

          • Negative index counts back from the end of the array — if fromIndex < 0, fromIndex + array.length is used. However, the array is still searched from front to back in this case.
          • @@ -14,4 +14,4 @@

            Since

            0.8.0

            Example

            arrIncludes([1, 2, 3], 2);       // true
            arrIncludes([1, 2, 3], 4); // false
            arrIncludes([1, 2, 3], 3, 3); // false
            arrIncludes([1, 2, 3], 3, -1); // true
            arrIncludes([1, 2, NaN], NaN); // true
            arrIncludes(["1", "2", "3"], 3 as any); // false

            // Array Like
            arrIncludes({ length: 3, 0: 1, 1: 2, 2: 3 }, 2); // true
            arrIncludes({ length: 3, 0: 1, 1: 2, 2: 3 }, 4); // false
            arrIncludes({ length: 3, 0: 1, 1: 2, 2: 3 }, 3, 3); // false
            arrIncludes({ length: 3, 0: 1, 1: 2, 2: 3 }, 3, -1); // true
            arrIncludes({ length: 3, 0: 1, 1: 2, 2: NaN }, NaN); // true
            arrIncludes({ length: 3, 0: "1", 1: "2", 2: "3" }, 3 as any); // false
            -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/arrIndexOf.html b/docs/typedoc/functions/arrIndexOf.html index 85a4e338..6dceadd2 100644 --- a/docs/typedoc/functions/arrIndexOf.html +++ b/docs/typedoc/functions/arrIndexOf.html @@ -1,11 +1,11 @@ -arrIndexOf | @nevware21/ts-utils
  • The arrIndexOf() method returns the first index at which a given element can be found in the array, +arrIndexOf | @nevware21/ts-utils

    • The arrIndexOf() method returns the first index at which a given element can be found in the array, or -1 if it is not present. arrIndexOf() compares searchElement to elements of the Array using strict equality (the same method used by the === or triple-equals operator).

      -

      Type Parameters

      • T

        Identifies the type of array elements

        -

      Parameters

      • theArray: ArrayLike<T>

        The array or array like object of elements to be searched.

        -
      • searchElement: T

        The element to locate in the array.

        -
      • Optional fromIndex: number

        The index to start the search at. If the index is greater than or equal to +

        Type Parameters

        • T

          Identifies the type of array elements

          +

        Parameters

        • theArray: ArrayLike<T>

          The array or array like object of elements to be searched.

          +
        • searchElement: T

          The element to locate in the array.

          +
        • Optional fromIndex: number

          The index to start the search at. If the index is greater than or equal to the array's length, -1 is returned, which means the array will not be searched. If the provided index value is a negative number, it is taken as the offset from the end of the array. Note: if the provided index is negative, the array is still searched from front to back. If the @@ -13,4 +13,4 @@

        Returns number

        The first index of the element in the array; -1 if not found.

        Example

        const array = [2, 9, 9];
        arrIndexOf(array, 2); // 0
        arrIndexOf(array, 7); // -1
        arrIndexOf(array, 9, 2); // 2
        arrIndexOf(array, 2, -1); // -1
        arrIndexOf(array, 2, -3); // 0

        let indices: number[] = [];
        const array = ['a', 'b', 'a', 'c', 'a', 'd'];
        const element = 'a';
        let idx = arrIndexOf(array, element);
        while (idx !== -1) {
        indices.push(idx);
        idx = arrIndexOf(array, element, idx + 1);
        }
        console.log(indices);
        // [0, 2, 4]

        function updateVegetablesCollection (veggies, veggie) {
        if (arrIndexOf(veggies, veggie) === -1) {
        veggies.push(veggie);
        console.log('New veggies collection is : ' + veggies);
        } else {
        console.log(veggie + ' already exists in the veggies collection.');
        }
        }

        let veggies = ['potato', 'tomato', 'chillies', 'green-pepper'];

        updateVegetablesCollection(veggies, 'spinach');
        // New veggies collection is : potato,tomato,chillies,green-pepper,spinach
        updateVegetablesCollection(veggies, 'spinach');
        // spinach already exists in the veggies collection.

        // Array Like
        let arrayLike = {
        length: 3,
        0: "potato",
        1: "tomato",
        2: "chillies",
        3: "green-pepper" // Not checked as index is > length
        };

        arrIndexOf(arrayLike, "potato"); // 0
        arrIndexOf(arrayLike, "tomato"); // 1
        arrIndexOf(arrayLike, "chillies"); 2
        arrIndexOf(arrayLike, "green-pepper"); // -1
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/arrLastIndexOf.html b/docs/typedoc/functions/arrLastIndexOf.html index ebf1d499..b5819570 100644 --- a/docs/typedoc/functions/arrLastIndexOf.html +++ b/docs/typedoc/functions/arrLastIndexOf.html @@ -1,14 +1,14 @@ -arrLastIndexOf | @nevware21/ts-utils

Function arrLastIndexOf

  • The arrLastIndexOf() method returns the last index at which a given element can be found in the array, +arrLastIndexOf | @nevware21/ts-utils

    Function arrLastIndexOf

    • The arrLastIndexOf() method returns the last index at which a given element can be found in the array, or -1 if it is not present. arrLastIndexOf() compares searchElement to elements of the Array using strict equality (the same method used by the === or triple-equals operator). NaN values are never compared as equal, so arrLastIndexOf() always returns -1 when searchElement is NaN.

      The arrLastIndexOf() method skips empty slots in sparse arrays.

      The arrLastIndexOf() method is generic. It only expects the this value to have a length property and integer-keyed properties.

      -

      Type Parameters

      • T

        Identifies the type of array elements

        -

      Parameters

      • theArray: ArrayLike<T>

        The array or array like object of elements to be searched.

        -
      • searchElement: T

        The element to locate in the array.

        -
      • Optional fromIndex: number

        Zero-based index at which to start searching backwards, converted to an integer.

        +

        Type Parameters

        • T

          Identifies the type of array elements

          +

        Parameters

        • theArray: ArrayLike<T>

          The array or array like object of elements to be searched.

          +
        • searchElement: T

          The element to locate in the array.

          +
        • Optional fromIndex: number

          Zero-based index at which to start searching backwards, converted to an integer.

          • Negative index counts back from the end of the array — if fromIndex < 0, fromIndex + array.length is used.
          • If fromIndex < -array.length, the array is not searched and -1 is returned. You can think of it conceptually @@ -21,4 +21,4 @@

            Since

            0.8.0

            Example

            const numbers = [2, 5, 9, 2];
            arrLastIndexOf(numbers, 2); // 3
            arrLastIndexOf(numbers, 7); // -1
            arrLastIndexOf(numbers, 2, 3); // 3
            arrLastIndexOf(numbers, 2, 2); // 0
            arrLastIndexOf(numbers, 2, -2); // 0
            arrLastIndexOf(numbers, 2, -1); // 3

            let indices: number[] = [];
            const array = ["a", "b", "a", "c", "a", "d"];
            const element = "a";
            let idx = arrLastIndexOf(array, element);
            while (idx !== -1) {
            indices.push(idx);
            idx = arrLastIndexOf(array, element, idx ? idx - 1 : -(array.length + 1));
            }
            console.log(indices);
            // [4, 2, 0]

            function updateVegetablesCollection (veggies, veggie) {
            if (arrLastIndexOf(veggies, veggie) === -1) {
            veggies.push(veggie);
            console.log('New veggies collection is : ' + veggies);
            } else {
            console.log(veggie + ' already exists in the veggies collection.');
            }
            }

            let veggies = ['potato', 'tomato', 'chillies', 'green-pepper'];

            updateVegetablesCollection(veggies, 'spinach');
            // New veggies collection is : potato,tomato,chillies,green-pepper,spinach
            updateVegetablesCollection(veggies, 'spinach');
            // spinach already exists in the veggies collection.

            // Array Like
            let arrayLike = {
            length: 3,
            0: "potato",
            1: "tomato",
            2: "chillies",
            3: "green-pepper" // Not checked as index is > length
            };

            arrLastIndexOf(arrayLike, "potato"); // 0
            arrLastIndexOf(arrayLike, "tomato"); // 1
            arrLastIndexOf(arrayLike, "chillies"); 2
            arrLastIndexOf(arrayLike, "green-pepper"); // -1
            -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/arrMap.html b/docs/typedoc/functions/arrMap.html index 3ab543f8..722b7bf7 100644 --- a/docs/typedoc/functions/arrMap.html +++ b/docs/typedoc/functions/arrMap.html @@ -1,4 +1,4 @@ -arrMap | @nevware21/ts-utils
  • The arrMap() method creates a new array populated with the results of calling a provided function on every +arrMap | @nevware21/ts-utils

    • The arrMap() method creates a new array populated with the results of calling a provided function on every element in the calling array.

      arrMap calls a provided callbackFn function once for each element in an array, in order, and constructs a new array from the results. callbackFn is invoked only for indexes of the array which have assigned @@ -8,12 +8,12 @@

    • indexes that have never been set;
    • indexes which have been deleted.
    -

    Type Parameters

    • T

      Identifies the type of the array elements

      -
    • R = T

      Identifies the type of the elements returned by the callback function, defaults to T.

      -

    Parameters

    • theArray: ArrayLike<T>

      The array or array like object of elements to be searched.

      -
    • callbackFn: ArrMapCallbackFn<T, R>

      The function that is called for evetn element of theArray.

      -
    • Optional thisArg: any

      The value to use as the this when executing the callbackFn.

      +

      Type Parameters

      • T

        Identifies the type of the array elements

        +
      • R = T

        Identifies the type of the elements returned by the callback function, defaults to T.

        +

      Parameters

      • theArray: ArrayLike<T>

        The array or array like object of elements to be searched.

        +
      • callbackFn: ArrMapCallbackFn<T, R>

        The function that is called for evetn element of theArray.

        +
      • Optional thisArg: any

        The value to use as the this when executing the callbackFn.

      Returns R[]

      Since

      0.3.3

      Example

      const numbers = [1, 4, 9];
      const roots = arrMap(numbers, (num) => Math.sqrt(num));

      // roots is now [1, 2, 3]
      // numbers is still [1, 4, 9]

      const kvArray = [{ key: 1, value: 10 },
      { key: 2, value: 20 },
      { key: 3, value: 30 }];

      const reformattedArray = arrMap(kvArray, ({ key, value}) => ({ [key]: value }));

      // reformattedArray is now [{1: 10}, {2: 20}, {3: 30}],

      // kvArray is still:
      // [{key: 1, value: 10},
      // {key: 2, value: 20},
      // {key: 3, value: 30}]

      // Also supports Array Like objects with same output
      const kvArray = {
      length: 3,
      0: { key: 1, value: 10 },
      1: { key: 2, value: 20 },
      2: { key: 3, value: 30 }
      };
      -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/arrReduce.html b/docs/typedoc/functions/arrReduce.html index 96c3fc99..cd27f335 100644 --- a/docs/typedoc/functions/arrReduce.html +++ b/docs/typedoc/functions/arrReduce.html @@ -1,14 +1,14 @@ -arrReduce | @nevware21/ts-utils
  • The arrReduce() method executes a user-supplied "reducer" callback function on each element of the array, +arrReduce | @nevware21/ts-utils

    • The arrReduce() method executes a user-supplied "reducer" callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element. The final result of running the reducer across all elements of the array is a single value.

      The first time that the callback is run there is no "return value of the previous calculation". If supplied, an initial value may be used in its place. Otherwise the array element at index 0 is used as the initial value and iteration starts from the next element (index 1 instead of index 0).

      -

      Type Parameters

      • T

        Identifies the type of array elements

        -
      • R = T

      Parameters

      • theArray: ArrayLike<T>

        The array or array like object of elements to be searched.

        -
      • callbackfn: ArrReduceCallbackFn<T, R>

        A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.

        -
      • Optional initialValue: T | R

        If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

        +

        Type Parameters

        • T

          Identifies the type of array elements

          +
        • R = T

        Parameters

        • theArray: ArrayLike<T>

          The array or array like object of elements to be searched.

          +
        • callbackfn: ArrReduceCallbackFn<T, R>

          A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.

          +
        • Optional initialValue: T | R

          If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

        Returns R

        The value that results from running the "reducer" callback function to completion over the entire array.

        Example

        const getMax = (a: number, b: number) => Math.max(a, b);

        // callback is invoked for each element in the array starting at index 0
        arrReduce([1, 100], getMax, 50); // 100
        arrReduce([ 50], getMax, 10); // 50

        // callback is invoked once for element at index 1
        arrReduce([1, 100], getMax); // 100

        // callback is not invoked
        arrReduce([ 50], getMax); // 50
        arrReduce([ ], getMax, 1); // 1

        arrReduce([ ], getMax); // throws TypeError

        // Also supports Array like objects
        arrReduce({ length: 2, 0: 1, 1: 100 }, getMax, 50); // 100
        arrReduce({ length: 1, 0: 50 }, getMax, 10); // 50

        // callback is invoked once for element at index 1
        arrReduce({ length: 2, 0: 1, 1: 100 }, getMax); // 100

        // callback is not invoked
        arrReduce({ length: 1, 0: 50 }, getMax); // 50
        arrReduce({ length: 0 }, getMax, 1); // 1
        * ```
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/arrSlice.html b/docs/typedoc/functions/arrSlice.html index 421db0cc..de226b41 100644 --- a/docs/typedoc/functions/arrSlice.html +++ b/docs/typedoc/functions/arrSlice.html @@ -1,4 +1,4 @@ -arrSlice | @nevware21/ts-utils
  • The arrSlice() method returns a shallow copy of a portion of an array into a new array object +arrSlice | @nevware21/ts-utils

    • The arrSlice() method returns a shallow copy of a portion of an array into a new array object selected from start to end (end not included) where start and end represent the index of items in that array. The original array will not be modified.

      The arrSlice() method is a copying method. It does not alter this but instead returns a shallow @@ -9,13 +9,13 @@ integer-keyed properties.

      For both start and end, a negative index can be used to indicate an offset from the end of the array. For example, -2 refers to the second to last element of the array.

      -

      Type Parameters

      • T

      Parameters

      • theArray: ArrayLike<T>
      • Optional start: number

        Zero-based index at which to start extraction, converted to an integer.

        +

        Type Parameters

        • T

        Parameters

        • theArray: ArrayLike<T>
        • Optional start: number

          Zero-based index at which to start extraction, converted to an integer.

          • Negative index counts back from the end of the array — if start < 0, start + array.length is used.
          • If start < -array.length or start is omitted, 0 is used.
          • If start >= array.length, nothing is extracted.
          -
        • Optional end: number

          Zero-based index at which to end extraction, converted to an integer. slice() extracts +

        • Optional end: number

          Zero-based index at which to end extraction, converted to an integer. slice() extracts up to but not including end.

          • Negative index counts back from the end of the array — if end < 0, end + array.length is used.
          • @@ -27,4 +27,4 @@

        Returns T[]

        Since

        0.9.3

        Example

        const lyrics = ["Hello", "Darkness", "my", "old", "friend.", "I've", "come", "to", "talk" ];

        arrSlice(lyrics); // [ "Hello", "Darkness", "my", "old", "friend.", "I've", "come", "to", "talk" ]
        arrSlice(lyrics, 1, 3); // [ "Darkness", "my" ]
        arrSlicw(lyrics, 2); // [ "my", "old", "friend.", "I've", "come", "to", "talk" ]
        arrSlice(lyrics, 2, 4); // [ "my", "old" ]
        arrSlice(lyrics, 1, 5); // [ "Darkness", "my", "old", "friend." ]
        arrSlice(lyrics, -2); // [ "to", "talk" ]
        arrSlice(lyrics, 2, -1); // [ "my", "old", "friend.", "I've", "come", "to" ]
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/arrSome.html b/docs/typedoc/functions/arrSome.html index 5c048abf..557976b8 100644 --- a/docs/typedoc/functions/arrSome.html +++ b/docs/typedoc/functions/arrSome.html @@ -1,4 +1,4 @@ -arrSome | @nevware21/ts-utils
  • The arrSome() method tests whether at least one element in the array passes the test implemented by the +arrSome | @nevware21/ts-utils

    • The arrSome() method tests whether at least one element in the array passes the test implemented by the provided function. It returns true if, in the array, it finds an element for which the provided function returns true; otherwise it returns false. It doesn't modify the array.

      The arrSome() method is an iterative method. It calls a provided callbackFn function once for each element @@ -18,14 +18,14 @@ callbackFn will be the value at the time that element gets visited. Deleted elements are not visited.

    • The arrSome() method is generic. It only expects the this value to have a length property and integer-keyed properties.
    -

    Type Parameters

    • T

      Identifies the base type of array elements

      -
    • E

      Identifies a more specific instance of the base array type

      -

    Parameters

    • theArray: ArrayLike<T>

      The array or array like object of elements to be searched.

      -
    • callbackFn: ArrPredicateCallbackFn<T, E> | ArrPredicateCallbackFn2<T>

      A function that accepts up to three arguments of type ArrPredicateCallbackFn or +

      Type Parameters

      • T

        Identifies the base type of array elements

        +
      • E

        Identifies a more specific instance of the base array type

        +

      Parameters

      • theArray: ArrayLike<T>

        The array or array like object of elements to be searched.

        +
      • callbackFn: ArrPredicateCallbackFn<T, E> | ArrPredicateCallbackFn2<T>

        A function that accepts up to three arguments of type ArrPredicateCallbackFn or ArrPredicateCallbackFn2. The predicate function is called for each element in the thArray until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.

        -
      • Optional thisArg: any

        A value to use as this when executing callbackFn. Defaults to the array if not provided.

        +
      • Optional thisArg: any

        A value to use as this when executing callbackFn. Defaults to the array if not provided.

      Returns boolean

      true if the callback function returns a truthy value for at least one element in the array. Otherwise, false.

      Since

      0.8.0

      -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/arrayDeepCopyHandler.html b/docs/typedoc/functions/arrayDeepCopyHandler.html index 104bb58d..9d462229 100644 --- a/docs/typedoc/functions/arrayDeepCopyHandler.html +++ b/docs/typedoc/functions/arrayDeepCopyHandler.html @@ -1,5 +1,5 @@ -arrayDeepCopyHandler | @nevware21/ts-utils

Function arrayDeepCopyHandler

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/asString.html b/docs/typedoc/functions/asString.html index 17a43d56..746bfe86 100644 --- a/docs/typedoc/functions/asString.html +++ b/docs/typedoc/functions/asString.html @@ -1,7 +1,7 @@ -asString | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/createArrayIterator.html b/docs/typedoc/functions/createArrayIterator.html index a57cba13..c6f7bf95 100644 --- a/docs/typedoc/functions/createArrayIterator.html +++ b/docs/typedoc/functions/createArrayIterator.html @@ -1,12 +1,12 @@ -createArrayIterator | @nevware21/ts-utils

Function createArrayIterator

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/createCachedValue.html b/docs/typedoc/functions/createCachedValue.html index cc35c187..da71f338 100644 --- a/docs/typedoc/functions/createCachedValue.html +++ b/docs/typedoc/functions/createCachedValue.html @@ -1,11 +1,11 @@ -createCachedValue | @nevware21/ts-utils

Function createCachedValue

  • Create and return a readonly ICachedValue instance that is populated with the provided value. +createCachedValue | @nevware21/ts-utils

    Function createCachedValue

    • Create and return a readonly ICachedValue instance that is populated with the provided value. This is useful when you want to cache a previously fetched value and return it without having to re-fetch it again. This is a lightweight version of getLazy which does not support any expiration or invalidation, it also will not honor the setBypassLazyCache setting and will always return the provided value.

      -

      Type Parameters

      • T

      Parameters

      • value: T

      Returns ICachedValue<T>

      A new ICachedValue instance which wraps the provided value

      +

    Type Parameters

    • T

    Parameters

    • value: T

    Returns ICachedValue<T>

    A new ICachedValue instance which wraps the provided value

    Since

    0.10.5

    Typeparam

    T - The type of the value to be cached

    Example

    let cachedValue = createCachedValue("some value");
    // cachedValue.v === "some value"

    JSON.stringify(cachedValue) === '{"v":"some value"}';
    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/createCustomError.html b/docs/typedoc/functions/createCustomError.html index 028a52dc..e67fc818 100644 --- a/docs/typedoc/functions/createCustomError.html +++ b/docs/typedoc/functions/createCustomError.html @@ -1,9 +1,9 @@ -createCustomError | @nevware21/ts-utils

Function createCustomError

  • Create a Custom Error class which may be used to throw custom errors.

    -

    Type Parameters

    Parameters

    • name: string

      The name of the Custom Error

      -
    • Optional constructCb: ((self, args) => void)

      [Optional] An optional callback function to call when a +createCustomError | @nevware21/ts-utils

      Function createCustomError

      • Create a Custom Error class which may be used to throw custom errors.

        +

        Type Parameters

        Parameters

        • name: string

          The name of the Custom Error

          +
        • Optional constructCb: ((self, args) => void)

          [Optional] An optional callback function to call when a new Customer Error instance is being created.

          -
            • (self, args): void
            • Parameters

              • self: any
              • args: IArguments

              Returns void

        • Optional errorBase: B

          [Optional] (since v0.9.6) The error class to extend for this class, defaults to Error.

          +
            • (self, args): void
            • Parameters

              • self: any
              • args: IArguments

              Returns void

        • Optional errorBase: B

          [Optional] (since v0.9.6) The error class to extend for this class, defaults to Error.

        Returns T

        A new Error class

        Example

        import { createCustomError, isError } from "@nevware21/ts-utils";

        // For an error that just contains a message
        let myCustomErrorError = createCustomError("MessageError");

        try {
        throw new myCustomErrorError("Error Message!");
        } catch(e) {
        // e.name === MessageError
        // isError(e) === true;
        // Object.prototype.toString.call(e) === "[object Error]";
        }

        // Or a more complex error object
        interface MyCriticalErrorConstructor extends CustomErrorConstructor {
        new(message: string, file: string, line: number, col: number): MyCriticalError;
        (message: string, file: string, line: number, col: number): MyCriticalError;
        }

        interface MyCriticalError extends Error {
        readonly errorId: number;
        readonly args: any[]; // Holds all of the arguments passed during construction
        }

        let _totalErrors = 0;
        let myCustomError = createCustomError<MyCriticalErrorConstructor>("CriticalError", (self, args) => {
        _totalErrors++;
        self.errorId = _totalErrors;
        self.args = args;
        });

        try {
        throw new myCustomError("Not Again!");
        } catch(e) {
        // e.name === CriticalError
        // isError(e) === true;
        // Object.prototype.toString.call(e) === "[object Error]";
        }

        // ----------------------------------------------------------
        // Extending another custom error class
        // ----------------------------------------------------------

        let AppError = createCustomError("ApplicationError");
        let theAppError = new appError();

        isError(theAppError); // true
        theAppError instanceof Error; // true
        theAppError instanceof AppError; // true

        let StartupError = createCustomError("StartupError", null, AppError);
        let theStartupError = new StartupError();

        isError(theStartupError); // true
        theStartupError instanceof Error; // true
        theStartupError instanceof AppError; // true
        theStartupError instanceof StartupError; // true
        -

      Generated using TypeDoc

      \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/createDeferredCachedValue.html b/docs/typedoc/functions/createDeferredCachedValue.html index 3b8ec519..dd1f2593 100644 --- a/docs/typedoc/functions/createDeferredCachedValue.html +++ b/docs/typedoc/functions/createDeferredCachedValue.html @@ -1,9 +1,9 @@ -createDeferredCachedValue | @nevware21/ts-utils

Function createDeferredCachedValue

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/createEnum.html b/docs/typedoc/functions/createEnum.html index 84dc7ce1..f355fbd4 100644 --- a/docs/typedoc/functions/createEnum.html +++ b/docs/typedoc/functions/createEnum.html @@ -1,8 +1,8 @@ -createEnum | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/createEnumKeyMap.html b/docs/typedoc/functions/createEnumKeyMap.html index 81e75571..09cbcbf9 100644 --- a/docs/typedoc/functions/createEnumKeyMap.html +++ b/docs/typedoc/functions/createEnumKeyMap.html @@ -1,8 +1,8 @@ -createEnumKeyMap | @nevware21/ts-utils

Function createEnumKeyMap

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/createEnumValueMap.html b/docs/typedoc/functions/createEnumValueMap.html index 567054f9..be120113 100644 --- a/docs/typedoc/functions/createEnumValueMap.html +++ b/docs/typedoc/functions/createEnumValueMap.html @@ -1,8 +1,8 @@ -createEnumValueMap | @nevware21/ts-utils

Function createEnumValueMap

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/createFilenameRegex.html b/docs/typedoc/functions/createFilenameRegex.html index 0d19f6c9..f28fa140 100644 --- a/docs/typedoc/functions/createFilenameRegex.html +++ b/docs/typedoc/functions/createFilenameRegex.html @@ -1,4 +1,4 @@ -createFilenameRegex | @nevware21/ts-utils

Function createFilenameRegex

  • Create a simple filename style regular expression from the string value, converting any embedded +createFilenameRegex | @nevware21/ts-utils

    Function createFilenameRegex

    • Create a simple filename style regular expression from the string value, converting any embedded filename wildcard characters '*' and '?'. If the source string contains folder seperators both '/' and '\' are treated as synonomous. Each wildcard match will be captured as it's own group. @@ -9,13 +9,13 @@

    • '/' Matches either '/' or '\' character, not captured as a group
    • '\' Matches either '/' or '\' character, not captured as a group
    -

    Parameters

    • value: string

      The string value to converted

      -
    • Optional ignoreCase: boolean

      Flag to indicate whether the regular expression should be case-sensitive, Defaults +

      Parameters

      • value: string

        The string value to converted

        +
      • Optional ignoreCase: boolean

        Flag to indicate whether the regular expression should be case-sensitive, Defaults to false.

        -
      • Optional fullMatch: boolean

        Flag to identify whether the RegExp should be wrapped with '^' and '$' to +

      • Optional fullMatch: boolean

        Flag to identify whether the RegExp should be wrapped with '^' and '$' to incidate match the entire string only.

      Returns RegExp

      The new Regular Expression created from the provided value.

      Since

      0.9.0

      Example

      let regex = createFilenameRegex("*.txt");

      lat matches = regex.exec("Hello");
      matches; // null

      let matches = regex.exec("ug.txt");
      matches[0]; // "ug.txt"
      matches[1]; // "ug"

      let matches = regex.exec(" ug.txt ");
      matches[0]; // " ug.txt"
      matches[1]; // " ug"

      let matches = regex.exec("C:\\temp\\ug.txt");
      matches[0]; // "C:\\temp\\ug.txt"
      matches[1]; // "C:\\temp\\ug"

      let matches = regex.exec("/var/log/ug.txt");
      matches[0]; // "/var/log/ug.txt"
      matches[1]; // "/var/log/ug"
      -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/createFnDeferredProxy.html b/docs/typedoc/functions/createFnDeferredProxy.html index 2c85920a..a88dee30 100644 --- a/docs/typedoc/functions/createFnDeferredProxy.html +++ b/docs/typedoc/functions/createFnDeferredProxy.html @@ -1,12 +1,12 @@ -createFnDeferredProxy | @nevware21/ts-utils

Function createFnDeferredProxy

  • Create a deferred proxy function which will call the named function of the result of the hostFn, this enables +createFnDeferredProxy | @nevware21/ts-utils

    Function createFnDeferredProxy

    • Create a deferred proxy function which will call the named function of the result of the hostFn, this enables creating bound functions which when called call the proxy the function to a different host (this) instance.

      This is different from fnBind which is provided with the concrete function and this instances, while the proxy will lazily obtain the this and the function is obtained by looking up the named function from the returned host (this) instance.

      -

      Type Parameters

      • H

      • F extends ((...args) => any)

      Parameters

      • hostFn: (() => H)

        A function to get the current host and thisArg that will be called

        -
          • (): H
          • Returns H

      • funcName: TypeFuncNames<H>

        The name of the function to call on the host

        +

        Type Parameters

        • H
        • F extends ((...args) => any)

        Parameters

        • hostFn: (() => H)

          A function to get the current host and thisArg that will be called

          +
            • (): H
            • Returns H

        • funcName: TypeFuncNames<H>

          The name of the function to call on the host

        Returns F

        The result of calling the function with the specified this value and arguments.

        Since

        0.9.8

        Example

        const module1 = {
        prefix: "Hello",
        x: 21,
        getX() {
        return this.x;
        },
        log(value: string) {
        return this.prefix + " " + value + " : " + this.x
        }
        };

        // The 'this' parameter of 'getX' is bound to 'module'.
        module1.getX(); // 21
        module1.log("Darkness"); // Hello Darkness : 21

        // Create a new function 'boundGetX' with the 'this' parameter bound to 'module'.
        let module2 = {
        prefix: "my",
        x: 42
        };

        let getHost = () => {
        return module1;
        };

        let deferredFn = createFnDeferredProxy(getHost, "getX");

        deferredFn(); // 21

        module2.defX = deferredFn;

        module2.defX(); // 21
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/createIterable.html b/docs/typedoc/functions/createIterable.html index 1dabbef5..580c4aa6 100644 --- a/docs/typedoc/functions/createIterable.html +++ b/docs/typedoc/functions/createIterable.html @@ -1,10 +1,10 @@ -createIterable | @nevware21/ts-utils

Function createIterable

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/createIterator.html b/docs/typedoc/functions/createIterator.html index 4e5e38e9..49ad2376 100644 --- a/docs/typedoc/functions/createIterator.html +++ b/docs/typedoc/functions/createIterator.html @@ -1,10 +1,10 @@ -createIterator | @nevware21/ts-utils

Function createIterator

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/createProxyFuncs.html b/docs/typedoc/functions/createProxyFuncs.html index 2f28aac0..eb4ae43c 100644 --- a/docs/typedoc/functions/createProxyFuncs.html +++ b/docs/typedoc/functions/createProxyFuncs.html @@ -1,11 +1,11 @@ -createProxyFuncs | @nevware21/ts-utils

Function createProxyFuncs

  • Creates proxy functions on the target which internally will call the source version with all arguments passed to the target method.

    -

    Type Parameters

    • T

    • H

    Parameters

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/createRangeIterator.html b/docs/typedoc/functions/createRangeIterator.html index eccab03c..881d1c13 100644 --- a/docs/typedoc/functions/createRangeIterator.html +++ b/docs/typedoc/functions/createRangeIterator.html @@ -1,15 +1,15 @@ -createRangeIterator | @nevware21/ts-utils

Function createRangeIterator

  • Create a simple range iterator which will return an iterator that increments it's value from +createRangeIterator | @nevware21/ts-utils

    Function createRangeIterator

    • Create a simple range iterator which will return an iterator that increments it's value from start to end by the step.

      • If end is omitted, null or undefined the value will be set to start
      • If the step value is omitted, null, undefined or zero then it will default to 1 if end > start otherwise -1.
      -

      Parameters

      • start: number

        The initial value of the numeric iterator

        -
      • end: number

        The inclusive maximum (or minimum when moving backwards) value of the iterator.

        -
      • Optional step: number

        The step size for each iteration, may be positive or negative. Defaults to 1 when +

        Parameters

        • start: number

          The initial value of the numeric iterator

          +
        • end: number

          The inclusive maximum (or minimum when moving backwards) value of the iterator.

          +
        • Optional step: number

          The step size for each iteration, may be positive or negative. Defaults to 1 when start <= end and -1 when start > end. Zero is treated as not provided.

        Returns Iterator<number>

        A new iterator which will return a numeric value between start and end at step intervals

        Since

        0.4.2

        Example

        let cnt = 0;
        iterForOf(createRangeIterator(0, -1, 1), (value) => {
        // Will never get called as -1 < 0
        });

        cnt = 0;
        let values: number[] = [];
        iterForOf(createRangeIterator(1, 1), (value) => {
        cnt++;
        values.push(value);
        });
        // cnt === 1
        // values: [ 1 ]

        cnt = 0;
        values = [];
        iterForOf(createRangeIterator(10, null as any), (value) => {
        cnt++;
        values.push(value);
        });
        // cnt === 1
        // values: [ 10 ]

        cnt = 0;
        values = [];
        iterForOf(createRangeIterator(-10, undefined as any), (value) => {
        cnt++;
        values.push(value);
        });
        // cnt === 1
        // values: [ -10 ]

        cnt = 0;
        values = [];
        iterForOf(createRangeIterator(5, 20, 5), (value) => {
        cnt++;
        values.push(value);
        });
        // cnt === 4
        // values: [ 5, 10, 15, 20 ]

        cnt = 0;
        values = [];
        iterForOf(createRangeIterator(20, 5, -5), (value) => {
        cnt++;
        values.push(value);
        });
        // cnt === 4
        // values: [ 20, 15, 10, 5 ]

        cnt = 0;
        values = [];
        iterForOf(createRangeIterator(20, 15), (value) => {
        cnt++;
        values.push(value);
        });
        // cnt === 6
        // values: [ 20, 19, 18, 17, 16, 15 ]

        cnt = 0;
        values = [];
        iterForOf(createRangeIterator(-1, 1), (value) => {
        cnt++;
        values.push(value);
        });
        // cnt === 3;
        // values: [ -1, 0, 1 ]

        cnt = 0;
        values = [];
        iterForOf(createRangeIterator(1, -1), (value) => {
        cnt++;
        values.push(value);
        });
        // cnt === 3;
        // values: [ 1, 0, -1 ]
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/createSimpleMap.html b/docs/typedoc/functions/createSimpleMap.html index aacd705e..f95d67e7 100644 --- a/docs/typedoc/functions/createSimpleMap.html +++ b/docs/typedoc/functions/createSimpleMap.html @@ -1,9 +1,9 @@ -createSimpleMap | @nevware21/ts-utils

Function createSimpleMap

  • Create a map object which contains both the perperty key and value which both map to the requested +createSimpleMap | @nevware21/ts-utils

    Function createSimpleMap

    • Create a map object which contains both the perperty key and value which both map to the requested generic mapValue with a type of V, E[key] => mapValue and E[value] => mapValue.

      -

      Type Parameters

      • E

        Identifies the const enum type (eg. typeof Animal);

        -
      • V

        Identifies the type of the mapping string; number; etc is not restructed to primitive types.

        -

      Parameters

      • values: {
            [key in string | number | symbol]: [E[keyof E], V]
        }

        The values to populate on the new object

        +

        Type Parameters

        • E

          Identifies the const enum type (eg. typeof Animal);

          +
        • V

          Identifies the type of the mapping string; number; etc is not restructed to primitive types.

          +

        Parameters

        • values: {
              [key in string | number | symbol]: [E[keyof E], V]
          }

          The values to populate on the new object

        Returns EnumTypeMap<E, V>

        A new frozen (immutable) object which contains a property for each key and value that returns the defiend mapped value.

        Example

        const enum Animal {
        Dog = 0,
        Cat = 1,
        Butterfly = 2,
        Bear = 3
        };
        // Creates a simple mapping to a string value
        const animalFamilyMap = createValueMap<typeof Animal, string>({
        Dog: [ Animal.Dog, "Canidae"],
        Cat: [ Animal.Cat, "Felidae"],
        Butterfly: [ Animal.Butterfly, "Papilionidae"],
        Bear: [ Animal.Bear, "Ursidae"]
        });
        // You end up with an object that maps everything to the name
        animalMap.Dog === "Canidae"; // true with typeof animalMap.Dog is "string"
        animalMap[0] === "Canidae"; // true with typeof animalMap[0] is "string"
        animalMap["Dog"] === "Canidae"; // true with typeof animalMap["Dog"] is "string"
        animalMap.Cat === "Felidae"; // true with typeof animalMap.Cat is "string"
        animalMap[1] === "Felidae"; // true with typeof animalMap[1] is "string"
        animalMap["Cat"] === "Felidae"; // true with typeof animalMap["Cat"] is "string"
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/createTimeout.html b/docs/typedoc/functions/createTimeout.html index 99fd223a..00370086 100644 --- a/docs/typedoc/functions/createTimeout.html +++ b/docs/typedoc/functions/createTimeout.html @@ -1,15 +1,15 @@ -createTimeout | @nevware21/ts-utils

Function createTimeout

  • Creates a non-running (paused) timer which will execute a function or specified piece of code when enabled and the timer expires, +createTimeout | @nevware21/ts-utils

    Function createTimeout

    • Creates a non-running (paused) timer which will execute a function or specified piece of code when enabled and the timer expires, this is simular to using scheduleTimeout but the timer is not enabled (running) and you MUST call refresh to start the timer.

      The timer may be cancelled (cleared) by calling the cancel() function on the returned ITimerHandler, or you can "reschedule" and/or "restart" the timer by calling the refresh() function on the returned ITimerHandler instance

      -

      Type Parameters

      • A extends any[]

      Parameters

      • callback: ((...args) => void)

        The function to be executed after the timer expires.

        -
          • (...args): void
          • Parameters

            • Rest ...args: A

            Returns void

      • timeout: number

        The time, in milliseconds that the timer should wait before the specified +

        Type Parameters

        • A extends any[]

        Parameters

        • callback: ((...args) => void)

          The function to be executed after the timer expires.

          +
            • (...args): void
            • Parameters

              • Rest ...args: A

              Returns void

        • timeout: number

          The time, in milliseconds that the timer should wait before the specified function or code is executed. If this parameter is omitted, a value of 0 is used, meaning execute "immediately", or more accurately, the next event cycle.

          -
        • Rest ...args: A

          Additional arguments which are passed through to the function specified by callback.

          +
        • Rest ...args: A

          Additional arguments which are passed through to the function specified by callback.

        Returns ITimerHandler

        A ITimerHandler instance which can be used to cancel the timeout.

        Since

        0.7.0

        Example

        let timeoutCalled = false;
        let theTimeout = createTimeout(() => {
        // This callback will be called after 100ms as this uses setTimeout()
        timeoutCalled = true;
        }, 100);

        // As the timer is not started you will need to call "refresh" to start the timer
        theTimeout.refresh();

        // or set enabled to true
        theTimeout.enabled = true;
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/createTimeoutWith.html b/docs/typedoc/functions/createTimeoutWith.html index 6def4ea1..24a6cdd1 100644 --- a/docs/typedoc/functions/createTimeoutWith.html +++ b/docs/typedoc/functions/createTimeoutWith.html @@ -1,21 +1,21 @@ -createTimeoutWith | @nevware21/ts-utils

Function createTimeoutWith

  • Creates a non-running (paused) timer which will execute a function or specified piece of code when enabled once the timer expires. +createTimeoutWith | @nevware21/ts-utils

    Function createTimeoutWith

    • Creates a non-running (paused) timer which will execute a function or specified piece of code when enabled once the timer expires. The overrideFn will be used to create the timer, this is simular to using scheduleTimeoutWith but the timer is not enabled (running) and you MUST call refresh to start the timer.

      The timer may be cancelled (cleared) by calling the cancel() function on the returned ITimerHandler, or you can "reschedule" and/or "restart" the timer by calling the refresh() function on the returned ITimerHandler instance

      -

      Type Parameters

      • A extends any[]

      Parameters

      • overrideFn: TimeoutOverrideFn | TimeoutOverrideFuncs

        setTimeout override function this will be called instead of the setTimeout, if the value +

        Type Parameters

        • A extends any[]

        Parameters

        • overrideFn: TimeoutOverrideFn | TimeoutOverrideFuncs

          setTimeout override function this will be called instead of the setTimeout, if the value of overrideFn is null or undefined it will revert back to the native setTimeout. May also be an array with contains both the setTimeout and clearTimeout override functions, if either is not provided the default native functions will be used

          -
        • callback: ((...args) => void)

          The function to be executed after the timer expires.

          -
            • (...args): void
            • Parameters

              • Rest ...args: A

              Returns void

        • timeout: number

          The time, in milliseconds that the timer should wait before the specified +

        • callback: ((...args) => void)

          The function to be executed after the timer expires.

          +
            • (...args): void
            • Parameters

              • Rest ...args: A

              Returns void

        • timeout: number

          The time, in milliseconds that the timer should wait before the specified function or code is executed. If this parameter is omitted, a value of 0 is used, meaning execute "immediately", or more accurately, the next event cycle.

          -
        • Rest ...args: A

          Additional arguments which are passed through to the function specified by callback.

          +
        • Rest ...args: A

          Additional arguments which are passed through to the function specified by callback.

        Returns ITimerHandler

        A ITimerHandler instance which can be used to cancel the timeout.

        Since

        0.7.0

        Example

        let timeoutCalled = false;
        // Your own "setTimeout" implementation to allow you to perform additional operations or possible wrap
        // the callback to add timings.
        function newSetTimeoutFn(callback: TimeoutOverrideFn) {
        overrideCalled ++;
        return setTimeout(callback, timeout);
        }

        let theTimeout = createTimeoutWith(newSetTimeoutFn, () => {
        // This callback will be called after 100ms as this uses setTimeout()
        timeoutCalled = true;
        }, 100);

        // As the timer is not started you will need to call "refresh" to start the timer
        theTimeout.refresh();

        // or set enabled to true
        theTimeout.enabled = true;

        Example

        let timeoutCalled = false;
        // Your own "setTimeout" implementation to allow you to perform additional operations or possible wrap
        // the callback to add timings.
        function newSetTimeoutFn(callback: TimeoutOverrideFn) {
        overrideCalled ++;
        return setTimeout(callback, timeout);
        }

        // Your own "clearTimeout" implementation to allow you to perform additional operations or possible wrap
        // the callback to add timings.
        function newClearTimeoutFn(timeoutId: number) {
        overrideCalled ++;
        return clearTimeout( timeout);
        }

        let theTimeout = createTimeoutWith([newSetTimeoutFn, newClearTimeoutFn], () => {
        // This callback will be called after 100ms as this uses setTimeout()
        timeoutCalled = true;
        }, 100);

        // As the timer is not started you will need to call "refresh" to start the timer
        theTimeout.refresh();

        // or set enabled to true
        theTimeout.enabled = true;
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/createTypeMap.html b/docs/typedoc/functions/createTypeMap.html index 463161d5..ad43b71f 100644 --- a/docs/typedoc/functions/createTypeMap.html +++ b/docs/typedoc/functions/createTypeMap.html @@ -1,4 +1,4 @@ -createTypeMap | @nevware21/ts-utils

Function createTypeMap

  • Create a strongly types map object which contains both the perperty key and value which both map +createTypeMap | @nevware21/ts-utils

    Function createTypeMap

    • Create a strongly types map object which contains both the perperty key and value which both map to the requested mapValue, E[key] => mapValue and E[value] => mapValue.

        @@ -6,10 +6,10 @@
      • V = Identifies the valid values for the keys, this should include both the enum numeric and string key of the type. The resulting "Value" of each entry identifies the valid values withing the assignments.
      -

      Type Parameters

      • E

        Identifies the enum type

        -
      • T

        Identifies the return type that is being created via the mapping.

        -

      Parameters

      • values: {
            [key in string | number | symbol]: [E[keyof E], T[keyof T]]
        }

        The values to populate on the new object

        +

        Type Parameters

        • E

          Identifies the enum type

          +
        • T

          Identifies the return type that is being created via the mapping.

          +

        Parameters

        • values: {
              [key in string | number | symbol]: [E[keyof E], T[keyof T]]
          }

          The values to populate on the new object

        Returns T

        A new frozen (immutable) object which contains a property for each key and value that returns the defined mapped value.

        Example

        // Create a strongly types map
        const animalFamilyMap = createTypeMap<typeof Animal, {
        // Defined the enum lookups
        [Animal.Dog]: "Canidae",
        [Animal.Cat]: "Felidae",
        [Animal.Butterfly]: "Papilionidae",
        [Animal.Bear]: "Ursidae",
        // Defined Named reference
        Dog: "Canidae",
        Cat: "Felidae",
        Butterfly: "Papilionidae",
        Bear: "Ursidae",
        }>({
        Dog: [ Animal.Dog, "Canidae"],
        Cat: [ Animal.Cat, "Felidae"],
        Butterfly: [ Animal.Butterfly, "Papilionidae"],
        Bear: [ Animal.Bear, "Ursidae"]
        });
        // You end up with a strongly types result for each value
        animalMap.Dog === "Canidae"; // true with typeof animalMap.Dog is (const) "Canidae"
        animalMap[0] === "Canidae"; // true with typeof animalMap[0] is "Canidae"
        animalMap["Dog"] === "Canidae"; // true with typeof animalMap["Dog"] is "Canidae"
        animalMap.Cat === "Felidae"; // true with typeof animalMap.Cat is "Felidae"
        animalMap[1] === "Felidae"; // true with typeof animalMap[1] is "Felidae"
        animalMap["Cat"] === "Felidae"; // true with typeof animalMap["Cat"] is "Felidae"

        or using an interface to define the direct string mappings

        interface IAnimalFamilyMap {
        Dog: "Canidae",
        Cat: "Felidae",
        Butterfly: "Papilionidae",
        Bear: "Ursidae"
        }

        // Create a strongly types map
        const animalFamilyMap = createTypeMap<typeof Animal, IAnimalFamilyMap & {
        // Defined the enum lookups
        [Animal.Dog]: "Canidae",
        [Animal.Cat]: "Felidae",
        [Animal.Butterfly]: "Papilionidae",
        [Animal.Bear]: "Ursidae"
        }>({
        Dog: [ Animal.Dog, "Canidae"],
        Cat: [ Animal.Cat, "Felidae"],
        Butterfly: [ Animal.Butterfly, "Papilionidae"],
        Bear: [ Animal.Bear, "Ursidae"]
        });

        // You also end up with a strongly types result for each value
        animalMap.Dog === "Canidae"; // true with typeof animalMap.Dog is (const) "Canidae"
        animalMap[0] === "Canidae"; // true with typeof animalMap[0] is "Canidae"
        animalMap["Dog"] === "Canidae"; // true with typeof animalMap["Dog"] is "Canidae"
        animalMap.Cat === "Felidae"; // true with typeof animalMap.Cat is "Felidae"
        animalMap[1] === "Felidae"; // true with typeof animalMap[1] is "Felidae"
        animalMap["Cat"] === "Felidae"; // true with typeof animalMap["Cat"] is "Felidae"
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/createWildcardRegex.html b/docs/typedoc/functions/createWildcardRegex.html index 078222ec..2ae3a227 100644 --- a/docs/typedoc/functions/createWildcardRegex.html +++ b/docs/typedoc/functions/createWildcardRegex.html @@ -1,18 +1,18 @@ -createWildcardRegex | @nevware21/ts-utils

Function createWildcardRegex

  • Create a simple wildcard regular expression from the string value, converting any embedded wildcard +createWildcardRegex | @nevware21/ts-utils

    Function createWildcardRegex

    • Create a simple wildcard regular expression from the string value, converting any embedded wildcard '*' characters to match any character zero or more times (including folder seperators '/' or '\'), while escaping all other characters. The supported matching values are

      • '*' Matches any characters zero or more times (including folder seperators ''/' or '\')
      -

      Parameters

      • value: string

        The value to be converted into a RegExp, if the value is not a string it will coerced +

        Parameters

        • value: string

          The value to be converted into a RegExp, if the value is not a string it will coerced to a string.

          -
        • Optional ignoreCase: boolean

          Flag to indicate whether the regular expression should be case-sensitive, Defaults +

        • Optional ignoreCase: boolean

          Flag to indicate whether the regular expression should be case-sensitive, Defaults to false.

          -
        • Optional fullMatch: boolean

          Flag to identify whether the RegExp should be wrapped with '^' and '$' to +

        • Optional fullMatch: boolean

          Flag to identify whether the RegExp should be wrapped with '^' and '$' to incidate match the entire string only.

        Returns RegExp

        The new Regular Expression created from the provided value.

        Since

        0.9.0

        Example

        let regex = createWildcardRegex("Hello*");

        let matches = regex.exec("Hello");
        matches[0]; // "Hello";
        matches[1]; // ""

        let matches = regex.exec("Hello Darkness");
        matches[0]; // "Hello Darkness"
        matches[1]; // " Darkness"

        let matches = regex.exec("Darkness Hello");
        matches[0]; // "Hello"
        matches[1]; // ""

        let regex.exec("Darkness Hello.");
        matches[0]; // "Hello."
        matches[1]; // "."
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/dateDeepCopyHandler.html b/docs/typedoc/functions/dateDeepCopyHandler.html index 30b93e11..579539fe 100644 --- a/docs/typedoc/functions/dateDeepCopyHandler.html +++ b/docs/typedoc/functions/dateDeepCopyHandler.html @@ -1,5 +1,5 @@ -dateDeepCopyHandler | @nevware21/ts-utils

Function dateDeepCopyHandler

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/deepExtend.html b/docs/typedoc/functions/deepExtend.html index 331e4de4..483fce2a 100644 --- a/docs/typedoc/functions/deepExtend.html +++ b/docs/typedoc/functions/deepExtend.html @@ -1,8 +1,8 @@ -deepExtend | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/dumpObj.html b/docs/typedoc/functions/dumpObj.html index 704944e2..e30faca8 100644 --- a/docs/typedoc/functions/dumpObj.html +++ b/docs/typedoc/functions/dumpObj.html @@ -1,6 +1,6 @@ -dumpObj | @nevware21/ts-utils
  • Returns string representation of an object suitable for diagnostics logging.

    -

    Parameters

    • object: any

      The object to be converted to a diagnostic string value

      -
    • Optional format: number | boolean

      Identifies whether the JSON value should be formated

      +dumpObj | @nevware21/ts-utils
      • Returns string representation of an object suitable for diagnostics logging.

        +

        Parameters

        • object: any

          The object to be converted to a diagnostic string value

          +
        • Optional format: number | boolean

          Identifies whether the JSON value should be formated

          • true - Format with 4 spaces
          • 'number' - The number of spaces to format with
          • @@ -10,4 +10,4 @@

            Example

            let obj = { a: 1, b: "Hello", c: { d: 2, e: "Darkness" } };

            let objStr = dumpObj(obj);
            // objStr === "[object Object]: { a: 1, b: "Hello", c: { d: 2, e: "Darkness" } }"

            let objStrFmt = dumpObj(obj, true);
            // objStrFmt === "[object Object]: {\n a: 1,\n b: "Hello",\n c: {\n d: 2,\n e: "Darkness"\n }\n}"

            let objStrFmt2 = dumpObj(obj, 2);
            // objStrFmt2 === "[object Object]: {\n a: 1,\n b: "Hello",\n c: {\n d: 2,\n e: "Darkness"\n }\n}"

            let objStrFmt3 = dumpObj(obj, 0);
            // objStrFmt3 === "[object Object]: { a: 1, b: "Hello", c: { d: 2, e: "Darkness" } }"

            let objStrFmt4 = dumpObj(obj, false);
            // objStrFmt4 === "[object Object]: { a: 1, b: "Hello", c: { d: 2, e: "Darkness" } }"

            let objStrFmt5 = dumpObj(obj, null);
            // objStrFmt5 === "[object Object]: { a: 1, b: "Hello", c: { d: 2, e: "Darkness" } }"

            let objStrFmt6 = dumpObj(obj, undefined);
            // objStrFmt6 === "[object Object]: { a: 1, b: "Hello", c: { d: 2, e: "Darkness" } }"

            let objStrFmt7 = dumpObj(obj, "");
            // objStrFmt7 === "[object Object]: { a: 1, b: "Hello", c: { d: 2, e: "Darkness" } }"

            let err = new Error("Hello Darkness");
            let errStr = dumpObj(err);
            // errStr === "[object Error]: { stack: 'Error: Hello Darkness\n at <anonymous>:1:13', message: 'Hello Darkness', name: 'Error'"

            let errStrFmt = dumpObj(err, true);
            // errStrFmt === "[object Error]: {\n stack: "Error: Hello Darkness\n at <anonymous>:1:13",\n message: "Hello Darkness",\n name: "Error"\n}"

            let errStrFmt2 = dumpObj(err, 2);
            // errStrFmt2 === "[object Error]: {\n stack: "Error: Hello Darkness\n at <anonymous>:1:13",\n message: "Hello Darkness",\n name: "Error"\n}"

            let errStrFmt3 = dumpObj(err, 0);
            // errStrFmt3 === "[object Error]: { stack: "Error: Hello Darkness\n at <anonymous>:1:13", message: "Hello Darkness", name: "Error" }"

            See

            dumpObj

            -

      Generated using TypeDoc

      \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/elapsedTime.html b/docs/typedoc/functions/elapsedTime.html index cb196363..ab68555e 100644 --- a/docs/typedoc/functions/elapsedTime.html +++ b/docs/typedoc/functions/elapsedTime.html @@ -1,9 +1,9 @@ -elapsedTime | @nevware21/ts-utils

Function elapsedTime

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/encodeAsHtml.html b/docs/typedoc/functions/encodeAsHtml.html index f8efe1bf..c5b503ed 100644 --- a/docs/typedoc/functions/encodeAsHtml.html +++ b/docs/typedoc/functions/encodeAsHtml.html @@ -1,8 +1,8 @@ -encodeAsHtml | @nevware21/ts-utils

Function encodeAsHtml

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/encodeAsJson.html b/docs/typedoc/functions/encodeAsJson.html index f594cc40..40ea8120 100644 --- a/docs/typedoc/functions/encodeAsJson.html +++ b/docs/typedoc/functions/encodeAsJson.html @@ -1,10 +1,10 @@ -encodeAsJson | @nevware21/ts-utils

Function encodeAsJson

  • Encode the value into a JSON string, if the provided value is a string this will encode +encodeAsJson | @nevware21/ts-utils

    Function encodeAsJson

    • Encode the value into a JSON string, if the provided value is a string this will encode any character that is not an alpha, numeric, space or some special characters as \uXXXX and will always be returned wrapped in double quotes "xxx", if the value is any other object it will be encoded using JSON.stringify() and if there is an exception encoding with JSON.stringify() it will return the exception as a string using dumpObj().

      -

      Type Parameters

      • T

      Parameters

      • value: T

        The value to be encoded as JSON

        -
      • Optional format: number | boolean

        Identifies whether the JSON value should be formatted when an object

        +

        Type Parameters

        • T

        Parameters

        • value: T

          The value to be encoded as JSON

          +
        • Optional format: number | boolean

          Identifies whether the JSON value should be formatted when an object

          • true - Format with 4 spaces
          • 'number' - The number of spaces to format with
          • @@ -14,4 +14,4 @@

            Since

            0.9.0

            Example

            // String values
            encodeAsJson("abc.123"); // "\"abc.123\""
            encodeAsJson("321-abc"); // "\"321-abc\""
            encodeAsJson("Hello darkness, my \"old\" friend..."); // "\"Hello darkness, my \\\"old\\\" friend...\""
            encodeAsJson("Hello: Darkness"); // "\"Hello: Darkness\""
            encodeAsJson("Hello\\u003A Darkness"); // "\"Hello\\\\u003A Darkness\""
            encodeAsJson("`!@#$%^&*()_-+=[]{}:;'<>?"); // "\"\\u0060!@#$%^&*()_-+=[]{}:;\\u0027<>?\""
            encodeAsJson("0"); // "\"0\""
            encodeAsJson("1"); // "\"1\""

            encodeAsJson([]); // "[]"
            encodeAsJson(["A"]); // "[\"A\"]"
            encodeAsJson([0]); // "[0]"
            encodeAsJson([false]); // "[false]"
            encodeAsJson(new Array(1)); // "[null]"
            encodeAsJson(true); // "true",
            encodeAsJson(false); // "false"

            encodeAsJson({}); // "{}"
            encodeAsJson({ Hello: "Darkness" }); // "{\"Hello\":\"Darkness\"}");
            -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/fnApply.html b/docs/typedoc/functions/fnApply.html index 75e417f0..dade1f3c 100644 --- a/docs/typedoc/functions/fnApply.html +++ b/docs/typedoc/functions/fnApply.html @@ -1,4 +1,4 @@ -fnApply | @nevware21/ts-utils
  • The fnApply function calls the specified fn function with the given thisArg as the this value, +fnApply | @nevware21/ts-utils

    • The fnApply function calls the specified fn function with the given thisArg as the this value, and the optional argArray arguments provided as an array (or an Array-Like Object).

      Normally, when calling a function, the value of this inside the function is the object that the function was accessed on. With fnApply(), you can assign an arbitrary value as this when calling an @@ -8,13 +8,13 @@ that it needs to have a length property, and integer ("index") properties in the range (0..length - 1). For example, you could use a NodeList, or a custom object like { 'length': 2, '0': 'eat', '1': 'bananas' }. You can also use arguments.

      -

      Type Parameters

      • F extends ((...args) => any)

      • T

      Parameters

      • fn: F

        The function to be called

        -
      • thisArg: T

        The value of this provided for the call to fn. If the function is not in strict mode, +

        Type Parameters

        • F extends ((...args) => any)
        • T

        Parameters

        • fn: F

          The function to be called

          +
        • thisArg: T

          The value of this provided for the call to fn. If the function is not in strict mode, null and undefined will be replaced with the global object, and primitive values will be converted to objects.

          -
        • Optional argArray: ArrayLike<any>

          An array-like object, specifying the arguments with which fn should be called, or null or +

        • Optional argArray: ArrayLike<any>

          An array-like object, specifying the arguments with which fn should be called, or null or undefined if no arguments should be provided to the function.

        Returns ReturnType<F>

        The result of calling the function with the specified this value and arguments.

        Since

        0.9.8

        Example

        // min / max number in an array
        let max = fnApply(Math.max, null, [ 21, 42, 84, 168, 7, 3 ]);
        // 168

        let min = fnApply(Math.min, null, [ 21, 42, 84, 168, 7, 3 ]);
        // 3

        const module1 = {
        prefix: "Hello",
        x: 21,
        getX() {
        return this.x;
        },
        log(value: string) {
        return this.prefix + " " + value + " : " + this.x
        }
        };

        // The 'this' parameter of 'getX' is bound to 'module'.
        module1.getX(); // 21
        module1.log("Darkness"); // Hello Darkness : 21

        // Create a new function 'boundGetX' with the 'this' parameter bound to 'module'.
        let module2 = {
        prefix: "my",
        x: 42
        };

        // Call the function of module1 with module2 as it's this
        fnApply(module1.getX, module2); // 42
        fnApply(module1.log, module2, [ "friend" ]); // my friend : 42
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/fnBind.html b/docs/typedoc/functions/fnBind.html index 85339fca..fb8efee4 100644 --- a/docs/typedoc/functions/fnBind.html +++ b/docs/typedoc/functions/fnBind.html @@ -1,10 +1,10 @@ -fnBind | @nevware21/ts-utils
  • Creates a new function that when called will set the value of thisArg as the this keyword +fnBind | @nevware21/ts-utils

    • Creates a new function that when called will set the value of thisArg as the this keyword value whrn calling the provided fn instance, and all of the arguments passed to the new function will be passed along to the original provided instance.

      -

      Type Parameters

      • F extends Function

      • T

      Parameters

      • fn: F

        The function instance to be called

        -
      • thisArg: T

        The value to be used as the this when calling the fn

        -

      Returns F

      The value returned by the original fn after executing with the provided thisArg.

      +

    Type Parameters

    • F extends Function
    • T

    Parameters

    • fn: F

      The function instance to be called

      +
    • thisArg: T

      The value to be used as the this when calling the fn

      +
    • Rest ...argArray: any[]

    Returns F

    The value returned by the original fn after executing with the provided thisArg.

    Since

    0.9.8

    Example

    const module1 = {
    x: 21,
    getX() {
    return this.x;
    },
    };

    // The 'this' parameter of 'getX' is bound to 'module'.
    console.log(module1.getX()); // 21

    // Create a new function 'boundGetX' with the 'this' parameter bound to 'module'.
    let module2 = {
    x: 42
    };

    module2.getX = fnBind(module1.getX, module2);
    module2.getX(); // 42

    // It can also be used to proxy to the original function from the new one
    module2.getX = fnBind(module1.getX, module1);
    module2.getX(); // 21
    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/fnCall.html b/docs/typedoc/functions/fnCall.html index 2401adc5..0ed96039 100644 --- a/docs/typedoc/functions/fnCall.html +++ b/docs/typedoc/functions/fnCall.html @@ -1,4 +1,4 @@ -fnCall | @nevware21/ts-utils
  • The fnCall function calls the function with the given thisArg as the this value and with +fnCall | @nevware21/ts-utils

    • The fnCall function calls the function with the given thisArg as the this value and with al of the _args provided as it's `arguments.

      This is almost identical to fnApply, except that the function arguments are passed to fnCall @@ -15,6 +15,6 @@ null and undefined will be replaced with the global object, and primitive values will be converted to objects. @param _args - The zero or more arguments to be passed to the fn function. @returns The result of calling the function with the specified this value and arguments.

      -

      Type Parameters

      • F extends ((...args) => any)

      • T

      Parameters

      • fn: F
      • thisArg: T
      • Rest ..._args: any[]

      Returns ReturnType<F>

      Example

      // min / max number in an array
      let max = fnCall(Math.max, null, 21, 42, 84, 168, 7, 3);
      // 168

      let min = fnCall(Math.min, null, 21, 42, 84, 168, 7, 3);
      // 3

      const module1 = {
      prefix: "Hello",
      x: 21,
      getX() {
      return this.x;
      },
      log(value: string) {
      return this.prefix + " " + value + " : " + this.x
      }
      };

      // The 'this' parameter of 'getX' is bound to 'module'.
      module1.getX(); // 21
      module1.log("Darkness"); // Hello Darkness : 21

      // Create a new function 'boundGetX' with the 'this' parameter bound to 'module'.
      let module2 = {
      prefix: "my",
      x: 42
      };

      // Call the function of module1 with module2 as it's this
      fnCall(module1.getX, module2); // 42
      fnCall(module1.log, module2, "friend"); // my friend : 42 +

      Type Parameters

      • F extends ((...args) => any)
      • T

      Parameters

      • fn: F
      • thisArg: T
      • Rest ...argArray: any[]

      Returns ReturnType<F>

      Example

      // min / max number in an array
      let max = fnCall(Math.max, null, 21, 42, 84, 168, 7, 3);
      // 168

      let min = fnCall(Math.min, null, 21, 42, 84, 168, 7, 3);
      // 3

      const module1 = {
      prefix: "Hello",
      x: 21,
      getX() {
      return this.x;
      },
      log(value: string) {
      return this.prefix + " " + value + " : " + this.x
      }
      };

      // The 'this' parameter of 'getX' is bound to 'module'.
      module1.getX(); // 21
      module1.log("Darkness"); // Hello Darkness : 21

      // Create a new function 'boundGetX' with the 'this' parameter bound to 'module'.
      let module2 = {
      prefix: "my",
      x: 42
      };

      // Call the function of module1 with module2 as it's this
      fnCall(module1.getX, module2); // 42
      fnCall(module1.log, module2, "friend"); // my friend : 42
      -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/functionDeepCopyHandler.html b/docs/typedoc/functions/functionDeepCopyHandler.html index 2e9da37d..8f57800e 100644 --- a/docs/typedoc/functions/functionDeepCopyHandler.html +++ b/docs/typedoc/functions/functionDeepCopyHandler.html @@ -1,6 +1,6 @@ -functionDeepCopyHandler | @nevware21/ts-utils

Function functionDeepCopyHandler

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/getDocument.html b/docs/typedoc/functions/getDocument.html index e08a4036..5ff3a7d9 100644 --- a/docs/typedoc/functions/getDocument.html +++ b/docs/typedoc/functions/getDocument.html @@ -1,2 +1,2 @@ -getDocument | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file +getDocument | @nevware21/ts-utils

Function getDocument

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/getGlobal.html b/docs/typedoc/functions/getGlobal.html index 81673d40..f74797ba 100644 --- a/docs/typedoc/functions/getGlobal.html +++ b/docs/typedoc/functions/getGlobal.html @@ -1,4 +1,4 @@ -getGlobal | @nevware21/ts-utils

Returns Window

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/getHistory.html b/docs/typedoc/functions/getHistory.html index adb5976f..3d1039bb 100644 --- a/docs/typedoc/functions/getHistory.html +++ b/docs/typedoc/functions/getHistory.html @@ -1,2 +1,2 @@ -getHistory | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file +getHistory | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/getInst.html b/docs/typedoc/functions/getInst.html index 48995a3e..a09b9cbe 100644 --- a/docs/typedoc/functions/getInst.html +++ b/docs/typedoc/functions/getInst.html @@ -1,7 +1,7 @@ -getInst | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/getIntValue.html b/docs/typedoc/functions/getIntValue.html index 86e16150..2d33d24d 100644 --- a/docs/typedoc/functions/getIntValue.html +++ b/docs/typedoc/functions/getIntValue.html @@ -1,7 +1,7 @@ -getIntValue | @nevware21/ts-utils

Function getIntValue

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/getKnownSymbol.html b/docs/typedoc/functions/getKnownSymbol.html index 7ab97939..8caa0fd5 100644 --- a/docs/typedoc/functions/getKnownSymbol.html +++ b/docs/typedoc/functions/getKnownSymbol.html @@ -1,8 +1,8 @@ -getKnownSymbol | @nevware21/ts-utils

Function getKnownSymbol

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/getLazy.html b/docs/typedoc/functions/getLazy.html index f5da818d..153c1b0a 100644 --- a/docs/typedoc/functions/getLazy.html +++ b/docs/typedoc/functions/getLazy.html @@ -1,10 +1,10 @@ -getLazy | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/getLength.html b/docs/typedoc/functions/getLength.html index a0bbb315..0e57cd91 100644 --- a/docs/typedoc/functions/getLength.html +++ b/docs/typedoc/functions/getLength.html @@ -1,7 +1,7 @@ -getLength | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/getNavigator.html b/docs/typedoc/functions/getNavigator.html index fe5b0497..342b1f41 100644 --- a/docs/typedoc/functions/getNavigator.html +++ b/docs/typedoc/functions/getNavigator.html @@ -1,2 +1,2 @@ -getNavigator | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file +getNavigator | @nevware21/ts-utils

Function getNavigator

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/getPerformance.html b/docs/typedoc/functions/getPerformance.html index 0d4ba8ea..9ac1900e 100644 --- a/docs/typedoc/functions/getPerformance.html +++ b/docs/typedoc/functions/getPerformance.html @@ -1,7 +1,7 @@ -getPerformance | @nevware21/ts-utils

Function getPerformance

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/getSymbol.html b/docs/typedoc/functions/getSymbol.html index eb3e926f..150986e5 100644 --- a/docs/typedoc/functions/getSymbol.html +++ b/docs/typedoc/functions/getSymbol.html @@ -1,3 +1,3 @@ -getSymbol | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/getValueByIter.html b/docs/typedoc/functions/getValueByIter.html index 33826617..73625ded 100644 --- a/docs/typedoc/functions/getValueByIter.html +++ b/docs/typedoc/functions/getValueByIter.html @@ -1,15 +1,15 @@ -getValueByIter | @nevware21/ts-utils

Function getValueByIter

  • Get the named value from the target object where the path is represented by the string iterator +getValueByIter | @nevware21/ts-utils

    Function getValueByIter

    • Get the named value from the target object where the path is represented by the string iterator or iterable to separate the nested objects of the heirarchy / path to the value. If the target does not contain the full path the iterator will not be completed.

      The order of processing of the iterator is not reset if you add or remove elements to the iterator, the actual behavior will depend on the iterator imeplementation.

      If the passed iter is both an Iterable and Iterator the Iterator interface takes preceedence.

      -

      Type Parameters

      • V

      • T extends object = any

      Parameters

      • target: T

        The source object that contains the value

        -
      • iter: Iterator<string, any, undefined> | Iterable<string>

        The iter identifying the path of the final key value

        -
      • Optional defValue: V

        If the final value or any intervening object in the heirarchy is not present +

        Type Parameters

        • V
        • T extends object = any

        Parameters

        • target: T

          The source object that contains the value

          +
        • iter: Iterator<string, any, undefined> | Iterable<string>

          The iter identifying the path of the final key value

          +
        • Optional defValue: V

          If the final value or any intervening object in the heirarchy is not present the default value will be returned

        Returns V

        The value located based on the path or the defaule value

        Since

        0.9.1

        Example

        let theValue = {
        Hello: {
        Darkness: {
        my: "old"
        }
        },
        friend: "I've",
        come: {
        to: {
        see: "you"
        }
        }
        };

        let value = getValueByKey(theValue, ["Hello", "Darkness", "my"], "friend");
        // value === "my"

        let value = getValueByKey(theValue, ["My", "Old"], "friend");
        // value === "friend"

        let value = getValueByKey(theValue, ["come", "to"], "friend");
        // value === { see: "you" }

        let value = getValueByKey(theValue, ["friend"], "friend");
        // value === "I've"
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/getValueByKey.html b/docs/typedoc/functions/getValueByKey.html index ee949882..d0907eee 100644 --- a/docs/typedoc/functions/getValueByKey.html +++ b/docs/typedoc/functions/getValueByKey.html @@ -1,11 +1,11 @@ -getValueByKey | @nevware21/ts-utils

Function getValueByKey

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/getWindow.html b/docs/typedoc/functions/getWindow.html index ebba1854..55a20aff 100644 --- a/docs/typedoc/functions/getWindow.html +++ b/docs/typedoc/functions/getWindow.html @@ -1,2 +1,2 @@ -getWindow | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file +getWindow | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/hasDocument.html b/docs/typedoc/functions/hasDocument.html index b5291a79..55038311 100644 --- a/docs/typedoc/functions/hasDocument.html +++ b/docs/typedoc/functions/hasDocument.html @@ -1,5 +1,5 @@ -hasDocument | @nevware21/ts-utils

Function hasDocument

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/hasHistory.html b/docs/typedoc/functions/hasHistory.html index b684d169..605ab268 100644 --- a/docs/typedoc/functions/hasHistory.html +++ b/docs/typedoc/functions/hasHistory.html @@ -1,2 +1,2 @@ -hasHistory | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file +hasHistory | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/hasIdleCallback.html b/docs/typedoc/functions/hasIdleCallback.html index 7ca4cb42..622e56a2 100644 --- a/docs/typedoc/functions/hasIdleCallback.html +++ b/docs/typedoc/functions/hasIdleCallback.html @@ -1,6 +1,6 @@ -hasIdleCallback | @nevware21/ts-utils

Function hasIdleCallback

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/hasNavigator.html b/docs/typedoc/functions/hasNavigator.html index 77b63f1d..ea6948a7 100644 --- a/docs/typedoc/functions/hasNavigator.html +++ b/docs/typedoc/functions/hasNavigator.html @@ -1,2 +1,2 @@ -hasNavigator | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file +hasNavigator | @nevware21/ts-utils

Function hasNavigator

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/hasPerformance.html b/docs/typedoc/functions/hasPerformance.html index a1fcb7c1..4a43d07c 100644 --- a/docs/typedoc/functions/hasPerformance.html +++ b/docs/typedoc/functions/hasPerformance.html @@ -1,3 +1,3 @@ -hasPerformance | @nevware21/ts-utils

Function hasPerformance

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/hasSymbol.html b/docs/typedoc/functions/hasSymbol.html index 6e41d819..36e97846 100644 --- a/docs/typedoc/functions/hasSymbol.html +++ b/docs/typedoc/functions/hasSymbol.html @@ -1,3 +1,3 @@ -hasSymbol | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/hasValue.html b/docs/typedoc/functions/hasValue.html index 3f1b348f..1d2d14f2 100644 --- a/docs/typedoc/functions/hasValue.html +++ b/docs/typedoc/functions/hasValue.html @@ -1,4 +1,4 @@ -hasValue | @nevware21/ts-utils
  • Return whether the value appears to have any value, this helper returns true for

    +hasValue | @nevware21/ts-utils
    • Return whether the value appears to have any value, this helper returns true for

      • value is not null, undefined or string value of "undefined"
      • value === false
      • @@ -12,7 +12,7 @@
      • If object with at least 1 key of it's own property (hasOwnProperty)
      • else if isTruthy (empty string, etc)
      -

      Parameters

      • value: any

        The value to be checked

        +

        Parameters

        • value: any

          The value to be checked

        Returns boolean

        Example

        // False
        hasValue(null); // false
        hasValue(undefined); // false
        hasValue("undefined"); // false (Special Case)
        hasValue(""); // false -- use: !strIsNullOrEmpty("")
        hasValue([]); // false
        hasValue(/[a-z]/g); // false
        hasValue(new RegExp("")); // false
        hasValue(new ArrayBuffer(0)); // false
        hasValue(new Error("Test Error")); // false
        hasValue(new TypeError("Test TypeError")); // false
        hasValue(new TestError("Test TestError")); // false
        hasValue(Promise.reject()); // false
        hasValue(Promise.resolve()); // false
        hasValue(new Promise(() => {})); // false
        hasValue({}); // false
        hasValue(Object.create(null)); // false
        hasValue(polyObjCreate(null)); // false

        // Objects with length / size property or function
        hasValue({ length: 0 }); // false
        hasValue({ length: () => 0 }); // false
        hasValue({ byteLength: 0 }); // false
        hasValue({ byteLength: () => 0 }); // false
        hasValue({ size: 0 }); // false
        hasValue({ size: () => 0 }); // false
        hasValue({ count: 0 }); // false
        hasValue({ count: undefined as any }); // false
        hasValue({ count: null as any }); // false
        hasValue({ count: () => 0 }); // false
        hasValue({ count: () => undefined as any }); // false
        hasValue({ count: () => null as any }); // false
        hasValue({ valueOf: () => undefined as any});// false
        hasValue({ valueOf: () => null as any }); // false

        // True
        hasValue("null"); // true
        hasValue("0"); // true
        hasValue("1"); // true
        hasValue("aa"); // true
        hasValue(new Date()); // true
        hasValue(0); // true
        hasValue(1); // true
        hasValue(_dummyFunction); // true
        hasValue(["A"]); // true
        hasValue([0]); // true
        hasValue([false]); // true
        hasValue(new Array(1)); // true
        hasValue(true); // true
        hasValue(false); // true
        hasValue("true"); // true
        hasValue("false"); // true
        hasValue((/[a-z]/g).exec("hello")); // true
        hasValue(new ArrayBuffer(1)); // true
        hasValue(_dummyError()); // true
        hasValue(_simplePromise()); // true
        hasValue(_simplePromiseLike()); // true

        // Boolean objects
        hasValue(new Boolean(true)); // true
        hasValue(new Boolean(false)); // true
        hasValue(new Boolean("true")); // true
        hasValue(new Boolean("false")); // true
        hasValue(new Boolean("0")); // true
        hasValue(new Boolean(0)); // true
        hasValue(new Boolean("1")); // true
        hasValue(new Boolean(1)); // true

        // Boolean values
        hasValue(Boolean(true)); // true
        hasValue(Boolean(false)); // true
        hasValue(Boolean("true")); // true
        hasValue(Boolean("false")); // true
        hasValue(Boolean("0")); // true
        hasValue(Boolean(0)); // true
        hasValue(Boolean("1")); // true
        hasValue(Boolean(1)); // true

        // Objects with length / size property or function
        hasValue({ length: 1 }); // true
        hasValue({ length: () => 1 }); // true
        hasValue({ byteLength: 1 }); // true
        hasValue({ byteLength: () => 1 }); // true
        hasValue({ size: 1 }); // true
        hasValue({ size: () => 1 }); // true
        hasValue({ count: 1 }); // true
        hasValue({ count: () => 1 }); // true
        hasValue({ valueOf: () => 0 }); // true
        hasValue({ valueOf: () => 1 }); // true
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/hasWindow.html b/docs/typedoc/functions/hasWindow.html index b729a260..70e2ad7b 100644 --- a/docs/typedoc/functions/hasWindow.html +++ b/docs/typedoc/functions/hasWindow.html @@ -1,2 +1,2 @@ -hasWindow | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file +hasWindow | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isArray.html b/docs/typedoc/functions/isArray.html index b8cf3408..9a480735 100644 --- a/docs/typedoc/functions/isArray.html +++ b/docs/typedoc/functions/isArray.html @@ -1,5 +1,5 @@ -isArray | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isArrayBuffer.html b/docs/typedoc/functions/isArrayBuffer.html index d8e1ad51..2428afe0 100644 --- a/docs/typedoc/functions/isArrayBuffer.html +++ b/docs/typedoc/functions/isArrayBuffer.html @@ -1,4 +1,4 @@ -isArrayBuffer | @nevware21/ts-utils

Function isArrayBuffer

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isBlob.html b/docs/typedoc/functions/isBlob.html index 8404cd46..b2aadfcd 100644 --- a/docs/typedoc/functions/isBlob.html +++ b/docs/typedoc/functions/isBlob.html @@ -1,4 +1,4 @@ -isBlob | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isBoolean.html b/docs/typedoc/functions/isBoolean.html index ee52d3bf..6cf79df4 100644 --- a/docs/typedoc/functions/isBoolean.html +++ b/docs/typedoc/functions/isBoolean.html @@ -1,4 +1,4 @@ -isBoolean | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isDate.html b/docs/typedoc/functions/isDate.html index dcebdd5a..f33f3a89 100644 --- a/docs/typedoc/functions/isDate.html +++ b/docs/typedoc/functions/isDate.html @@ -1,4 +1,4 @@ -isDate | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isDefined.html b/docs/typedoc/functions/isDefined.html index dccc0cfa..dc7d9c3f 100644 --- a/docs/typedoc/functions/isDefined.html +++ b/docs/typedoc/functions/isDefined.html @@ -1,7 +1,7 @@ -isDefined | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isError.html b/docs/typedoc/functions/isError.html index cec80560..ba7f7488 100644 --- a/docs/typedoc/functions/isError.html +++ b/docs/typedoc/functions/isError.html @@ -1,4 +1,4 @@ -isError | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isFile.html b/docs/typedoc/functions/isFile.html index bb4248d1..4bc46aea 100644 --- a/docs/typedoc/functions/isFile.html +++ b/docs/typedoc/functions/isFile.html @@ -1,4 +1,4 @@ -isFile | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isFormData.html b/docs/typedoc/functions/isFormData.html index 3f6561e3..fed19221 100644 --- a/docs/typedoc/functions/isFormData.html +++ b/docs/typedoc/functions/isFormData.html @@ -1,4 +1,4 @@ -isFormData | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isFunction.html b/docs/typedoc/functions/isFunction.html index ef191ccb..8053dbfe 100644 --- a/docs/typedoc/functions/isFunction.html +++ b/docs/typedoc/functions/isFunction.html @@ -1,5 +1,5 @@ -isFunction | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isIterable.html b/docs/typedoc/functions/isIterable.html index d455851a..18628c32 100644 --- a/docs/typedoc/functions/isIterable.html +++ b/docs/typedoc/functions/isIterable.html @@ -1,8 +1,8 @@ -isIterable | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isIterator.html b/docs/typedoc/functions/isIterator.html index ce5d8e2c..89ab8a55 100644 --- a/docs/typedoc/functions/isIterator.html +++ b/docs/typedoc/functions/isIterator.html @@ -1,8 +1,8 @@ -isIterator | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isNode.html b/docs/typedoc/functions/isNode.html index 69ce2932..1c522553 100644 --- a/docs/typedoc/functions/isNode.html +++ b/docs/typedoc/functions/isNode.html @@ -1,3 +1,3 @@ -isNode | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isNotTruthy.html b/docs/typedoc/functions/isNotTruthy.html index 54471a81..1df2ba6f 100644 --- a/docs/typedoc/functions/isNotTruthy.html +++ b/docs/typedoc/functions/isNotTruthy.html @@ -1,5 +1,5 @@ -isNotTruthy | @nevware21/ts-utils

Function isNotTruthy

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isNullOrUndefined.html b/docs/typedoc/functions/isNullOrUndefined.html index b9b64403..3f28bbaa 100644 --- a/docs/typedoc/functions/isNullOrUndefined.html +++ b/docs/typedoc/functions/isNullOrUndefined.html @@ -1,6 +1,6 @@ -isNullOrUndefined | @nevware21/ts-utils

Function isNullOrUndefined

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isNumber.html b/docs/typedoc/functions/isNumber.html index 24377c3f..0094ef8d 100644 --- a/docs/typedoc/functions/isNumber.html +++ b/docs/typedoc/functions/isNumber.html @@ -1,4 +1,4 @@ -isNumber | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isObject.html b/docs/typedoc/functions/isObject.html index dbef2acf..8cda48bb 100644 --- a/docs/typedoc/functions/isObject.html +++ b/docs/typedoc/functions/isObject.html @@ -1,4 +1,4 @@ -isObject | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file +isObject | @nevware21/ts-utils
  • Checks to see if the past value is an object value

    +

    Type Parameters

    • T

      The object type, defaults to any

      +

    Parameters

    • value: T

      The value to check

      +

    Returns value is T

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isPlainObject.html b/docs/typedoc/functions/isPlainObject.html index e3267597..eec346e1 100644 --- a/docs/typedoc/functions/isPlainObject.html +++ b/docs/typedoc/functions/isPlainObject.html @@ -1,9 +1,9 @@ -isPlainObject | @nevware21/ts-utils

Function isPlainObject

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isPrimitive.html b/docs/typedoc/functions/isPrimitive.html index a29c7c82..9f23d0ac 100644 --- a/docs/typedoc/functions/isPrimitive.html +++ b/docs/typedoc/functions/isPrimitive.html @@ -1,4 +1,4 @@ -isPrimitive | @nevware21/ts-utils

Function isPrimitive

  • Identifies whether the provided value is a JavaScript primitive +isPrimitive | @nevware21/ts-utils

    Function isPrimitive

    • Identifies whether the provided value is a JavaScript primitive which is when is it not an object and has no methods or properties. There are 7 primitive data types:

      • string
      • @@ -14,8 +14,8 @@ with a variable assigned a primitive value. The variable may be reassigned to a new value, but the existing value can not be changed in the ways that objects, arrays, and functions can be altered. The language does not offer utilities to mutate primitive values.

        -

      Parameters

      • value: any

        The value to check whether it's a primitive value

        +

        Parameters

        • value: any

          The value to check whether it's a primitive value

        Returns value is string | number | bigint | boolean | symbol

        Since

        0.4.4

        Example

        isPrimitive(null);                   // true
        isPrimitive(undefined); // true
        isPrimitive("null"); // true
        isPrimitive("undefined"); // true
        isPrimitive("1"); // true
        isPrimitive("aa"); // true
        isPrimitive(1); // true
        isPrimitive(Number(2)); // true
        isPrimitive(""); // true
        isPrimitive(String("")); // true
        isPrimitive(true); // true
        isPrimitive(false); // true
        isPrimitive("true"); // true
        isPrimitive("false"); // true
        isPrimitive(BigInt(42)); // true
        isPrimitive(Symbol.for("Hello")); // true

        isPrimitive(new String("aa")); // false
        isPrimitive(new Date()); // false
        isPrimitive(_dummyFunction); // false
        isPrimitive([]); // false
        isPrimitive(new Array(1)); // false
        isPrimitive(new Boolean(true)); // false
        isPrimitive(new Boolean(false)); // false
        isPrimitive(new Boolean("true")); // false
        isPrimitive(new Boolean("false")); // false
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isPrimitiveType.html b/docs/typedoc/functions/isPrimitiveType.html index 4e104efd..2574440c 100644 --- a/docs/typedoc/functions/isPrimitiveType.html +++ b/docs/typedoc/functions/isPrimitiveType.html @@ -1,4 +1,4 @@ -isPrimitiveType | @nevware21/ts-utils

Function isPrimitiveType

  • Identifies whether the provided value is a JavaScript primitive +isPrimitiveType | @nevware21/ts-utils

    Function isPrimitiveType

    • Identifies whether the provided value is a JavaScript primitive which is when is it not an object and has no methods or properties. There are 6 primitive data types:

      • string
      • @@ -13,9 +13,9 @@ with a variable assigned a primitive value. The variable may be reassigned to a new value, but the existing value can not be changed in the ways that objects, arrays, and functions can be altered. The language does not offer utilities to mutate primitive values.

        -

      Parameters

      • theType: string

        The type as a string value to be checked whther it's a primitive type, this should be the value +

        Parameters

        • theType: string

          The type as a string value to be checked whther it's a primitive type, this should be the value returned from typeof value.

        Returns boolean

        Since

        0.9.6

        Example

        isPrimitiveType(null);                   // false
        isPrimitiveType(undefined); // false
        isPrimitiveType("null"); // false
        isPrimitiveType("undefined"); // false
        isPrimitiveType("1"); // false
        isPrimitiveType("aa"); // false
        isPrimitiveType(1); // false
        isPrimitiveType(Number(2)); // false
        isPrimitiveType(""); // false
        isPrimitiveType(String("")); // false
        isPrimitiveType(true); // false
        isPrimitiveType(false); // false
        isPrimitiveType("true"); // false
        isPrimitiveType("false"); // false
        isPrimitiveType(BigInt(42)); // false
        isPrimitiveType(Symbol.for("Hello")); // false

        isPrimitiveType("string"); // true
        isPrimitiveType("number"); // true
        isPrimitiveType("boolean"); // true
        isPrimitiveType("undefined"); // true
        isPrimitiveType("symbol"); // true
        isPrimitiveType("bigint"); // true
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isPromise.html b/docs/typedoc/functions/isPromise.html index 7d3de8b0..736a540a 100644 --- a/docs/typedoc/functions/isPromise.html +++ b/docs/typedoc/functions/isPromise.html @@ -1,4 +1,4 @@ -isPromise | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isPromiseLike.html b/docs/typedoc/functions/isPromiseLike.html index d19f8f0b..7eb2510e 100644 --- a/docs/typedoc/functions/isPromiseLike.html +++ b/docs/typedoc/functions/isPromiseLike.html @@ -1,4 +1,4 @@ -isPromiseLike | @nevware21/ts-utils

Function isPromiseLike

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isRegExp.html b/docs/typedoc/functions/isRegExp.html index 908d7788..2da27a48 100644 --- a/docs/typedoc/functions/isRegExp.html +++ b/docs/typedoc/functions/isRegExp.html @@ -1,4 +1,4 @@ -isRegExp | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isStrictNullOrUndefined.html b/docs/typedoc/functions/isStrictNullOrUndefined.html index 28a3f1e1..a63dfaa4 100644 --- a/docs/typedoc/functions/isStrictNullOrUndefined.html +++ b/docs/typedoc/functions/isStrictNullOrUndefined.html @@ -1,6 +1,6 @@ -isStrictNullOrUndefined | @nevware21/ts-utils

Function isStrictNullOrUndefined

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isStrictUndefined.html b/docs/typedoc/functions/isStrictUndefined.html index de1db5fa..4f766f4d 100644 --- a/docs/typedoc/functions/isStrictUndefined.html +++ b/docs/typedoc/functions/isStrictUndefined.html @@ -1,7 +1,7 @@ -isStrictUndefined | @nevware21/ts-utils

Function isStrictUndefined

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isString.html b/docs/typedoc/functions/isString.html index 77c2b950..0495aee8 100644 --- a/docs/typedoc/functions/isString.html +++ b/docs/typedoc/functions/isString.html @@ -1,5 +1,5 @@ -isString | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isSymbol.html b/docs/typedoc/functions/isSymbol.html index b2456a47..261c7492 100644 --- a/docs/typedoc/functions/isSymbol.html +++ b/docs/typedoc/functions/isSymbol.html @@ -1,4 +1,4 @@ -isSymbol | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isThenable.html b/docs/typedoc/functions/isThenable.html index 9ef09666..109bb25c 100644 --- a/docs/typedoc/functions/isThenable.html +++ b/docs/typedoc/functions/isThenable.html @@ -1,5 +1,5 @@ -isThenable | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isTruthy.html b/docs/typedoc/functions/isTruthy.html index 78e083f2..5b46fa10 100644 --- a/docs/typedoc/functions/isTruthy.html +++ b/docs/typedoc/functions/isTruthy.html @@ -1,5 +1,5 @@ -isTruthy | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isTypeof.html b/docs/typedoc/functions/isTypeof.html index 26b0401f..1cf6c4f1 100644 --- a/docs/typedoc/functions/isTypeof.html +++ b/docs/typedoc/functions/isTypeof.html @@ -1,5 +1,5 @@ -isTypeof | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isUndefined.html b/docs/typedoc/functions/isUndefined.html index c7517a92..8fc1e2a7 100644 --- a/docs/typedoc/functions/isUndefined.html +++ b/docs/typedoc/functions/isUndefined.html @@ -1,7 +1,7 @@ -isUndefined | @nevware21/ts-utils

Function isUndefined

  • Checks if the provided value is undefined or contains the string value "undefined", +isUndefined | @nevware21/ts-utils

    Function isUndefined

    • Checks if the provided value is undefined or contains the string value "undefined", if you want to consider the string value as undefined see isStrictUndefined

      -

      Parameters

      • value: any

        The value to check

        +

        Parameters

        • value: any

          The value to check

        Returns boolean

        true if the value is undefined or "undefined", otherwise false

        Example

        isUndefined(undefined);              // true
        isUndefined("undefined"); // true

        isUndefined(null); // false
        isUndefined("null"); // false
        isUndefined("1"); // false
        isUndefined("aa"); // false
        isUndefined(new Date()); // false
        isUndefined(1); // false
        isUndefined(""); // false
        isUndefined(_dummyFunction); // false
        isUndefined([]); // false
        isUndefined(new Array(1)); // false
        isUndefined(true); // false
        isUndefined(false); // false
        isUndefined("true"); // false
        isUndefined("false"); // false
        isUndefined(new Boolean(true)); // false
        isUndefined(new Boolean(false)); // false
        isUndefined(new Boolean("true")); // false
        isUndefined(new Boolean("false")); // false
        isUndefined(Boolean(true)); // false
        isUndefined(Boolean(false)); // false
        isUndefined(Boolean("true")); // false
        isUndefined(Boolean("false")); // false
        isUndefined(new RegExp("")); // false
        isUndefined(new ArrayBuffer(0)); // false
        isUndefined(new Error("Test Error"));// false
        isUndefined(new TypeError("Test TypeError")); // false
        isUndefined(new TestError("Test TestError")); // false
        isUndefined(_dummyError()); // false
        isUndefined(Promise.reject()); // false
        isUndefined(Promise.resolve()); // false
        isUndefined(new Promise(() => {})); // false
        isUndefined(_simplePromise()); // false
        isUndefined(_simplePromiseLike()); // false
        isUndefined(Object.create(null)); // false
        isUndefined(polyObjCreate(null)); // false
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/isWebWorker.html b/docs/typedoc/functions/isWebWorker.html index c0e4a00f..cea7cc1b 100644 --- a/docs/typedoc/functions/isWebWorker.html +++ b/docs/typedoc/functions/isWebWorker.html @@ -1,3 +1,3 @@ -isWebWorker | @nevware21/ts-utils

Function isWebWorker

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/iterForOf.html b/docs/typedoc/functions/iterForOf.html index 1be66d60..dfb35180 100644 --- a/docs/typedoc/functions/iterForOf.html +++ b/docs/typedoc/functions/iterForOf.html @@ -1,13 +1,13 @@ -iterForOf | @nevware21/ts-utils
  • Calls the provided callbackFn function once for each element in the iterator or iterator returned by +iterForOf | @nevware21/ts-utils

    • Calls the provided callbackFn function once for each element in the iterator or iterator returned by the iterable and processed in the same order as returned by the iterator. As with the arrForEach you CAN stop / break the iteration by returning -1 from thecallbackFn function.

      The order of processing is not reset if you add or remove elements to the iterator, the actual behavior will depend on the iterator imeplementation.

      If the passed iter is both an Iterable and Iterator the Iterator interface takes preceedence.

      -

      Type Parameters

      • T

        Identifies the element type of the iterator

        -

      Parameters

      • iter: Iterator<T, any, undefined> | Iterable<T>
      • callbackfn: ((value, count?, iter?) => number | void)

        A synchronous function that accepts up to three arguments. iterForOf calls the +

        Type Parameters

        • T

          Identifies the element type of the iterator

          +

        Parameters

        • iter: Iterator<T, any, undefined> | Iterable<T>
        • callbackfn: ((value, count?, iter?) => number | void)

          A synchronous function that accepts up to three arguments. iterForOf calls the callbackfn function one time for each element returned by the iterator.

          -
            • (value, count?, iter?): number | void
            • Parameters

              • value: T
              • Optional count: number
              • Optional iter: Iterator<T, any, undefined>

              Returns number | void

        • Optional thisArg: any

          An object to which the this keyword can refer in the callbackfn function. If thisArg is +

            • (value, count?, iter?): number | void
            • Parameters

              • value: T
              • Optional count: number
              • Optional iter: Iterator<T, any, undefined>

              Returns number | void

        • Optional thisArg: any

          An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, null or undefined the iterator will be used as the this value.

        Returns void

        Remarks

        If Symbols are NOT supported then the iterable MUST be using the same polyFill for the well know symbols, if you are targetting a mixed environment you SHOULD either

        @@ -22,4 +22,4 @@

        Since

        0.4.2

        Throws

        Any exception thrown while processing the iterator

        Example

        const items = {
        'item1': 'value1',
        'item2': 'value2',
        'item3': 'value3
        };
        const copyItems = [];

        iterForOf(items, (item) => {
        copyItems.push(item);
        // May return -1 to abort the iteration
        });
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/lazySafeGetInst.html b/docs/typedoc/functions/lazySafeGetInst.html index 24c3b921..901095c7 100644 --- a/docs/typedoc/functions/lazySafeGetInst.html +++ b/docs/typedoc/functions/lazySafeGetInst.html @@ -1,12 +1,12 @@ -lazySafeGetInst | @nevware21/ts-utils

Function lazySafeGetInst

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/makeGlobRegex.html b/docs/typedoc/functions/makeGlobRegex.html index fb51b85d..e2f3613e 100644 --- a/docs/typedoc/functions/makeGlobRegex.html +++ b/docs/typedoc/functions/makeGlobRegex.html @@ -1,4 +1,4 @@ -makeGlobRegex | @nevware21/ts-utils

Function makeGlobRegex

  • Create a simple glob style regular expression from the string value, converting '**', '*' and '?' +makeGlobRegex | @nevware21/ts-utils

    Function makeGlobRegex

    • Create a simple glob style regular expression from the string value, converting '**', '*' and '?' characters. Unlike createFilenameRegex the '*' and '?' will NOT match folder seperator characters '/' and '\'. If the source string contains folder seperators both '/' and '\' are treated as synonomous @@ -11,13 +11,13 @@

    • '/' Matches either '/' or '\' character, not captured as a group
    • '\' Matches either '/' or '\' character, not captured as a group
    -

    Parameters

    • value: string

      The string value to converted.

      -
    • Optional ignoreCase: boolean

      Flag to indicate whether the regular expression should be case-sensitive, Defaults +

      Parameters

      • value: string

        The string value to converted.

        +
      • Optional ignoreCase: boolean

        Flag to indicate whether the regular expression should be case-sensitive, Defaults to false.

        -
      • Optional fullMatch: boolean

        Flag to identify whether the RegExp should be wrapped with '^' and '$' to +

      • Optional fullMatch: boolean

        Flag to identify whether the RegExp should be wrapped with '^' and '$' to incidate match the entire string only.

      Returns RegExp

      The new Regular Expression created from the provided value.

      Since

      0.9.0

      Example

      let regex = makeGlobRegex("src\\**\\*.ts");

      let matches = regex.exec("Hello");
      matches; // null

      let matches = regex.exec("Src/index.ts");
      matches; // null - Specify the ignoreCase if you want this to match

      let matches = regex.exec("src/index.ts");
      matches[0]; // "src/index.ts"
      matches[1]; // undefined;
      matches[2]; // "index"

      let matches = regex.exec("src\\index.ts");
      matches[0]; // "src\\index.ts"
      matches[1]; // undefined;
      matches[2]; // "index"

      let matches = regex.exec("src/helpers/regexp.ts");
      matches[0]; // "src/helpers/regexp.ts"
      matches[1]; // "helpers/"
      matches[2]; // "regexp"

      let matches = regex.exec("src\\helpers/regexp.ts");
      matches[0]; // "src\\helpers/regexp.ts"
      matches[1]; // "helpers/"
      matches[2]; // "regexp"

      let matches = regex.exec(" src/index.tsx ");
      matches[0]; // "src/index.ts"
      matches[1]; // undefined
      matches[2]; // "index"

      let matches = regex.exec(" src/helpers/regexp.ts. ");
      matches[0]; // "src/helpers/regexp.ts"
      matches[1]; // "helpers/"
      matches[2]; // "regexp"]);
      -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/makeIterable.html b/docs/typedoc/functions/makeIterable.html index 1422389d..9fe30346 100644 --- a/docs/typedoc/functions/makeIterable.html +++ b/docs/typedoc/functions/makeIterable.html @@ -1,11 +1,11 @@ -makeIterable | @nevware21/ts-utils

Function makeIterable

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/mathCeil.html b/docs/typedoc/functions/mathCeil.html index 0ec28c45..d82e1a87 100644 --- a/docs/typedoc/functions/mathCeil.html +++ b/docs/typedoc/functions/mathCeil.html @@ -1,4 +1,4 @@ -mathCeil | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/mathFloor.html b/docs/typedoc/functions/mathFloor.html index 8177a64a..408d74c5 100644 --- a/docs/typedoc/functions/mathFloor.html +++ b/docs/typedoc/functions/mathFloor.html @@ -1,4 +1,4 @@ -mathFloor | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/mathMax.html b/docs/typedoc/functions/mathMax.html index 0065b8ba..4fed7be5 100644 --- a/docs/typedoc/functions/mathMax.html +++ b/docs/typedoc/functions/mathMax.html @@ -1,11 +1,11 @@ -mathMax | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/mathMin.html b/docs/typedoc/functions/mathMin.html index 8b611534..b8391032 100644 --- a/docs/typedoc/functions/mathMin.html +++ b/docs/typedoc/functions/mathMin.html @@ -1,11 +1,11 @@ -mathMin | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/mathToInt.html b/docs/typedoc/functions/mathToInt.html index 14922cd5..eb3e7123 100644 --- a/docs/typedoc/functions/mathToInt.html +++ b/docs/typedoc/functions/mathToInt.html @@ -1,5 +1,5 @@ -mathToInt | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/mathTrunc.html b/docs/typedoc/functions/mathTrunc.html index 5e181818..d0411356 100644 --- a/docs/typedoc/functions/mathTrunc.html +++ b/docs/typedoc/functions/mathTrunc.html @@ -1,7 +1,7 @@ -mathTrunc | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/newSymbol.html b/docs/typedoc/functions/newSymbol.html index cecc0508..db5bbd0d 100644 --- a/docs/typedoc/functions/newSymbol.html +++ b/docs/typedoc/functions/newSymbol.html @@ -1,6 +1,6 @@ -newSymbol | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/normalizeJsName.html b/docs/typedoc/functions/normalizeJsName.html index 4c60aaee..6b9608b8 100644 --- a/docs/typedoc/functions/normalizeJsName.html +++ b/docs/typedoc/functions/normalizeJsName.html @@ -1,8 +1,8 @@ -normalizeJsName | @nevware21/ts-utils

Function normalizeJsName

  • Validates that the string name conforms to the JS IdentifierName specification and if not +normalizeJsName | @nevware21/ts-utils

    Function normalizeJsName

    • Validates that the string name conforms to the JS IdentifierName specification and if not normalizes the name so that it would. This method does not identify or change any keywords meaning that if you pass in a known keyword the same value will be returned.

      -

      Parameters

      • jsName: string

        The string value to validate

        -
      • Optional camelCase: boolean

        Optionally (see [1]) convert into CamelCase with the leading character either

        +

        Parameters

        • jsName: string

          The string value to validate

          +
        • Optional camelCase: boolean

          Optionally (see [1]) convert into CamelCase with the leading character either

          • true => lowercase
          • 'false' => uppercase
          • @@ -17,4 +17,4 @@

            Since

            0.9.0

            Example

            normalizeJsName("HelloDarkness"); // "HelloDarkness"
            normalizeJsName("Hello Darkness"); // "Hello_Darkness"
            normalizeJsName("hello Darkness"); // "hello_Darkness"
            normalizeJsName("hello Darkness"); // "hello_Darkness"
            normalizeJsName("hello.Darkness"); // "hello_Darkness"
            normalizeJsName("hello-Darkness"); // "hello_Darkness"
            normalizeJsName("hello_Darkness"); // "hello_Darkness"
            normalizeJsName("abc-123"); // "abc_123"
            normalizeJsName("0abc0"); // "0abc0"
            normalizeJsName("\"HelloDarkness\""); // "_HelloDarkness_"
            normalizeJsName("\"Hello Darkness\""); // "_Hello_Darkness_"
            normalizeJsName("\"hello Darkness\""); // "_hello_Darkness_"
            normalizeJsName("\"hello Darkness\""); // "_hello_Darkness_"
            normalizeJsName("\"hello .,#[]Darkness\""); // "_hello______Darkness_"

            normalizeJsName("HelloDarkness", true); // "helloDarkness"
            normalizeJsName("Hello Darkness", true); // "helloDarkness"
            normalizeJsName("hello Darkness", true); // "helloDarkness"
            normalizeJsName("hello Darkness", true); // "helloDarkness"
            normalizeJsName("hello.Darkness", true); // "helloDarkness"
            normalizeJsName("hello-Darkness", true); // "helloDarkness"
            normalizeJsName("hello_Darkness", true); // "helloDarkness"
            normalizeJsName("abc-123", true); // "abc123"
            normalizeJsName("0abc0", true); // "0abc0"
            normalizeJsName("\"HelloDarkness\"", true); // "helloDarkness"
            normalizeJsName("\"Hello Darkness\"", true); // "helloDarkness"
            normalizeJsName("hello \"Darkness\"", true); // "helloDarkness"
            normalizeJsName("hello \"Darkness\"", true); // "helloDarkness"
            normalizeJsName("\"hello .,#[]Darkness\"", true); // "helloDarkness"
            -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objAssign.html b/docs/typedoc/functions/objAssign.html index a8ad2ec8..57019ece 100644 --- a/docs/typedoc/functions/objAssign.html +++ b/docs/typedoc/functions/objAssign.html @@ -1,4 +1,4 @@ -objAssign | @nevware21/ts-utils
  • The objAssign() method copies all enumerable own properties from one or more source objects +objAssign | @nevware21/ts-utils

    • The objAssign() method copies all enumerable own properties from one or more source objects to a target object. It returns the modified target object.

      Properties in the target object are overwritten by properties in the sources if they have the same key. Later sources' properties overwrite earlier ones.

      @@ -13,9 +13,9 @@

      Both String and Symbol properties are copied.

      In case of an error, for example if a property is non-writable, a TypeError is raised, and the target object is changed if any properties are added before the error is raised.

      -

      Type Parameters

      • T extends {}

      • U

      Parameters

      • target: T
      • source: U

      Returns T & U

      Example

      const obj = { a: 1 };
      const copy = objAssign({}, obj);
      console.log(copy); // { a: 1 }

      const o1 = { a: 1 };
      const o2 = { b: 2 };
      const o3 = { c: 3 };

      const obj = objAssign(o1, o2, o3);
      console.log(obj); // { a: 1, b: 2, c: 3 }
      console.log(o1); // { a: 1, b: 2, c: 3 }, target object itself is changed. +

      Type Parameters

      • T extends {}
      • U

      Parameters

      • target: T
      • source: U

      Returns T & U

      Example

      const obj = { a: 1 };
      const copy = objAssign({}, obj);
      console.log(copy); // { a: 1 }

      const o1 = { a: 1 };
      const o2 = { b: 2 };
      const o3 = { c: 3 };

      const obj = objAssign(o1, o2, o3);
      console.log(obj); // { a: 1, b: 2, c: 3 }
      console.log(o1); // { a: 1, b: 2, c: 3 }, target object itself is changed.
      -
    • The objAssign() method copies all enumerable own properties from one or more source objects +

    • The objAssign() method copies all enumerable own properties from one or more source objects to a target object. It returns the modified target object.

      Properties in the target object are overwritten by properties in the sources if they have the same key. Later sources' properties overwrite earlier ones.

      @@ -30,9 +30,9 @@

      Both String and Symbol properties are copied.

      In case of an error, for example if a property is non-writable, a TypeError is raised, and the target object is changed if any properties are added before the error is raised.

      -

      Type Parameters

      • T extends {}

      • U

      • V

      Parameters

      • target: T
      • source1: U
      • source2: V

      Returns T & U & V

      Example

      const obj = { a: 1 };
      const copy = objAssign({}, obj);
      console.log(copy); // { a: 1 }

      const o1 = { a: 1 };
      const o2 = { b: 2 };
      const o3 = { c: 3 };

      const obj = objAssign(o1, o2, o3);
      console.log(obj); // { a: 1, b: 2, c: 3 }
      console.log(o1); // { a: 1, b: 2, c: 3 }, target object itself is changed. +

      Type Parameters

      • T extends {}
      • U
      • V

      Parameters

      • target: T
      • source1: U
      • source2: V

      Returns T & U & V

      Example

      const obj = { a: 1 };
      const copy = objAssign({}, obj);
      console.log(copy); // { a: 1 }

      const o1 = { a: 1 };
      const o2 = { b: 2 };
      const o3 = { c: 3 };

      const obj = objAssign(o1, o2, o3);
      console.log(obj); // { a: 1, b: 2, c: 3 }
      console.log(o1); // { a: 1, b: 2, c: 3 }, target object itself is changed.
      -
    • The objAssign() method copies all enumerable own properties from one or more source objects +

    • The objAssign() method copies all enumerable own properties from one or more source objects to a target object. It returns the modified target object.

      Properties in the target object are overwritten by properties in the sources if they have the same key. Later sources' properties overwrite earlier ones.

      @@ -47,9 +47,9 @@

      Both String and Symbol properties are copied.

      In case of an error, for example if a property is non-writable, a TypeError is raised, and the target object is changed if any properties are added before the error is raised.

      -

      Type Parameters

      • T extends {}

      • U

      • V

      • W

      Parameters

      • target: T
      • source1: U
      • source2: V
      • source3: W

      Returns T & U & V & W

      Example

      const obj = { a: 1 };
      const copy = objAssign({}, obj);
      console.log(copy); // { a: 1 }

      const o1 = { a: 1 };
      const o2 = { b: 2 };
      const o3 = { c: 3 };

      const obj = objAssign(o1, o2, o3);
      console.log(obj); // { a: 1, b: 2, c: 3 }
      console.log(o1); // { a: 1, b: 2, c: 3 }, target object itself is changed. +

      Type Parameters

      • T extends {}
      • U
      • V
      • W

      Parameters

      • target: T
      • source1: U
      • source2: V
      • source3: W

      Returns T & U & V & W

      Example

      const obj = { a: 1 };
      const copy = objAssign({}, obj);
      console.log(copy); // { a: 1 }

      const o1 = { a: 1 };
      const o2 = { b: 2 };
      const o3 = { c: 3 };

      const obj = objAssign(o1, o2, o3);
      console.log(obj); // { a: 1, b: 2, c: 3 }
      console.log(o1); // { a: 1, b: 2, c: 3 }, target object itself is changed.
      -
    • The objAssign() method copies all enumerable own properties from one or more source objects +

    • The objAssign() method copies all enumerable own properties from one or more source objects to a target object. It returns the modified target object.

      Properties in the target object are overwritten by properties in the sources if they have the same key. Later sources' properties overwrite earlier ones.

      @@ -64,6 +64,6 @@

      Both String and Symbol properties are copied.

      In case of an error, for example if a property is non-writable, a TypeError is raised, and the target object is changed if any properties are added before the error is raised.

      -

      Parameters

      • target: object
      • Rest ...sources: any[]

      Returns any

      Example

      const obj = { a: 1 };
      const copy = objAssign({}, obj);
      console.log(copy); // { a: 1 }

      const o1 = { a: 1 };
      const o2 = { b: 2 };
      const o3 = { c: 3 };

      const obj = objAssign(o1, o2, o3);
      console.log(obj); // { a: 1, b: 2, c: 3 }
      console.log(o1); // { a: 1, b: 2, c: 3 }, target object itself is changed. +

      Parameters

      • target: object
      • Rest ...sources: any[]

      Returns any

      Example

      const obj = { a: 1 };
      const copy = objAssign({}, obj);
      console.log(copy); // { a: 1 }

      const o1 = { a: 1 };
      const o2 = { b: 2 };
      const o3 = { c: 3 };

      const obj = objAssign(o1, o2, o3);
      console.log(obj); // { a: 1, b: 2, c: 3 }
      console.log(o1); // { a: 1, b: 2, c: 3 }, target object itself is changed.
      -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objCopyProps.html b/docs/typedoc/functions/objCopyProps.html index b34ac1bf..4d308bb8 100644 --- a/docs/typedoc/functions/objCopyProps.html +++ b/docs/typedoc/functions/objCopyProps.html @@ -1,9 +1,9 @@ -objCopyProps | @nevware21/ts-utils

Function objCopyProps

  • Object helper to copy all of the enumerable properties from the source object to the target, the +objCopyProps | @nevware21/ts-utils

    Function objCopyProps

    • Object helper to copy all of the enumerable properties from the source object to the target, the properties are copied via objDeepCopy. Automatic handling of recursive properties was added in v0.4.4

      -

      Type Parameters

      • T

      Parameters

      • target: T

        The target object to populated

        -
      • source: any

        The source object to copy the properties from

        -
      • Optional handler: ObjDeepCopyHandler

        An optional callback that lets you provide / overide the deep cloning (Since 0.4.4)

        +

        Type Parameters

        • T

        Parameters

        • target: T

          The target object to populated

          +
        • source: any

          The source object to copy the properties from

          +
        • Optional handler: ObjDeepCopyHandler

          An optional callback that lets you provide / overide the deep cloning (Since 0.4.4)

        Returns any

        The target object

        Example

        let a: any = { a: 1 };
        let b: any = { b: 2, d: new Date(), e: new TestClass("Hello Darkness") };
        a.b = b; // { a: 1, b: { b: 2} }
        b.a = a; // { a: 1, b: { b: 2, a: { a: 1, { b: 2, a: ... }}}}

        function copyHandler(details: IObjDeepCopyHandlerDetails) {
        // details.origin === a
        // details.path[] is the path to the current value
        if (details.value && isDate(details.value)) {
        // So for the date path === [ "b", "d" ] which represents
        // details.origin["b"]["d"] === The Date

        // Create a clone the Date object and set as the "newValue"
        details.value = new Date(details.value.getTime());

        // Return true to indicate that we have "handled" the conversion
        // See objDeepCopy example for just reusing the original value (just don't replace details.value)
        return true;
        }

        return false;
        }

        let c: any = objCopyProps({}, a, copyHandler);

        assert.notEqual(a, c, "check a and c are not the same");
        assert.ok(c !== c.b.a, "The root object won't be the same for the target reference as are are copying properties to our target");
        assert.ok(c.b === c.b.a.b, "Check that the 2 'b' references are the same object");
        assert.ok(c.b.a === c.b.a.b.a, "Check that the 2 'a' references are the same object");
        assert.ok(c.b.d === c.b.a.b.d, "Check that the 2 'd' references are the same object");
        assert.ok(isDate(c.b.d), "The copied date is still real 'Date' instance");
        assert.notEqual(c.b.d, a.b.d, "And the copied date is not the same as the original");
        assert.equal(c.b.d.getTime(), a.b.d.getTime(), "But the dates are the same");

        assert.ok(isObject(c.b.d), "The copied date is now an object");
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objCreate.html b/docs/typedoc/functions/objCreate.html index 606f81df..80fb98a1 100644 --- a/docs/typedoc/functions/objCreate.html +++ b/docs/typedoc/functions/objCreate.html @@ -1,7 +1,7 @@ -objCreate | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objDeepCopy.html b/docs/typedoc/functions/objDeepCopy.html index 1edc619d..a2ad9872 100644 --- a/docs/typedoc/functions/objDeepCopy.html +++ b/docs/typedoc/functions/objDeepCopy.html @@ -1,11 +1,11 @@ -objDeepCopy | @nevware21/ts-utils

Function objDeepCopy

  • Performs a deep copy of the source object, this is designed to work with base (plain) objects, arrays and primitives +objDeepCopy | @nevware21/ts-utils

    Function objDeepCopy

    • Performs a deep copy of the source object, this is designed to work with base (plain) objects, arrays and primitives if the source object contains class objects they will either be not cloned or may be considered non-operational after performing a deep copy. ie. This is performing a deep copy of the objects properties so that altering the copy will not mutate the source object hierarchy. Automatic handling of recursive properties was added in v0.4.4.

      -

      Type Parameters

      • T

      Parameters

      • source: T

        The source object to be copied

        -
      • Optional handler: ObjDeepCopyHandler

        An optional callback that lets you provide / overide the deep cloning (Since 0.4.4)

        +

        Type Parameters

        • T

        Parameters

        • source: T

          The source object to be copied

          +
        • Optional handler: ObjDeepCopyHandler

          An optional callback that lets you provide / overide the deep cloning (Since 0.4.4)

        Returns T

        A new object which contains a deep copy of the source properties

        Example

        let a: any = { a: 1 };
        let b: any = { b: 2, d: new Date(), e: new TestClass("Hello Darkness") };
        a.b = b; // { a: 1, b: { b: 2} }
        b.a = a; // { a: 1, b: { b: 2, a: { a: 1, { b: 2, a: ... }}}}

        function copyHandler(details: IObjDeepCopyHandlerDetails) {
        // details.origin === a
        // details.path[] is the path to the current value
        if (details.value && isDate(details.value)) {
        // So for the date path === [ "b", "d" ] which represents
        // details.origin["b"]["d"] === The Date

        // Return true to indicate that we have "handled" the conversion
        // Which in this case will reuse the existing instance (as we didn't replace details.value)
        // See objCopyProps example for replacing the Date instance
        return true;
        }

        return false;
        }

        let c: any = objDeepCopy(a, copyHandler);

        assert.notEqual(a, c, "check a and c are not the same");
        assert.ok(c === c.b.a, "The root object won't be the same for the target reference");
        assert.ok(c.b === c.b.a.b, "Check that the 2 'b' references are the same object");
        assert.ok(c.b.a === c.b.a.b.a, "Check that the 2 'a' references are the same object");
        assert.ok(c.b.d === c.b.a.b.d, "Check that the 2 'd' references are the same object");
        assert.ok(isDate(c.b.d), "The copied date is still real 'Date' instance");
        assert.equal(c.b.d, a.b.d, "And the copied date is the original date");
        assert.equal(c.b.d.getTime(), a.b.d.getTime(), "But the dates are the same");
        assert.ok(isObject(c.b.d), "The copied date is now an object");
        assert.ok(!isError(c.b.e), "The copied error is no longer a real 'Error' instance");
        assert.ok(isObject(c.b.e), "The copied error is now an object");
        assert.equal(42, c.b.e.value, "Expect that the local property was copied");
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objDeepFreeze.html b/docs/typedoc/functions/objDeepFreeze.html index d36d5837..0be41cb0 100644 --- a/docs/typedoc/functions/objDeepFreeze.html +++ b/docs/typedoc/functions/objDeepFreeze.html @@ -1,5 +1,5 @@ -objDeepFreeze | @nevware21/ts-utils

Function objDeepFreeze

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objDefine.html b/docs/typedoc/functions/objDefine.html index 406f4023..5fbb1416 100644 --- a/docs/typedoc/functions/objDefine.html +++ b/docs/typedoc/functions/objDefine.html @@ -1,10 +1,10 @@ -objDefine | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objDefineAccessors.html b/docs/typedoc/functions/objDefineAccessors.html index cc194990..020a3342 100644 --- a/docs/typedoc/functions/objDefineAccessors.html +++ b/docs/typedoc/functions/objDefineAccessors.html @@ -1,14 +1,14 @@ -objDefineAccessors | @nevware21/ts-utils

Function objDefineAccessors

  • Try to define get/set object property accessors for the target object/prototype, this will provide compatibility with +objDefineAccessors | @nevware21/ts-utils

    Function objDefineAccessors

    • Try to define get/set object property accessors for the target object/prototype, this will provide compatibility with existing API definition when run within an ES5+ container that supports accessors but still enable the code to be loaded and executed in an ES3 container, providing basic IE8 compatibility.

      -

      Type Parameters

      • T

      • V = any

      Parameters

      • target: T

        The object on which to define the property.

        -
      • prop: PropertyKey

        The name of the property to be defined or modified.

        -
      • Optional getProp: (() => V)

        The getter function to wire against the getter.

        -
          • (): V
          • Returns V

      • Optional setProp: ((v) => void)

        The setter function to wire against the setter.

        -
          • (v): void
          • Parameters

            Returns void

      • Optional configurable: boolean

        Can the value be changed, defaults to true

        -
      • Optional enumerable: boolean

        Should this get property be enumerable, defaults to true.

        +

        Type Parameters

        • T
        • V = any

        Parameters

        • target: T

          The object on which to define the property.

          +
        • prop: PropertyKey

          The name of the property to be defined or modified.

          +
        • Optional getProp: (() => V)

          The getter function to wire against the getter.

          +
            • (): V
            • Returns V

        • Optional setProp: ((v) => void)

          The setter function to wire against the setter.

          +
            • (v): void
            • Parameters

              Returns void

        • Optional configurable: boolean

          Can the value be changed, defaults to true

          +
        • Optional enumerable: boolean

          Should this get property be enumerable, defaults to true.

        Returns T

        The object that was passed to the function

        Deprecated

        It is recommended that you use objDefine instead objDefineAccessors as this internally creates the ObjDefinePropDescriptor definition based on your provided arguments. And only using a minimum set of functions reduces your overall bundle size.

        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objDefineGet.html b/docs/typedoc/functions/objDefineGet.html index 46387f51..0d8b006a 100644 --- a/docs/typedoc/functions/objDefineGet.html +++ b/docs/typedoc/functions/objDefineGet.html @@ -1,12 +1,12 @@ -objDefineGet | @nevware21/ts-utils

Function objDefineGet

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objDefineProp.html b/docs/typedoc/functions/objDefineProp.html index c467c211..e659a896 100644 --- a/docs/typedoc/functions/objDefineProp.html +++ b/docs/typedoc/functions/objDefineProp.html @@ -1,4 +1,4 @@ -objDefineProp | @nevware21/ts-utils

Function objDefineProp

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objDefineProperties.html b/docs/typedoc/functions/objDefineProperties.html index aae3bcd8..1dfe28b1 100644 --- a/docs/typedoc/functions/objDefineProperties.html +++ b/docs/typedoc/functions/objDefineProperties.html @@ -1,8 +1,8 @@ -objDefineProperties | @nevware21/ts-utils

Function objDefineProperties

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objDefineProps.html b/docs/typedoc/functions/objDefineProps.html index e0064ecd..5f42e661 100644 --- a/docs/typedoc/functions/objDefineProps.html +++ b/docs/typedoc/functions/objDefineProps.html @@ -1,11 +1,11 @@ -objDefineProps | @nevware21/ts-utils

Function objDefineProps

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objEntries.html b/docs/typedoc/functions/objEntries.html index 7c0363ad..c3d69f4b 100644 --- a/docs/typedoc/functions/objEntries.html +++ b/docs/typedoc/functions/objEntries.html @@ -1,6 +1,6 @@ -objEntries | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objExtend.html b/docs/typedoc/functions/objExtend.html index a09649d5..dd7f1f42 100644 --- a/docs/typedoc/functions/objExtend.html +++ b/docs/typedoc/functions/objExtend.html @@ -1,7 +1,7 @@ -objExtend | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objForEachKey.html b/docs/typedoc/functions/objForEachKey.html index b6b864fe..eed3a191 100644 --- a/docs/typedoc/functions/objForEachKey.html +++ b/docs/typedoc/functions/objForEachKey.html @@ -1,10 +1,10 @@ -objForEachKey | @nevware21/ts-utils

Function objForEachKey

  • Calls the provided callbackFn function once for each key in an object. This is equivelent to arrForEach(Object.keys(theObject), callbackFn) or +objForEachKey | @nevware21/ts-utils

    Function objForEachKey

    • Calls the provided callbackFn function once for each key in an object. This is equivelent to arrForEach(Object.keys(theObject), callbackFn) or if not using the array helper Object.keys(theObject).forEach(callbackFn) except that this helper avoid creating a temporary of the object keys before iterating over them and like the arrForEach helper you CAN stop or break the iteration by returning -1 from the callbackFn function.

      -

      Type Parameters

      • T

        The object type

        -

      Parameters

      • theObject: T
      • callbackfn: ((key, value) => number | void)

        A function that accepts up to two arguments, the key name and the current value of the property represented by the key.

        -
          • (key, value): number | void
          • Parameters

            • key: string
            • value: T[keyof T]

            Returns number | void

      • Optional thisArg: any

        [Optional] An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, null or undefined +

        Type Parameters

        • T

          The object type

          +

        Parameters

        • theObject: T
        • callbackfn: ((key, value) => number | void)

          A function that accepts up to two arguments, the key name and the current value of the property represented by the key.

          +
            • (key, value): number | void
            • Parameters

              • key: string
              • value: T[keyof T]

              Returns number | void

        • Optional thisArg: any

          [Optional] An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, null or undefined the object will be used as the this value.

        Returns void

        Example

        function performAction<T>(target: T, source: any) {
        if (!isNullOrUndefined(source)) {
        objForEachKey(source, (key, value) => {
        // Set the target with a reference to the same value with the same name
        target[key] = value;
        });
        }

        return target;
        }
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objFreeze.html b/docs/typedoc/functions/objFreeze.html index 5b4b13f4..c11880de 100644 --- a/docs/typedoc/functions/objFreeze.html +++ b/docs/typedoc/functions/objFreeze.html @@ -1,4 +1,4 @@ -objFreeze | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objGetOwnPropertyDescriptor.html b/docs/typedoc/functions/objGetOwnPropertyDescriptor.html index 28e9f6d3..f67a80cc 100644 --- a/docs/typedoc/functions/objGetOwnPropertyDescriptor.html +++ b/docs/typedoc/functions/objGetOwnPropertyDescriptor.html @@ -1,11 +1,11 @@ -objGetOwnPropertyDescriptor | @nevware21/ts-utils

Function objGetOwnPropertyDescriptor

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objGetPrototypeOf.html b/docs/typedoc/functions/objGetPrototypeOf.html index c22338d7..aec4b024 100644 --- a/docs/typedoc/functions/objGetPrototypeOf.html +++ b/docs/typedoc/functions/objGetPrototypeOf.html @@ -1,5 +1,5 @@ -objGetPrototypeOf | @nevware21/ts-utils

Function objGetPrototypeOf

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objHasOwn.html b/docs/typedoc/functions/objHasOwn.html index bca65499..a2a32e7b 100644 --- a/docs/typedoc/functions/objHasOwn.html +++ b/docs/typedoc/functions/objHasOwn.html @@ -1,4 +1,4 @@ -objHasOwn | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objHasOwnProperty.html b/docs/typedoc/functions/objHasOwnProperty.html index 61760d5f..e69fa6e3 100644 --- a/docs/typedoc/functions/objHasOwnProperty.html +++ b/docs/typedoc/functions/objHasOwnProperty.html @@ -1,4 +1,4 @@ -objHasOwnProperty | @nevware21/ts-utils

Function objHasOwnProperty

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objKeys.html b/docs/typedoc/functions/objKeys.html index ae095405..8ace144c 100644 --- a/docs/typedoc/functions/objKeys.html +++ b/docs/typedoc/functions/objKeys.html @@ -1,10 +1,10 @@ -objKeys | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objSeal.html b/docs/typedoc/functions/objSeal.html index 59adde26..630ee045 100644 --- a/docs/typedoc/functions/objSeal.html +++ b/docs/typedoc/functions/objSeal.html @@ -1,6 +1,6 @@ -objSeal | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objSetPrototypeOf.html b/docs/typedoc/functions/objSetPrototypeOf.html index feda5327..5ef812d1 100644 --- a/docs/typedoc/functions/objSetPrototypeOf.html +++ b/docs/typedoc/functions/objSetPrototypeOf.html @@ -1,6 +1,6 @@ -objSetPrototypeOf | @nevware21/ts-utils

Function objSetPrototypeOf

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/objToString.html b/docs/typedoc/functions/objToString.html index fa85adf6..b3c830b6 100644 --- a/docs/typedoc/functions/objToString.html +++ b/docs/typedoc/functions/objToString.html @@ -1,12 +1,12 @@ -objToString | @nevware21/ts-utils

Function objToString

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/perfNow.html b/docs/typedoc/functions/perfNow.html index 78c2e233..045cbbcf 100644 --- a/docs/typedoc/functions/perfNow.html +++ b/docs/typedoc/functions/perfNow.html @@ -1,4 +1,4 @@ -perfNow | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/plainObjDeepCopyHandler.html b/docs/typedoc/functions/plainObjDeepCopyHandler.html index ba59ee71..b1afc380 100644 --- a/docs/typedoc/functions/plainObjDeepCopyHandler.html +++ b/docs/typedoc/functions/plainObjDeepCopyHandler.html @@ -1,5 +1,5 @@ -plainObjDeepCopyHandler | @nevware21/ts-utils

Function plainObjDeepCopyHandler

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/polyArrFind.html b/docs/typedoc/functions/polyArrFind.html index 33a9ba08..256b7f31 100644 --- a/docs/typedoc/functions/polyArrFind.html +++ b/docs/typedoc/functions/polyArrFind.html @@ -1,4 +1,4 @@ -polyArrFind | @nevware21/ts-utils

Function polyArrFind

  • The polyArrFind() method returns the first element in the provided array that satisfies +polyArrFind | @nevware21/ts-utils

    Function polyArrFind

    • The polyArrFind() method returns the first element in the provided array that satisfies the provided testing function. If no values satisfy the testing function, undefined is returned.

        @@ -24,15 +24,15 @@ callbackFn will be the value at the time that element gets visited. Deleted elements are visited as if they were undefined.
      -

      Type Parameters

      • T

        Identifies the base type of array elements

        -
      • E

        Identifies a more specific instance of the base array type

        -

      Parameters

      • theArray: ArrayLike<T>

        The array or array like object of elements to be searched.

        -
      • callbackFn: ArrPredicateCallbackFn<T, E> | ArrPredicateCallbackFn2<T>

        A function that accepts up to three arguments of type ArrPredicateCallbackFn or +

        Type Parameters

        • T

          Identifies the base type of array elements

          +
        • E

          Identifies a more specific instance of the base array type

          +

        Parameters

        Returns T | E | undefined

        The first element in the array that satisfies the provided testing function. Otherwise, undefined +

    • Optional thisArg: any

    Returns T | E | undefined

    The first element in the array that satisfies the provided testing function. Otherwise, undefined is returned.

    Since

    0.8.0

    Example

    const inventory = [
    { name: "apples", quantity: 2 },
    { name: "bananas", quantity: 0 },
    { name: "cherries", quantity: 5 },
    ];

    function isCherries(fruit) {
    return fruit.name === "cherries";
    }

    console.log(polyArrFind(inventory, isCherries));
    // { name: 'cherries', quantity: 5 }

    function isPrime(element, index, array) {
    let start = 2;
    while (start <= Math.sqrt(element)) {
    if (element % start++ < 1) {
    return false;
    }
    }
    return element > 1;
    }

    console.log(polyArrFind([4, 6, 8, 12], isPrime)); // undefined, not found
    console.log(polyArrFind([4, 5, 8, 12], isPrime)); // 5
    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/polyArrFindIndex.html b/docs/typedoc/functions/polyArrFindIndex.html index a80d9d59..5ae5a42c 100644 --- a/docs/typedoc/functions/polyArrFindIndex.html +++ b/docs/typedoc/functions/polyArrFindIndex.html @@ -1,4 +1,4 @@ -polyArrFindIndex | @nevware21/ts-utils

Function polyArrFindIndex

  • The polyArrFindIndex() method returns the index of the first element in an array that satisfies the provided testing +polyArrFindIndex | @nevware21/ts-utils

    Function polyArrFindIndex

    • The polyArrFindIndex() method returns the index of the first element in an array that satisfies the provided testing function. If no elements satisfy the testing function, -1 is returned.

      The polyArrFindIndex() is an iterative method. It calls a provided callbackFn function once for each element in an array in ascending-index order, until callbackFn returns a truthy value. polyArrFindIndex() then returns the index @@ -14,15 +14,15 @@ If an existing, yet-unvisited element of the array is changed by callbackFn, its value passed to the callbackFn will be the value at the time that element gets visited. Deleted elements are visited as if they were undefined.

    -

    Type Parameters

    • T

      Identifies the base type of array elements

      -
    • E

      Identifies a more specific instance of the base array type

      -

    Parameters

    • theArray: ArrayLike<T>

      The array or array like object of elements to be searched.

      -
    • callbackFn: ArrPredicateCallbackFn<T, E> | ArrPredicateCallbackFn2<T>

      A function that accepts up to three arguments of type ArrPredicateCallbackFn or +

      Type Parameters

      • T

        Identifies the base type of array elements

        +
      • E

        Identifies a more specific instance of the base array type

        +

      Parameters

      • theArray: ArrayLike<T>

        The array or array like object of elements to be searched.

        +
      • callbackFn: ArrPredicateCallbackFn<T, E> | ArrPredicateCallbackFn2<T>

        A function that accepts up to three arguments of type ArrPredicateCallbackFn or ArrPredicateCallbackFn2. The predicate function is called for each element in the thArray until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.

        -
      • Optional thisArg: any

        A value to use as this when executing callbackFn. Defaults to the array if not provided.

        +
      • Optional thisArg: any

        A value to use as this when executing callbackFn. Defaults to the array if not provided.

      Returns number

      The index of the first element in the array that passes the test. Otherwise, -1.

      Since

      0.8.0

      Example

      
       
      -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/polyArrFindLast.html b/docs/typedoc/functions/polyArrFindLast.html index 3c6b455f..1c2cc760 100644 --- a/docs/typedoc/functions/polyArrFindLast.html +++ b/docs/typedoc/functions/polyArrFindLast.html @@ -1,4 +1,4 @@ -polyArrFindLast | @nevware21/ts-utils

Function polyArrFindLast

  • The polyArrFindLast() method iterates the array in reverse order and returns the value of the first element that +polyArrFindLast | @nevware21/ts-utils

    Function polyArrFindLast

    • The polyArrFindLast() method iterates the array in reverse order and returns the value of the first element that satisfies the provided testing function. If no elements satisfy the testing function, undefined is returned.

      • If you need the index of the found element in the array, use arrFindLastIndex.
      • @@ -22,16 +22,16 @@
      • If an existing, yet-unvisited element of the array is changed by callbackFn, its value passed to the callbackFn will be the value at the time that element gets visited. Deleted elements are visited as if they were undefined.
      -

      Type Parameters

      • T

        Identifies the base type of array elements

        -
      • E

        Identifies a more specific instance of the base array type

        -

      Parameters

      • theArray: ArrayLike<T>

        The array or array like object of elements to be searched.

        -
      • callbackFn: ArrPredicateCallbackFn<T, E> | ArrPredicateCallbackFn2<T>

        A function that accepts up to three arguments of type ArrPredicateCallbackFn or +

        Type Parameters

        • T

          Identifies the base type of array elements

          +
        • E

          Identifies a more specific instance of the base array type

          +

        Parameters

        • theArray: ArrayLike<T>

          The array or array like object of elements to be searched.

          +
        • callbackFn: ArrPredicateCallbackFn<T, E> | ArrPredicateCallbackFn2<T>

          A function that accepts up to three arguments of type ArrPredicateCallbackFn or ArrPredicateCallbackFn2. The predicate function is called for each element in the thArray until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.

          -
        • Optional thisArg: any

          A value to use as this when executing callbackFn. Defaults to the array if not provided.

          +
        • Optional thisArg: any

          A value to use as this when executing callbackFn. Defaults to the array if not provided.

        Returns T | E | undefined

        The last element in the array that satisfies the provided testing function. Otherwise, undefined is returned.

        Since

        0.8.0

        Example

        const inventory = [
        { name: "apples", quantity: 2 },
        { name: "bananas", quantity: 0 },
        { name: "cherries", quantity: 5 },
        ];

        function isCherries(fruit) {
        return fruit.name === "cherries";
        }

        console.log(polyArrFindLast(inventory, isCherries));
        // { name: 'cherries', quantity: 5 }

        function isPrime(element, index, array) {
        let start = 2;
        while (start <= Math.sqrt(element)) {
        if (element % start++ < 1) {
        return false;
        }
        }
        return element > 1;
        }

        console.log(polyArrFindLast([4, 6, 8, 12], isPrime)); // undefined, not found
        console.log(polyArrFindLast([4, 5, 7, 12], isPrime)); // 7
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/polyArrFindLastIndex.html b/docs/typedoc/functions/polyArrFindLastIndex.html index 3379592f..f0460166 100644 --- a/docs/typedoc/functions/polyArrFindLastIndex.html +++ b/docs/typedoc/functions/polyArrFindLastIndex.html @@ -1,4 +1,4 @@ -polyArrFindLastIndex | @nevware21/ts-utils

Function polyArrFindLastIndex

  • The polyArrFindLastIndex() method iterates the array in reverse order and returns the index of the first element that +polyArrFindLastIndex | @nevware21/ts-utils

    Function polyArrFindLastIndex

    • The polyArrFindLastIndex() method iterates the array in reverse order and returns the index of the first element that satisfies the provided testing function. If no elements satisfy the testing function, -1 is returned.

      The polyArrFindLastIndex() method is an iterative method. It calls a provided callbackFn function once for each element in an array in descending-index order, until callbackFn returns a truthy value. polyArrFindLastIndex() then returns the @@ -13,14 +13,14 @@

    • If an existing, yet-unvisited element of the array is changed by callbackFn, its value passed to the callbackFn will be the value at the time that element gets visited. Deleted elements are visited as if they were undefined.
    -

    Type Parameters

    • T

      Identifies the base type of array elements

      -
    • E

      Identifies a more specific instance of the base array type

      -

    Parameters

    • theArray: ArrayLike<T>

      The array or array like object of elements to be searched.

      -
    • callbackFn: ArrPredicateCallbackFn<T, E> | ArrPredicateCallbackFn2<T>

      A function that accepts up to three arguments of type ArrPredicateCallbackFn or +

      Type Parameters

      • T

        Identifies the base type of array elements

        +
      • E

        Identifies a more specific instance of the base array type

        +

      Parameters

      • theArray: ArrayLike<T>

        The array or array like object of elements to be searched.

        +
      • callbackFn: ArrPredicateCallbackFn<T, E> | ArrPredicateCallbackFn2<T>

        A function that accepts up to three arguments of type ArrPredicateCallbackFn or ArrPredicateCallbackFn2. The predicate function is called for each element in the thArray until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.

        -
      • Optional thisArg: any

        A value to use as this when executing callbackFn. Defaults to the array if not provided.

        +
      • Optional thisArg: any

        A value to use as this when executing callbackFn. Defaults to the array if not provided.

      Returns number

      The index of the last (highest-index) element in the array that passes the test. Otherwise -1 if no matching element is found.

      Since

      0.8.0

      -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/polyArrFrom.html b/docs/typedoc/functions/polyArrFrom.html index d63904fd..a55176e5 100644 --- a/docs/typedoc/functions/polyArrFrom.html +++ b/docs/typedoc/functions/polyArrFrom.html @@ -1,12 +1,12 @@ -polyArrFrom | @nevware21/ts-utils

Function polyArrFrom

  • The polyArrFrom creates an new shallow-copied array from an array-like object or an iterable.

    -

    Type Parameters

    • T

      Identifies the element type of the array-like or iterable.

      -
    • U = T

      Identifies returned type of the array

      -

    Parameters

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/polyArrIncludes.html b/docs/typedoc/functions/polyArrIncludes.html index 26a5ec0a..223be6fb 100644 --- a/docs/typedoc/functions/polyArrIncludes.html +++ b/docs/typedoc/functions/polyArrIncludes.html @@ -1,9 +1,9 @@ -polyArrIncludes | @nevware21/ts-utils

Function polyArrIncludes

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/polyGetKnownSymbol.html b/docs/typedoc/functions/polyGetKnownSymbol.html index 251af81b..5c3ee126 100644 --- a/docs/typedoc/functions/polyGetKnownSymbol.html +++ b/docs/typedoc/functions/polyGetKnownSymbol.html @@ -1,7 +1,7 @@ -polyGetKnownSymbol | @nevware21/ts-utils

Function polyGetKnownSymbol

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/polyIsArray.html b/docs/typedoc/functions/polyIsArray.html index 3bfb6b9d..784bbe7c 100644 --- a/docs/typedoc/functions/polyIsArray.html +++ b/docs/typedoc/functions/polyIsArray.html @@ -1,4 +1,4 @@ -polyIsArray | @nevware21/ts-utils

Function polyIsArray

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/polyNewSymbol.html b/docs/typedoc/functions/polyNewSymbol.html index 3c784b22..55b4f730 100644 --- a/docs/typedoc/functions/polyNewSymbol.html +++ b/docs/typedoc/functions/polyNewSymbol.html @@ -1,8 +1,8 @@ -polyNewSymbol | @nevware21/ts-utils

Function polyNewSymbol

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/polyObjEntries.html b/docs/typedoc/functions/polyObjEntries.html index 68b75281..e5b641ba 100644 --- a/docs/typedoc/functions/polyObjEntries.html +++ b/docs/typedoc/functions/polyObjEntries.html @@ -1,6 +1,6 @@ -polyObjEntries | @nevware21/ts-utils

Function polyObjEntries

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/polyObjHasOwn.html b/docs/typedoc/functions/polyObjHasOwn.html index df74b86b..cb8bea79 100644 --- a/docs/typedoc/functions/polyObjHasOwn.html +++ b/docs/typedoc/functions/polyObjHasOwn.html @@ -1,4 +1,4 @@ -polyObjHasOwn | @nevware21/ts-utils

Function polyObjHasOwn

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/polyObjKeys.html b/docs/typedoc/functions/polyObjKeys.html index ed2caee5..876f118a 100644 --- a/docs/typedoc/functions/polyObjKeys.html +++ b/docs/typedoc/functions/polyObjKeys.html @@ -1,5 +1,5 @@ -polyObjKeys | @nevware21/ts-utils

Function polyObjKeys

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/polyStrIncludes.html b/docs/typedoc/functions/polyStrIncludes.html index c524ee68..ff73f4d0 100644 --- a/docs/typedoc/functions/polyStrIncludes.html +++ b/docs/typedoc/functions/polyStrIncludes.html @@ -1,12 +1,12 @@ -polyStrIncludes | @nevware21/ts-utils

Function polyStrIncludes

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/polyStrSubstr.html b/docs/typedoc/functions/polyStrSubstr.html index 31bdfa08..5626f05e 100644 --- a/docs/typedoc/functions/polyStrSubstr.html +++ b/docs/typedoc/functions/polyStrSubstr.html @@ -1,8 +1,8 @@ -polyStrSubstr | @nevware21/ts-utils

Function polyStrSubstr

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/polyStrSymSplit.html b/docs/typedoc/functions/polyStrSymSplit.html index 9e37ee12..3bf64787 100644 --- a/docs/typedoc/functions/polyStrSymSplit.html +++ b/docs/typedoc/functions/polyStrSymSplit.html @@ -1,11 +1,11 @@ -polyStrSymSplit | @nevware21/ts-utils

Function polyStrSymSplit

  • The polyStrSymSplit() splits a string into substrings using the Symbol.split +polyStrSymSplit | @nevware21/ts-utils

    Function polyStrSymSplit

    • The polyStrSymSplit() splits a string into substrings using the Symbol.split method from the splitter object to provide custom behavior. It uses getKnownSymbol to get the WellKnownSymbols.split symbol which will return the polyfill symbol value.

      -

      Parameters

      • value: string

        The string value to be split into substrings.

        -
      • splitter: {
            [split](string, limit?): string[];
        }

        The object which contains a Symbol.split method, Omitting splitter or passing +

        Parameters

        • value: string

          The string value to be split into substrings.

          +
        • splitter: {
              [split](string, limit?): string[];
          }

          The object which contains a Symbol.split method, Omitting splitter or passing an object that doesn't contain a Symbol.split causes it to return an array with the calling string as a single element.

          -
          • [split]:function
        • Optional limit: number

          A non-negative integer specifying a limit on the number of substrings to be +

          • [split]:function
        • Optional limit: number

          A non-negative integer specifying a limit on the number of substrings to be included in the array. If provided, splits the string at each occurrence of the specified separator, but stops when limit entries have been placed in the array. Any leftover text is not included in the array at all.

          @@ -18,4 +18,4 @@

          Since

          0.9.1

          Example

          const splitByNumber = {
          [getKnownSymbol<typeof Symbol.split>(WellKnownSymbols.split)]: (str: string) => {
          let num = 1;
          let pos = 0;
          const result = [];
          while (pos < str.length) {
          const matchPos = strIndexOf(str, asString(num), pos);
          if (matchPos === -1) {
          result.push(strSubstring(str, pos));
          break;
          }
          result.push(strSubstring(str, pos, matchPos));
          pos = matchPos + asString(num).length;
          num++;
          }
          return result;
          }
          };

          const myString = "a1bc2c5d3e4f";
          console.log(polyStrSymSplit(myString, splitByNumber)); // [ "a", "bc", "c5d", "e", "f" ]
          -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/polyStrTrim.html b/docs/typedoc/functions/polyStrTrim.html index 1a00091c..293a7176 100644 --- a/docs/typedoc/functions/polyStrTrim.html +++ b/docs/typedoc/functions/polyStrTrim.html @@ -1,10 +1,10 @@ -polyStrTrim | @nevware21/ts-utils

Function polyStrTrim

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/polyStrTrimEnd.html b/docs/typedoc/functions/polyStrTrimEnd.html index a5e91d84..fa7d7a24 100644 --- a/docs/typedoc/functions/polyStrTrimEnd.html +++ b/docs/typedoc/functions/polyStrTrimEnd.html @@ -1,6 +1,6 @@ -polyStrTrimEnd | @nevware21/ts-utils

Function polyStrTrimEnd

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/polyStrTrimStart.html b/docs/typedoc/functions/polyStrTrimStart.html index 715b2c9a..aabe03b2 100644 --- a/docs/typedoc/functions/polyStrTrimStart.html +++ b/docs/typedoc/functions/polyStrTrimStart.html @@ -1,6 +1,6 @@ -polyStrTrimStart | @nevware21/ts-utils

Function polyStrTrimStart

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/polySymbolFor.html b/docs/typedoc/functions/polySymbolFor.html index 3237c71e..8183c0d6 100644 --- a/docs/typedoc/functions/polySymbolFor.html +++ b/docs/typedoc/functions/polySymbolFor.html @@ -1,4 +1,4 @@ -polySymbolFor | @nevware21/ts-utils

Function polySymbolFor

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/polySymbolKeyFor.html b/docs/typedoc/functions/polySymbolKeyFor.html index 7bbea6bb..264e692e 100644 --- a/docs/typedoc/functions/polySymbolKeyFor.html +++ b/docs/typedoc/functions/polySymbolKeyFor.html @@ -1,4 +1,4 @@ -polySymbolKeyFor | @nevware21/ts-utils

Function polySymbolKeyFor

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/polyUtcNow.html b/docs/typedoc/functions/polyUtcNow.html index ba2add8a..b00d757b 100644 --- a/docs/typedoc/functions/polyUtcNow.html +++ b/docs/typedoc/functions/polyUtcNow.html @@ -1,4 +1,4 @@ -polyUtcNow | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/readArgs.html b/docs/typedoc/functions/readArgs.html index 131babde..57035d0e 100644 --- a/docs/typedoc/functions/readArgs.html +++ b/docs/typedoc/functions/readArgs.html @@ -1,16 +1,16 @@ -readArgs | @nevware21/ts-utils
  • Read the arguments from the provided array, iterator / or generator function +readArgs | @nevware21/ts-utils

    • Read the arguments from the provided array, iterator / or generator function When processing an Iterable and a negative start or end is provided the entire iterator will be processed into an array before applying the start / end restrictions and when undefined or >= 0 any iterator will not be fully processed.

      -

      Type Parameters

      • T = any

      Parameters

      • theArgs: ArrayLike<T> | Iterable<T>

        The arguments to process, may be ArrayLike or an Iterable

        -
      • Optional start: number

        Zero-based index at which to start extraction, converted to an integer.

        +

        Type Parameters

        • T = any

        Parameters

        • theArgs: ArrayLike<T> | Iterable<T>

          The arguments to process, may be ArrayLike or an Iterable

          +
        • Optional start: number

          Zero-based index at which to start extraction, converted to an integer.

          • Negative index counts back from the end of the array or iteration
          • if start < 0, start + (array.length || iterator.count) is used.
          • If start < -array.length or start is omitted, 0 is used.
          • If start >= array.length, nothing is extracted.
          -
        • Optional end: number

          Zero-based index at which to end extraction, converted to an integer. readArgs() extracts +

        • Optional end: number

          Zero-based index at which to end extraction, converted to an integer. readArgs() extracts up to but not including end.

          • Negative index counts back from the end of the array — if end < 0, end + array.length is used.
          • @@ -22,4 +22,4 @@

        Returns T[]

        A new array with the extracted elements

        Example

        function myFunc<T>(firstArg: T, ...otherArgs) {
        // Read all of the arguments
        let allArgs = readArgs(arguments);

        // Get all of the arguments after the first
        let optArgs = readArgs(arguments, 1);
        }

        myFunc("Hello");
        myFunc("Hello", "Darkness", "my", "old", "friend", ".");

        function* myGenerator() {
        yield "Hello";
        yield "Darkness";
        yield "my";
        yield "old";
        yield "friend";
        }

        function* myGenerator2() {
        yield "I've";
        yield "come";
        yield "to";
        yield "talk";
        yield "with";
        yield "you";
        yield "again";
        }

        readArgs(myGenerator());
        // [ "Hello", "Darkness", "my", "old", "friend"]);

        readArgs(myGenerator(), 1);
        // [ "Darkness", "my", "old", "friend"]);

        readArgs(myGenerator2());
        // [ "I've", "come", "to", "talk", "with", "you", "again" ]);

        readArgs(myGenerator2(), 0, -2);
        // [ "I've", "come", "to", "talk", "with" ]);

        readArgs(myGenerator2(), -3, -2);
        // [ "with" ]);
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/safe.html b/docs/typedoc/functions/safe.html index 1f31c213..9e3a838f 100644 --- a/docs/typedoc/functions/safe.html +++ b/docs/typedoc/functions/safe.html @@ -1,11 +1,11 @@ -safe | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/safeGet.html b/docs/typedoc/functions/safeGet.html index 5407a043..4b96479c 100644 --- a/docs/typedoc/functions/safeGet.html +++ b/docs/typedoc/functions/safeGet.html @@ -1,10 +1,10 @@ -safeGet | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/safeGetLazy.html b/docs/typedoc/functions/safeGetLazy.html index 8530f368..1e25a331 100644 --- a/docs/typedoc/functions/safeGetLazy.html +++ b/docs/typedoc/functions/safeGetLazy.html @@ -1,12 +1,12 @@ -safeGetLazy | @nevware21/ts-utils

Function safeGetLazy

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/scheduleIdleCallback.html b/docs/typedoc/functions/scheduleIdleCallback.html index e1f0b085..96469486 100644 --- a/docs/typedoc/functions/scheduleIdleCallback.html +++ b/docs/typedoc/functions/scheduleIdleCallback.html @@ -1,4 +1,4 @@ -scheduleIdleCallback | @nevware21/ts-utils

Function scheduleIdleCallback

  • Queues a function to be called during a browser's idle periods. This enables developers to +scheduleIdleCallback | @nevware21/ts-utils

    Function scheduleIdleCallback

    • Queues a function to be called during a browser's idle periods. This enables developers to perform background and low priority work on the main event loop, without impacting latency-critical events such as animation and input response. Functions are generally called in first-in-first-out order; however, callbacks which have a timeout specified may be called out-of-order if necessary @@ -9,11 +9,11 @@ it will fallback to use setTimeout with either the provided timeout or the current default idle timeout, which can be set via setDefaultIdleTimeout. It will always supply a deadline which indicates that the request timed out.

      -

      Parameters

      • callback: IdleRequestCallback

        A reference to a function that should be called in the near future, when the +

        Parameters

        • callback: IdleRequestCallback

          A reference to a function that should be called in the near future, when the event loop is idle. The callback function is passed an IdleDeadline object describing the amount of time available and whether or not the callback has been run because the timeout period expired.

          -
        • Optional options: IdleRequestOptions

          Contains optional configuration parameters. Currently only one property is defined: +

        • Optional options: IdleRequestOptions

          Contains optional configuration parameters. Currently only one property is defined: timeout If the number of milliseconds represented by this parameter has elapsed and the callback has not already been called, then a task to execute the callback is queued in the event loop (even if doing so risks causing a negative performance impact). timeout must be a positive value or it @@ -23,4 +23,4 @@

          Since

          0.4.4

          Example

          let idleCalled = false;
          let idleTimedOut = false;
          let theIdleTimer = scheduleIdleCallback((idleDeadline: IdleDeadline) => {
          // This callback will be called when the system is idle (via requestIdleCallback) or after the provided timeout 100ms
          idleCalled = true;
          idleTimedOut = idleDeadline?.didTimeout;
          while ((idleDeadline.timeRemaining() > 0 || deadline.didTimeout)) {
          // Do some background operations while there is time remaining or we timed out
          // Unlike interval timers this callback will NOT be called again unless you call "refresh"
          // to restart it or create a new idle timer
          }
          }, 100);

          // Instead of calling cancelIdleCallback() with the returned value from requestIdleCallback() the returned
          // handler instance can be used instead to cancel the idle timer
          theIdleTimer.cancel();
          theIdleTimer.enabled; // false

          // You can start the timer via enabled
          theIdleTimer.enabled = true;

          // You can also "restart" the timer, whether it has previously triggered not not via the `refresh()`
          theIdleTimer.refresh();
          -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/scheduleInterval.html b/docs/typedoc/functions/scheduleInterval.html index 0622b9a3..aa1b6a2a 100644 --- a/docs/typedoc/functions/scheduleInterval.html +++ b/docs/typedoc/functions/scheduleInterval.html @@ -1,11 +1,11 @@ -scheduleInterval | @nevware21/ts-utils

Function scheduleInterval

  • Repeatedly calls a function or executes a code snippet, with a fixed time delay between each call.

    -

    Type Parameters

    • A extends any[]

    Parameters

    • callback: ((...args) => void)

      The function to be executed after the timer expires.

      -
        • (...args): void
        • Parameters

          • Rest ...args: A

          Returns void

    • timeout: number

      The time, in milliseconds that the timer should wait before the specified +scheduleInterval | @nevware21/ts-utils

      Function scheduleInterval

      • Repeatedly calls a function or executes a code snippet, with a fixed time delay between each call.

        +

        Type Parameters

        • A extends any[]

        Parameters

        • callback: ((...args) => void)

          The function to be executed after the timer expires.

          +
            • (...args): void
            • Parameters

              • Rest ...args: A

              Returns void

        • timeout: number

          The time, in milliseconds that the timer should wait before the specified function or code is executed. If this parameter is omitted, a value of 0 is used, meaning execute "immediately", or more accurately, the next event cycle.

          -
        • Rest ...args: A

          Additional arguments which are passed through to the function specified by callback.

          +
        • Rest ...args: A

          Additional arguments which are passed through to the function specified by callback.

        Returns ITimerHandler

        A ITimerHandler instance which can be used to cancel or refresh the interval.

        Since

        0.4.4

        Example

        let intervalCalled = 0;
        let theIntervalTimer = scheduleInvertal(() => {
        // This callback will be called every 100ms as this uses setInterval()
        intervalCalled++;
        }, 100);

        // Instead of calling clearInterval() with the returned value from setInterval() the returned
        // handler instance can be used instead to cancel the timer
        theIntervalTimer.cancel();
        theIntervalTimer.enabled; // false

        // You can start the timer via enabled
        theIntervalTimer.enabled = true;

        // Or you can also "restart" the timer, whether it has previously triggered not not via the `refresh()`
        theIntervalTimer.refresh();
        -

      Generated using TypeDoc

      \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/scheduleTimeout.html b/docs/typedoc/functions/scheduleTimeout.html index fdd0f9e6..2a9d7f1c 100644 --- a/docs/typedoc/functions/scheduleTimeout.html +++ b/docs/typedoc/functions/scheduleTimeout.html @@ -1,15 +1,15 @@ -scheduleTimeout | @nevware21/ts-utils

Function scheduleTimeout

  • Creates and starts a timer which executes a function or specified piece of code once the timer expires, this is simular +scheduleTimeout | @nevware21/ts-utils

    Function scheduleTimeout

    • Creates and starts a timer which executes a function or specified piece of code once the timer expires, this is simular to using setTimeout but provides a return object for cancelling and restarting (refresh) the timer.

      The timer may be cancelled (cleared) by calling the cancel() function on the returned ITimerHandler, or you can "reschedule" and/or "restart" the timer by calling the refresh() function on the returned ITimerHandler instance

      -

      Type Parameters

      • A extends any[]

      Parameters

      • callback: ((...args) => void)

        The function to be executed after the timer expires.

        -
          • (...args): void
          • Parameters

            • Rest ...args: A

            Returns void

      • timeout: number

        The time, in milliseconds that the timer should wait before the specified +

        Type Parameters

        • A extends any[]

        Parameters

        • callback: ((...args) => void)

          The function to be executed after the timer expires.

          +
            • (...args): void
            • Parameters

              • Rest ...args: A

              Returns void

        • timeout: number

          The time, in milliseconds that the timer should wait before the specified function or code is executed. If this parameter is omitted, a value of 0 is used, meaning execute "immediately", or more accurately, the next event cycle.

          -
        • Rest ...args: A

          Additional arguments which are passed through to the function specified by callback.

          +
        • Rest ...args: A

          Additional arguments which are passed through to the function specified by callback.

        Returns ITimerHandler

        A ITimerHandler instance which can be used to cancel the timeout.

        Since

        0.4.4

        Example

        let timeoutCalled = false;
        let theTimeout = scheduleTimeout(() => {
        // This callback will be called after 100ms as this uses setTimeout()
        timeoutCalled = true;
        }, 100);

        // Instead of calling clearTimeout() with the returned value from setTimeout() the returned
        // handler instance can be used instead to cancel the timer
        theTimeout.cancel();
        theTimeout.enabled; // false

        // You can start the timer via enabled
        theTimeout.enabled = true;

        // You can also "restart" the timer, whether it has previously triggered not not via the `refresh()`
        theTimeout.refresh();
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/scheduleTimeoutWith.html b/docs/typedoc/functions/scheduleTimeoutWith.html index 943bc959..cd0a7c21 100644 --- a/docs/typedoc/functions/scheduleTimeoutWith.html +++ b/docs/typedoc/functions/scheduleTimeoutWith.html @@ -1,21 +1,21 @@ -scheduleTimeoutWith | @nevware21/ts-utils

Function scheduleTimeoutWith

  • Creates and starts a timer which executes a function or specified piece of code once the timer expires. The overrideFn will be +scheduleTimeoutWith | @nevware21/ts-utils

    Function scheduleTimeoutWith

    • Creates and starts a timer which executes a function or specified piece of code once the timer expires. The overrideFn will be used to create the timer, this is simular to using setTimeout but provides a return object for cancelling and restarting (refresh) the timer.

      The timer may be cancelled (cleared) by calling the cancel() function on the returned ITimerHandler, or you can "reschedule" and/or "restart" the timer by calling the refresh() function on the returned ITimerHandler instance

      -

      Type Parameters

      • A extends any[]

      Parameters

      • overrideFn: TimeoutOverrideFn | TimeoutOverrideFuncs

        setTimeout override function this will be called instead of the setTimeout, if the value +

        Type Parameters

        • A extends any[]

        Parameters

        • overrideFn: TimeoutOverrideFn | TimeoutOverrideFuncs

          setTimeout override function this will be called instead of the setTimeout, if the value of overrideFn is null or undefined it will revert back to the native setTimeout. May also be an array with contains both the setTimeout and clearTimeout override functions, if either is not provided the default native functions will be used

          -
        • callback: ((...args) => void)

          The function to be executed after the timer expires.

          -
            • (...args): void
            • Parameters

              • Rest ...args: A

              Returns void

        • timeout: number

          The time, in milliseconds that the timer should wait before the specified +

        • callback: ((...args) => void)

          The function to be executed after the timer expires.

          +
            • (...args): void
            • Parameters

              • Rest ...args: A

              Returns void

        • timeout: number

          The time, in milliseconds that the timer should wait before the specified function or code is executed. If this parameter is omitted, a value of 0 is used, meaning execute "immediately", or more accurately, the next event cycle.

          -
        • Rest ...args: A

          Additional arguments which are passed through to the function specified by callback.

          +
        • Rest ...args: A

          Additional arguments which are passed through to the function specified by callback.

        Returns ITimerHandler

        A ITimerHandler instance which can be used to cancel the timeout.

        Since

        0.4.4

        Example

        let timeoutCalled = false;
        // Your own "setTimeout" implementation to allow you to perform additional operations or possible wrap
        // the callback to add timings.
        function newSetTimeoutFn(callback: TimeoutOverrideFn) {
        overrideCalled ++;
        return setTimeout(callback, timeout);
        }

        let theTimeout = scheduleTimeoutWith(newSetTimeoutFn, () => {
        // This callback will be called after 100ms as this uses setTimeout()
        timeoutCalled = true;
        }, 100);

        // Instead of calling clearTimeout() with the returned value from setTimeout() the returned
        // handler instance can be used instead to cancel the timer
        theTimeout.cancel();
        theTimeout.enabled; // false

        // You can start the timer via enabled
        theTimeout.enabled = true;

        // You can also "restart" the timer, whether it has previously triggered not not via the `refresh()`
        theTimeout.refresh();

        Example

        let timeoutCalled = false;
        // Your own "setTimeout" implementation to allow you to perform additional operations or possible wrap
        // the callback to add timings.
        function newSetTimeoutFn(callback: TimeoutOverrideFn) {
        overrideCalled ++;
        return setTimeout(callback, timeout);
        }

        // Your own "clearTimeout" implementation to allow you to perform additional operations or possible wrap
        // the callback to add timings.
        function newClearTimeoutFn(timeoutId: number) {
        overrideCalled ++;
        return clearTimeout( timeout);
        }

        let theTimeout = scheduleTimeoutWith([newSetTimeoutFn, newClearTimeoutFn], () => {
        // This callback will be called after 100ms as this uses setTimeout()
        timeoutCalled = true;
        }, 100);

        // Instead of calling clearTimeout() with the returned value from setTimeout() the returned
        // handler instance can be used instead to cancel the timer, internally this will call the newClearTimeoutFn
        theTimeout.cancel();
        theTimeout.enabled; // false

        // You can start the timer via enabled
        theTimeout.enabled = true;

        // You can also "restart" the timer, whether it has previously triggered not not via the `refresh()`
        theTimeout.refresh();
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/setBypassLazyCache.html b/docs/typedoc/functions/setBypassLazyCache.html index 2dff6eea..016abdb9 100644 --- a/docs/typedoc/functions/setBypassLazyCache.html +++ b/docs/typedoc/functions/setBypassLazyCache.html @@ -1,6 +1,6 @@ -setBypassLazyCache | @nevware21/ts-utils

Function setBypassLazyCache

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/setDefaultIdleTimeout.html b/docs/typedoc/functions/setDefaultIdleTimeout.html index c758ce27..36ef0569 100644 --- a/docs/typedoc/functions/setDefaultIdleTimeout.html +++ b/docs/typedoc/functions/setDefaultIdleTimeout.html @@ -1,5 +1,5 @@ -setDefaultIdleTimeout | @nevware21/ts-utils

Function setDefaultIdleTimeout

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/setDefaultMaxExecutionTime.html b/docs/typedoc/functions/setDefaultMaxExecutionTime.html index e9b2b0e0..4b9a960c 100644 --- a/docs/typedoc/functions/setDefaultMaxExecutionTime.html +++ b/docs/typedoc/functions/setDefaultMaxExecutionTime.html @@ -1,8 +1,8 @@ -setDefaultMaxExecutionTime | @nevware21/ts-utils

Function setDefaultMaxExecutionTime

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/setValueByIter.html b/docs/typedoc/functions/setValueByIter.html index 17a67f80..a47ef92e 100644 --- a/docs/typedoc/functions/setValueByIter.html +++ b/docs/typedoc/functions/setValueByIter.html @@ -1,12 +1,12 @@ -setValueByIter | @nevware21/ts-utils

Function setValueByIter

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/setValueByKey.html b/docs/typedoc/functions/setValueByKey.html index 68ed8a6c..73343e07 100644 --- a/docs/typedoc/functions/setValueByKey.html +++ b/docs/typedoc/functions/setValueByKey.html @@ -1,9 +1,9 @@ -setValueByKey | @nevware21/ts-utils

Function setValueByKey

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strCamelCase.html b/docs/typedoc/functions/strCamelCase.html index 7fdc4a5a..05ddf0f0 100644 --- a/docs/typedoc/functions/strCamelCase.html +++ b/docs/typedoc/functions/strCamelCase.html @@ -1,12 +1,12 @@ -strCamelCase | @nevware21/ts-utils

Function strCamelCase

  • Convert the provided value to camelCased string, you can optionally specifify whether the +strCamelCase | @nevware21/ts-utils

    Function strCamelCase

    • Convert the provided value to camelCased string, you can optionally specifify whether the first caracter is upper cased (lowercase by default)from kebab - or snake _ case. All whitespace characters are removed If the value is not a string it will be converted.

      -

      Type Parameters

      • T

      Parameters

      • value: T

        The value to be converted to camelCased string

        -
      • Optional upperFirst: boolean

        Optionally, uppercase the first character of the first word, so when true +

        Type Parameters

        • T

        Parameters

        • value: T

          The value to be converted to camelCased string

          +
        • Optional upperFirst: boolean

          Optionally, uppercase the first character of the first word, so when true this will produce a Pascal Cased result.

        Returns string

        The camelCased version of the provided value.

        Since

        0.9.0

        Example

        strCamelCase(null);                  // "null"
        strCamelCase(undefined); // "undefined"
        strCamelCase("hello darkness"); // "helloDarkness"
        strCamelCase("hello_darkness"); // "helloDarkness"
        strCamelCase("_hello_darkness"); // "helloDarkness"
        strCamelCase("hello-darkness"); // "helloDarkness"
        strCamelCase("-hello-darkness"); // "helloDarkness"
        strCamelCase("hello darkness, my old friend."); // "helloDarknessMyOldFriend"

        // Uppercase first character
        strCamelCase("hello darkness", true); // "HelloDarkness"
        strCamelCase("hello_darkness", true); // "HelloDarkness"
        strCamelCase("_hello_darkness", true); // "HelloDarkness"
        strCamelCase("hello-darkness", true); // "HelloDarkness"
        strCamelCase("-hello-darkness", true); // "HelloDarkness"
        strCamelCase("hello darkness, my old friend.", true); // "HelloDarknessMyOldFriend"
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strContains.html b/docs/typedoc/functions/strContains.html index 72874170..99b16c7d 100644 --- a/docs/typedoc/functions/strContains.html +++ b/docs/typedoc/functions/strContains.html @@ -1,13 +1,13 @@ -strContains | @nevware21/ts-utils

Function strContains

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strEndsWith.html b/docs/typedoc/functions/strEndsWith.html index 8cb411d5..01709b87 100644 --- a/docs/typedoc/functions/strEndsWith.html +++ b/docs/typedoc/functions/strEndsWith.html @@ -1,5 +1,5 @@ -strEndsWith | @nevware21/ts-utils

Function strEndsWith

  • This method lets you determine whether or not a string ends with another string. This method is case-sensitive.

    -

    Parameters

    • value: string

      The value to be checked

      -
    • searchString: string

      The characters to be searched for at the end of value string.

      -
    • Optional length: number

      If provided, it is used as the length of value. Defaults to value.length.

      -

    Returns boolean

Generated using TypeDoc

\ No newline at end of file +strEndsWith | @nevware21/ts-utils

Function strEndsWith

  • This method lets you determine whether or not a string ends with another string. This method is case-sensitive.

    +

    Parameters

    • value: string

      The value to be checked

      +
    • searchString: string

      The characters to be searched for at the end of value string.

      +
    • Optional length: number

      If provided, it is used as the length of value. Defaults to value.length.

      +

    Returns boolean

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strIncludes.html b/docs/typedoc/functions/strIncludes.html index 9c726f6f..d3ada2b0 100644 --- a/docs/typedoc/functions/strIncludes.html +++ b/docs/typedoc/functions/strIncludes.html @@ -1,13 +1,13 @@ -strIncludes | @nevware21/ts-utils

Function strIncludes

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strIndexOf.html b/docs/typedoc/functions/strIndexOf.html index 72e3eb3f..fb9cef35 100644 --- a/docs/typedoc/functions/strIndexOf.html +++ b/docs/typedoc/functions/strIndexOf.html @@ -1,10 +1,10 @@ -strIndexOf | @nevware21/ts-utils
  • The strIndexOf() method, given two arguments: the string and a substring to search for, searches +strIndexOf | @nevware21/ts-utils

    • The strIndexOf() method, given two arguments: the string and a substring to search for, searches the entire calling string, and returns the index of the first occurrence of the specified substring. Given a thrid argument: a number, the method returns the first occurrence of the specified substring at an index greater than or equal to the specified number.

      -

      Parameters

      • value: string

        The value to be checked for the seeach string

        -
      • searchString: string

        The substring to search for in the value

        -
      • Optional position: number

        The starting position to search from

        +

        Parameters

        • value: string

          The value to be checked for the seeach string

          +
        • searchString: string

          The substring to search for in the value

          +
        • Optional position: number

          The starting position to search from

        Returns number

        Example

        strIndexOf('hello world', '') // returns 0
        strIndexOf('hello world', '', 0) // returns 0
        strIndexOf('hello world', '', 3) // returns 3
        strIndexOf('hello world', '', 8) // returns 8

        // However, if the thrid argument is greater than the length of the string
        strIndexOf('hello world', '', 11) // returns 11
        strIndexOf('hello world', '', 13) // returns 11
        strIndexOf('hello world', '', 22) // returns 11

        strIndexOf('Blue Whale', 'Blue') // returns 0
        strIndexOf('Blue Whale', 'Blute') // returns -1
        strIndexOf('Blue Whale', 'Whale', 0) // returns 5
        strIndexOf('Blue Whale', 'Whale', 5) // returns 5
        strIndexOf('Blue Whale', 'Whale', 7) // returns -1
        strIndexOf('Blue Whale', '') // returns 0
        strIndexOf('Blue Whale', '', 9) // returns 9
        strIndexOf('Blue Whale', '', 10) // returns 10
        strIndexOf('Blue Whale', '', 11) // returns 10
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strIsNullOrEmpty.html b/docs/typedoc/functions/strIsNullOrEmpty.html index 2a278dff..a096f967 100644 --- a/docs/typedoc/functions/strIsNullOrEmpty.html +++ b/docs/typedoc/functions/strIsNullOrEmpty.html @@ -1,4 +1,4 @@ -strIsNullOrEmpty | @nevware21/ts-utils

Function strIsNullOrEmpty

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strIsNullOrWhiteSpace.html b/docs/typedoc/functions/strIsNullOrWhiteSpace.html index e598fac0..108198b9 100644 --- a/docs/typedoc/functions/strIsNullOrWhiteSpace.html +++ b/docs/typedoc/functions/strIsNullOrWhiteSpace.html @@ -1,5 +1,5 @@ -strIsNullOrWhiteSpace | @nevware21/ts-utils

Function strIsNullOrWhiteSpace

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strKebabCase.html b/docs/typedoc/functions/strKebabCase.html index c07a607a..cdbc4944 100644 --- a/docs/typedoc/functions/strKebabCase.html +++ b/docs/typedoc/functions/strKebabCase.html @@ -1,11 +1,11 @@ -strKebabCase | @nevware21/ts-utils

Function strKebabCase

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strLastIndexOf.html b/docs/typedoc/functions/strLastIndexOf.html index 70ece357..3a9b8714 100644 --- a/docs/typedoc/functions/strLastIndexOf.html +++ b/docs/typedoc/functions/strLastIndexOf.html @@ -1,10 +1,10 @@ -strLastIndexOf | @nevware21/ts-utils

Function strLastIndexOf

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strLeft.html b/docs/typedoc/functions/strLeft.html index 1ad22201..e0507743 100644 --- a/docs/typedoc/functions/strLeft.html +++ b/docs/typedoc/functions/strLeft.html @@ -1,4 +1,4 @@ -strLeft | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strLetterCase.html b/docs/typedoc/functions/strLetterCase.html index 165a31c9..601739ad 100644 --- a/docs/typedoc/functions/strLetterCase.html +++ b/docs/typedoc/functions/strLetterCase.html @@ -1,9 +1,9 @@ -strLetterCase | @nevware21/ts-utils

Function strLetterCase

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strLower.html b/docs/typedoc/functions/strLower.html index 09c44ef9..c3eb4c69 100644 --- a/docs/typedoc/functions/strLower.html +++ b/docs/typedoc/functions/strLower.html @@ -1,8 +1,8 @@ -strLower | @nevware21/ts-utils
  • The strLower() method returns the value of the string converted to lower case. +strLower | @nevware21/ts-utils

    • The strLower() method returns the value of the string converted to lower case. strLower() does not affect the value of the string str itself.

      -

      Type Parameters

      • T

      Parameters

      • value: T

      Returns string

      A new string representing the calling string converted to lower case.

      +

    Type Parameters

    • T

    Parameters

    • value: T

    Returns string

    A new string representing the calling string converted to lower case.

    Since

    0.9.0

    Throws

    TypeError - When called on null or undefined.

    Example

    strLower("Hello");       // hello
    strLower("darkness"); // darkness

    strLower(null); // Throws TypeError
    strLower(undefined); // Throws TypeError
    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strPadEnd.html b/docs/typedoc/functions/strPadEnd.html index 5f504653..6c4f438c 100644 --- a/docs/typedoc/functions/strPadEnd.html +++ b/docs/typedoc/functions/strPadEnd.html @@ -1,7 +1,7 @@ -strPadEnd | @nevware21/ts-utils
  • The strPadEnd() method pads the current string with a given string (repeated, if needed) so that +strPadEnd | @nevware21/ts-utils

    • The strPadEnd() method pads the current string with a given string (repeated, if needed) so that the resulting string reaches a given length. The padding is applied from the end of the current string.

      -

      Parameters

      • value: string

        The value to be padded

        -
      • targetLength: number

        The length of the resulting string once the current value`` has been padded. If the targetLengthis lower thanvalue.length, the current string will be returned as-is. @param padString - The string to pad the current valuewith. If padString is too long to stay withintargetLength`, it will be truncated: for left-to-right languages the left-most part and for right-to-left +

        Parameters

        • value: string

          The value to be padded

          +
        • targetLength: number

          The length of the resulting string once the current value`` has been padded. If the targetLengthis lower thanvalue.length, the current string will be returned as-is. @param padString - The string to pad the current valuewith. If padString is too long to stay withintargetLength`, it will be truncated: for left-to-right languages the left-most part and for right-to-left languages the right-most will be applied. The default value for this parameter is " " (U+0020).

          -
        • Optional padString: string

        Returns string

        A String of the specified targetLength with the padString applied at the end of the current str.

        -

    Generated using TypeDoc

    \ No newline at end of file +
  • Optional padString: string

Returns string

A String of the specified targetLength with the padString applied at the end of the current str.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strPadStart.html b/docs/typedoc/functions/strPadStart.html index f0b296b7..77eecf5e 100644 --- a/docs/typedoc/functions/strPadStart.html +++ b/docs/typedoc/functions/strPadStart.html @@ -1,11 +1,11 @@ -strPadStart | @nevware21/ts-utils

Function strPadStart

Returns string

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strRepeat.html b/docs/typedoc/functions/strRepeat.html index 9ba122d2..9779e1a1 100644 --- a/docs/typedoc/functions/strRepeat.html +++ b/docs/typedoc/functions/strRepeat.html @@ -1,9 +1,9 @@ -strRepeat | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strRight.html b/docs/typedoc/functions/strRight.html index 26107eac..11343b30 100644 --- a/docs/typedoc/functions/strRight.html +++ b/docs/typedoc/functions/strRight.html @@ -1,4 +1,4 @@ -strRight | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strSlice.html b/docs/typedoc/functions/strSlice.html index 0dcd41f0..dcd0fce1 100644 --- a/docs/typedoc/functions/strSlice.html +++ b/docs/typedoc/functions/strSlice.html @@ -1,4 +1,4 @@ -strSlice | @nevware21/ts-utils
  • The strSlice() method extracts a section of a string and returns it as a new string, without +strSlice | @nevware21/ts-utils

    • The strSlice() method extracts a section of a string and returns it as a new string, without modifying the original string. strSlice() extracts the text from one string and returns a new string. Changes to the text in one string do not affect the other string. @@ -6,18 +6,18 @@ through the fourth character (characters indexed 1, 2, and 3). As an example, strSlice(2, -1) extracts the third character through the second to last character in the string.

      -

      Parameters

      • value: string

        The value to haveextract a number

        -
      • beginIndex: number

        The zero-based index at which to begin extraction. +

        Parameters

        • value: string

          The value to haveextract a number

          +
        • beginIndex: number

          The zero-based index at which to begin extraction. If beginIndex is negative, strSlice() begins extraction from value.length + beginIndex. (E.g. strSlice("test", -2) returns "st") If beginIndex is omitted, undefined, or cannot be converted to a number (using Number(beginIndex)), strSlice() begins extraction from the beginning of the string. (E.g. strSlice("test") returns "test") If beginIndex is greater than or equal to value.length, an empty string is returned. (E.g. strSlice("test", 4) returns "")

          -
        • Optional endIndex: number

          The index of the first character to exclude from the returned substring. +

        • Optional endIndex: number

          The index of the first character to exclude from the returned substring. If endIndex is omitted, undefined, or cannot be converted to a number (using Number(endIndex)) strSlice() extracts to the end of the string. (E.g. strSlice("test", 2) returns "st") If endIndex is greater than value.length, strSlice() also extracts to the end of the string. (E.g. strSlice("test", 2, 10)returns "st") IfendIndexis negative,strSlice()treats it asvalue.length + endIndex. (E.g, if endIndexis -2, it is treated asvalue.length - 2andstrSlice("test", 1, -2)returns "e") . IfendIndexrepresents a position that is before the one represented by startIndex,strSlice()returns "". (E.gstrSlice("test", 2, -10), strSlice("test", -1, -2) or strSlice("test", 3, 2)).

        Returns string

        A new string containing the extracted section of the string.

        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strSnakeCase.html b/docs/typedoc/functions/strSnakeCase.html index 9f6ff67e..10c24f48 100644 --- a/docs/typedoc/functions/strSnakeCase.html +++ b/docs/typedoc/functions/strSnakeCase.html @@ -1,11 +1,11 @@ -strSnakeCase | @nevware21/ts-utils

Function strSnakeCase

  • Convert the provided value to snake_cased string, you can optionally specify whther the result +strSnakeCase | @nevware21/ts-utils

    Function strSnakeCase

    • Convert the provided value to snake_cased string, you can optionally specify whther the result is all uppercased by passing true as the optional scream argument, otherwise the entire result will be lowercased. If the value is not a string it will be converted.

      -

      Type Parameters

      • T

      Parameters

      • value: T

        The value to be converted to snake_cased string

        -
      • Optional scream: boolean

        Optionally return the result as UpperCase (Screaming).

        +

        Type Parameters

        • T

        Parameters

        • value: T

          The value to be converted to snake_cased string

          +
        • Optional scream: boolean

          Optionally return the result as UpperCase (Screaming).

        Returns string

        The snake-cased version of the provided value

        Since

        0.9.0

        Example

        strSnakeCase(null);              // "null"
        strSnakeCase(undefined); // "undefined"
        strSnakeCase("hello darkness"); // "hello_darkness"
        strSnakeCase("hello_darkness"); // "hello_darkness"
        strSnakeCase("_hello_darkness"); // "_hello_darkness"
        strSnakeCase("hello-darkness"); // "hello_darkness"
        strSnakeCase("-hello-darkness"); // "_hello_darkness"
        strSnakeCase("hello darkness, my old friend."); // "hello_darkness_my_old_friend_"

        // Use optional Scream flag
        strSnakeCase("hello darkness", true); // "HELLO_DARKNESS"
        strSnakeCase("hello_darkness", true); // "HELLO_DARKNESS"
        strSnakeCase("_hello_darkness", true); // "_HELLO_DARKNESS"
        strSnakeCase("hello-darkness", true); // "HELLO_DARKNESS"
        strSnakeCase("-hello-darkness", true); // "_HELLO_DARKNESS"
        strSnakeCase("hello darkness, my old friend.", true); // "HELLO_DARKNESS_MY_OLD_FRIEND_"
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strSplit.html b/docs/typedoc/functions/strSplit.html index 6940c9b9..99c28889 100644 --- a/docs/typedoc/functions/strSplit.html +++ b/docs/typedoc/functions/strSplit.html @@ -1,13 +1,13 @@ -strSplit | @nevware21/ts-utils
  • The strSplit() splits a string into substrings using the pattern and divides a String +strSplit | @nevware21/ts-utils

    • The strSplit() splits a string into substrings using the pattern and divides a String into an ordered list of substrings by searching for the pattern, puts these substrings into an array, and returns the array.

      -

      Parameters

      • value: string

        The string value to be split into substrings.

        -
      • separator: string | RegExp

        The pattern describing where each split should occur. Can be undefined, a +

        Parameters

        • value: string

          The string value to be split into substrings.

          +
        • separator: string | RegExp

          The pattern describing where each split should occur. Can be undefined, a string, or an object with a Symbol.split method (if supported) — the typical example being a regular expression. Omitting separator or passing undefined causes strSplit() to return an array with the calling string as a single element. All values that are not undefined or objects with a @@split method are coerced to strings.

          -
        • Optional limit: number

          A non-negative integer specifying a limit on the number of substrings to be +

        • Optional limit: number

          A non-negative integer specifying a limit on the number of substrings to be included in the array. If provided, splits the string at each occurrence of the specified separator, but stops when limit entries have been placed in the array. Any leftover text is not included in the array at all.

          @@ -20,4 +20,4 @@

          Since

          0.9.1

          Example

          strSplit("Oh brave new world that has such people in it.", " ");
          // [ "Oh", "brave", "new", "world", "that", "has", "such", "people", "in", "it." ]

          strSplit("Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec", ",");
          // [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ]
          -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strStartsWith.html b/docs/typedoc/functions/strStartsWith.html index b4c64883..7e7822cd 100644 --- a/docs/typedoc/functions/strStartsWith.html +++ b/docs/typedoc/functions/strStartsWith.html @@ -1,5 +1,5 @@ -strStartsWith | @nevware21/ts-utils

Function strStartsWith

  • This method lets you determine whether or not a string begins with another string. This method is case-sensitive.

    -

    Parameters

    • value: string

      The value to be checked

      -
    • searchString: string

      The characters to be searched for at the start of the string

      -
    • Optional length: number

    Returns boolean

    true if the given characters are found at the beginning of the string; otherwise, false.

    -

Generated using TypeDoc

\ No newline at end of file +strStartsWith | @nevware21/ts-utils

Function strStartsWith

  • This method lets you determine whether or not a string begins with another string. This method is case-sensitive.

    +

    Parameters

    • value: string

      The value to be checked

      +
    • searchString: string

      The characters to be searched for at the start of the string

      +
    • Optional length: number

    Returns boolean

    true if the given characters are found at the beginning of the string; otherwise, false.

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strSubstr.html b/docs/typedoc/functions/strSubstr.html index 661cc249..5b3d7ada 100644 --- a/docs/typedoc/functions/strSubstr.html +++ b/docs/typedoc/functions/strSubstr.html @@ -1,6 +1,6 @@ -strSubstr | @nevware21/ts-utils
  • The strSubstr() method returns a portion of the string, starting at the specified index and extending for a given +strSubstr | @nevware21/ts-utils

    • The strSubstr() method returns a portion of the string, starting at the specified index and extending for a given number of characters afterwards.

      -

      Parameters

      • value: string

        The string value to return the substring from.

        -
      • indexStart: number
      • Optional indexEnd: number

      Returns string

      A new string containing the specified part of the given string.

      +

    Parameters

    • value: string

      The string value to return the substring from.

      +
    • indexStart: number
    • Optional indexEnd: number

    Returns string

    A new string containing the specified part of the given string.

    Since

    0.4.2

    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strSubstring.html b/docs/typedoc/functions/strSubstring.html index c38f6c05..02aca978 100644 --- a/docs/typedoc/functions/strSubstring.html +++ b/docs/typedoc/functions/strSubstring.html @@ -1,4 +1,4 @@ -strSubstring | @nevware21/ts-utils

Function strSubstring

  • The strSubstring() method returns the part of the string between the start and end indexes, or to the end of the string.

    +strSubstring | @nevware21/ts-utils

    Function strSubstring

    • The strSubstring() method returns the part of the string between the start and end indexes, or to the end of the string.

      strSubstring() extracts characters from indexStart up to but not including indexEnd. In particular:

      • If indexEnd is omitted, strSubstring() extracts characters to the end of the string.
      • @@ -7,10 +7,10 @@

      Any argument value that is less than 0 or greater than value.length is treated as if it were 0 and value.length, respectively.

      Any argument value that is NaN is treated as if it were 0.

      -

      Parameters

      • value: string

        The string value to return the substring from.

        -
      • indexStart: number

        The index of the first character to include in the returned substring.

        -
      • Optional indexEnd: number

        The index of the first character to exclude from the returned substring.

        +

        Parameters

        • value: string

          The string value to return the substring from.

          +
        • indexStart: number

          The index of the first character to include in the returned substring.

          +
        • Optional indexEnd: number

          The index of the first character to exclude from the returned substring.

        Returns string

        A new string containing the specified part of the given string

        Example

        const anyString = 'Nevware21';
        // Displays 'N'
        console.log(strSubstring(anyString, 0, 1));
        console.log(strSubstring(anyString, 1, 0));

        // Displays 'Nevwar'
        console.log(strSubstring(anyString, 0, 6));

        // Displays 'are21'
        console.log(strSubstring(anyString, 4));

        // Displays 'are'
        console.log(strSubstring(anyString, 4, 7));

        // Displays '21'
        console.log(strSubstring(anyString, 7, 4));

        // Displays 'Nevware'
        console.log(strSubstring(anyString, 0, 7));

        // Displays 'Nevware21'
        console.log(strSubstring(anyString, 0, 10));
        -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strSymSplit.html b/docs/typedoc/functions/strSymSplit.html index 0762b2f8..2958f770 100644 --- a/docs/typedoc/functions/strSymSplit.html +++ b/docs/typedoc/functions/strSymSplit.html @@ -1,13 +1,13 @@ -strSymSplit | @nevware21/ts-utils

Function strSymSplit

  • The strSymSplit() splits a string into substrings using the Symbol.split +strSymSplit | @nevware21/ts-utils

    Function strSymSplit

    • The strSymSplit() splits a string into substrings using the Symbol.split method from the splitter object to provide custom behavior. If the runtime supports symbols then the default runtime split method will be called, It will use getKnownSymbol to get the WellKnownSymbols.split symbol which will return the runtime symbol or the polyfill symbol when not supported by the runtime.

      -

      Parameters

      • value: string

        The string value to be split into substrings.

        -
      • splitter: {
            [split](string, limit?): string[];
        }

        The object which contains a Symbol.split method, Omitting splitter or passing +

        Parameters

        • value: string

          The string value to be split into substrings.

          +
        • splitter: {
              [split](string, limit?): string[];
          }

          The object which contains a Symbol.split method, Omitting splitter or passing an object that doesn't contain a Symbol.split causes it to return an array with the calling string as a single element.

          -
          • [split]:function
            • Parameters

              • string: string
              • Optional limit: number

              Returns string[]

        • Optional limit: number

          A non-negative integer specifying a limit on the number of substrings to be +

          • [split]:function
            • Parameters

              • string: string
              • Optional limit: number

              Returns string[]

        • Optional limit: number

          A non-negative integer specifying a limit on the number of substrings to be included in the array. If provided, splits the string at each occurrence of the specified separator, but stops when limit entries have been placed in the array. Any leftover text is not included in the array at all.

          @@ -20,4 +20,4 @@

          Since

          0.9.1

          Example

          const splitByNumber = {
          [Symbol.split]: (str: string) => {
          let num = 1;
          let pos = 0;
          const result = [];
          while (pos < str.length) {
          const matchPos = strIndexOf(str, asString(num), pos);
          if (matchPos === -1) {
          result.push(strSubstring(str, pos));
          break;
          }
          result.push(strSubstring(str, pos, matchPos));
          pos = matchPos + asString(num).length;
          num++;
          }
          return result;
          }
          };

          const myString = "a1bc2c5d3e4f";
          console.log(strSymSplit(myString, splitByNumber)); // [ "a", "bc", "c5d", "e", "f" ]
          -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strTrim.html b/docs/typedoc/functions/strTrim.html index 1cc7be29..2280ac7e 100644 --- a/docs/typedoc/functions/strTrim.html +++ b/docs/typedoc/functions/strTrim.html @@ -1,10 +1,10 @@ -strTrim | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strTrimEnd.html b/docs/typedoc/functions/strTrimEnd.html index f565a5a8..2f7bd4ed 100644 --- a/docs/typedoc/functions/strTrimEnd.html +++ b/docs/typedoc/functions/strTrimEnd.html @@ -1,6 +1,6 @@ -strTrimEnd | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strTrimLeft.html b/docs/typedoc/functions/strTrimLeft.html index 689eb064..f5fe6f74 100644 --- a/docs/typedoc/functions/strTrimLeft.html +++ b/docs/typedoc/functions/strTrimLeft.html @@ -1,6 +1,6 @@ -strTrimLeft | @nevware21/ts-utils

Function strTrimLeft

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strTrimRight.html b/docs/typedoc/functions/strTrimRight.html index 5265dfde..1626d0dc 100644 --- a/docs/typedoc/functions/strTrimRight.html +++ b/docs/typedoc/functions/strTrimRight.html @@ -1,6 +1,6 @@ -strTrimRight | @nevware21/ts-utils

Function strTrimRight

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strTrimStart.html b/docs/typedoc/functions/strTrimStart.html index 521512c3..73e73259 100644 --- a/docs/typedoc/functions/strTrimStart.html +++ b/docs/typedoc/functions/strTrimStart.html @@ -1,6 +1,6 @@ -strTrimStart | @nevware21/ts-utils

Function strTrimStart

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/strUpper.html b/docs/typedoc/functions/strUpper.html index dd42317e..aa5f8284 100644 --- a/docs/typedoc/functions/strUpper.html +++ b/docs/typedoc/functions/strUpper.html @@ -1,9 +1,9 @@ -strUpper | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/symbolFor.html b/docs/typedoc/functions/symbolFor.html index 35bbefbd..4bfc208a 100644 --- a/docs/typedoc/functions/symbolFor.html +++ b/docs/typedoc/functions/symbolFor.html @@ -1,5 +1,5 @@ -symbolFor | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/symbolKeyFor.html b/docs/typedoc/functions/symbolKeyFor.html index a2a584ca..8cd839f0 100644 --- a/docs/typedoc/functions/symbolKeyFor.html +++ b/docs/typedoc/functions/symbolKeyFor.html @@ -1,5 +1,5 @@ -symbolKeyFor | @nevware21/ts-utils

Function symbolKeyFor

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/throwError.html b/docs/typedoc/functions/throwError.html index 34913edf..8b0ebfca 100644 --- a/docs/typedoc/functions/throwError.html +++ b/docs/typedoc/functions/throwError.html @@ -1,2 +1,2 @@ -throwError | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file +throwError | @nevware21/ts-utils
  • Throw an error exception with the specified optional message

    +

    Parameters

    • Optional message: string

    Returns never

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/throwRangeError.html b/docs/typedoc/functions/throwRangeError.html index 51b615e5..caf4ebe0 100644 --- a/docs/typedoc/functions/throwRangeError.html +++ b/docs/typedoc/functions/throwRangeError.html @@ -1,2 +1,2 @@ -throwRangeError | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file +throwRangeError | @nevware21/ts-utils

Function throwRangeError

  • Throw a RangeError with the specified optional message

    +

    Parameters

    • Optional message: string

    Returns never

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/throwTypeError.html b/docs/typedoc/functions/throwTypeError.html index b9a9ebaf..a9010439 100644 --- a/docs/typedoc/functions/throwTypeError.html +++ b/docs/typedoc/functions/throwTypeError.html @@ -1,2 +1,2 @@ -throwTypeError | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file +throwTypeError | @nevware21/ts-utils

Function throwTypeError

  • Throw a type error with the specified optional message

    +

    Parameters

    • Optional message: string

    Returns never

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/throwUnsupported.html b/docs/typedoc/functions/throwUnsupported.html index f0441964..75d59a08 100644 --- a/docs/typedoc/functions/throwUnsupported.html +++ b/docs/typedoc/functions/throwUnsupported.html @@ -1,5 +1,5 @@ -throwUnsupported | @nevware21/ts-utils

Function throwUnsupported

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/functions/utcNow.html b/docs/typedoc/functions/utcNow.html index 71ead33d..8aa3478a 100644 --- a/docs/typedoc/functions/utcNow.html +++ b/docs/typedoc/functions/utcNow.html @@ -1,4 +1,4 @@ -utcNow | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/hierarchy.html b/docs/typedoc/hierarchy.html index 2cd5c070..47e8861b 100644 --- a/docs/typedoc/hierarchy.html +++ b/docs/typedoc/hierarchy.html @@ -1 +1 @@ -@nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file +@nevware21/ts-utils

@nevware21/ts-utils

Class Hierarchy

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/index.html b/docs/typedoc/index.html index 33366404..43911dd0 100644 --- a/docs/typedoc/index.html +++ b/docs/typedoc/index.html @@ -1,320 +1,320 @@ -@nevware21/ts-utils

@nevware21/ts-utils

Index

Type Aliases

Functions

Array

ArrayLike

Cache

Conversion

Diagnostic

Enum

Environment

Error

Function

Helpers

Iterator

Lazy

Math

Object

Object - Deep Copy

Polyfill

RegExp

Safe

String

Symbol

Timer

Type Identity

Value

Value Check

Generated using TypeDoc

\ No newline at end of file +@nevware21/ts-utils

@nevware21/ts-utils

Index

Type Aliases

Functions

Array

ArrayLike

Cache

Conversion

Diagnostic

Enum

Environment

Error

Function

Helpers

Iterator

Lazy

Math

Object

Object - Deep Copy

Polyfill

RegExp

Safe

String

Symbol

Timer

Type Identity

Value

Value Check

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/interfaces/CreateIteratorContext.html b/docs/typedoc/interfaces/CreateIteratorContext.html index 6b755f5e..e374f79b 100644 --- a/docs/typedoc/interfaces/CreateIteratorContext.html +++ b/docs/typedoc/interfaces/CreateIteratorContext.html @@ -1,37 +1,24 @@ -CreateIteratorContext | @nevware21/ts-utils

Interface CreateIteratorContext<T>

The context used to manage how the createIterator returns and moves to the next item, +CreateIteratorContext | @nevware21/ts-utils

Interface CreateIteratorContext<T>

The context used to manage how the createIterator returns and moves to the next item, and provides to the current value v.

Since

0.4.2

-
interface CreateIteratorContext<T> {
    n: ((...args) => boolean);
    r?: ((value?) => T);
    t?: ((e?) => T);
    v?: T;
}

Type Parameters

  • T

Properties

n -r? -t? -v? -

Properties

n: ((...args) => boolean)

A function that returns a boolean to indicate whether it was able to produce +

interface CreateIteratorContext<T> {
    n: ((...args) => boolean);
    r?: ((value?) => T);
    t?: ((e?) => T);
    v?: T;
}

Type Parameters

  • T

Properties

n +r? +t? +v? +

Properties

n: ((...args) => boolean)

A function that returns a boolean to indicate whether it was able to produce the next value in the sequence. It should return true when the sequence is done.

-

Type declaration

    • (...args): boolean
    • A function that returns a boolean to indicate whether it was able to produce -the next value in the sequence. It should return true when the sequence is done.

      -

      Parameters

      • Rest ...args: any

        Optional additional arguments that where passed to the iterator next function.

        -

      Returns boolean

      false if a new value was produced and assigned to the v of the context, otherwise -true to indicate that the sequence is done.

      -

Param: args

Optional additional arguments that where passed to the iterator next function.

-

Returns

false if a new value was produced and assigned to the v of the context, otherwise +

Type declaration

    • (...args): boolean
    • Parameters

      • Rest ...args: any

        Optional additional arguments that where passed to the iterator next function.

        +

      Returns boolean

Returns

false if a new value was produced and assigned to the v of the context, otherwise true to indicate that the sequence is done.

-
r?: ((value?) => T)

Optional function that accepts zero or one argument. This function is called via the -iterator return function when the iterator caller does not intend to make any more -next() calls so the implementation and can perform any cleanup actions.

-

Type declaration

r?: ((value?) => T)

Optional function that accepts zero or one argument. This function is called via the iterator return function when the iterator caller does not intend to make any more next() calls so the implementation and can perform any cleanup actions.

-

Parameters

  • Optional value: T

Returns T

[Optional] value to be included in the final iteration result

-

Returns

[Optional] value to be included in the final iteration result

-
t?: ((e?) => T)

A function that accepts zero or one argument. The function is called via the iterator -throw function when that the iterator caller detects an error condition, and e is -typically an Error instance.

-

Type declaration

    • (e?): T
    • A function that accepts zero or one argument. The function is called via the iterator +

      Type declaration

        • (value?): T
        • Parameters

          • Optional value: T

          Returns T

      Returns

      [Optional] value to be included in the final iteration result

      +
t?: ((e?) => T)

A function that accepts zero or one argument. The function is called via the iterator throw function when that the iterator caller detects an error condition, and e is typically an Error instance.

-

Parameters

  • Optional e: any

Returns T

[Optional] value to be included in the final iteration result

-

Returns

[Optional] value to be included in the final iteration result

-
v?: T

The current value to be assigned to the returned iterator result, the next n +

Type declaration

    • (e?): T
    • Parameters

      • Optional e: any

      Returns T

Returns

[Optional] value to be included in the final iteration result

+
v?: T

The current value to be assigned to the returned iterator result, the next n function should assign this value to the context as part of incrementing to the next value.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/interfaces/CustomErrorConstructor.html b/docs/typedoc/interfaces/CustomErrorConstructor.html index 6ac9930d..6024f861 100644 --- a/docs/typedoc/interfaces/CustomErrorConstructor.html +++ b/docs/typedoc/interfaces/CustomErrorConstructor.html @@ -1,5 +1,5 @@ -CustomErrorConstructor | @nevware21/ts-utils

Interface CustomErrorConstructor<T>

Defines the definition of the custom error constructor +CustomErrorConstructor | @nevware21/ts-utils

Interface CustomErrorConstructor<T>

Defines the definition of the custom error constructor Used by: createCustomError

-
interface CustomErrorConstructor<T> {
    new CustomErrorConstructornew (message?): T;
    new CustomErrorConstructornew (message?): Error;
    prototype: T;
    (message?): T;
    (message?): Error;
}

Type Parameters

  • T extends Error = Error

Hierarchy

  • ErrorConstructor
    • CustomErrorConstructor

Constructors

Properties

Constructors

  • Parameters

    • Optional message: string

    Returns T

  • Parameters

    • Optional message: string

    Returns Error

Properties

prototype: T

Generated using TypeDoc

\ No newline at end of file +
interface CustomErrorConstructor<T> {
    new CustomErrorConstructornew (message?): T;
    new CustomErrorConstructornew (message?): Error;
    prototype: T;
    (message?): T;
    (message?): Error;
}

Type Parameters

  • T extends Error = Error

Hierarchy

  • ErrorConstructor
    • CustomErrorConstructor

Constructors

Properties

Constructors

  • Parameters

    • Optional message: string

    Returns T

  • Parameters

    • Optional message: string

    Returns Error

Properties

prototype: T

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/interfaces/GetLengthImpl.html b/docs/typedoc/interfaces/GetLengthImpl.html index a61c5f89..666a4d6a 100644 --- a/docs/typedoc/interfaces/GetLengthImpl.html +++ b/docs/typedoc/interfaces/GetLengthImpl.html @@ -1,6 +1,6 @@ -GetLengthImpl | @nevware21/ts-utils

Interface GetLengthImpl

Interface to identify that an object contains the length property used as a type +GetLengthImpl | @nevware21/ts-utils

Interface GetLengthImpl

Interface to identify that an object contains the length property used as a type constraint for getLength

Since

0.4.2

-
interface GetLengthImpl {
    length: unknown;
}

Properties

Properties

length: unknown

Identifies the property that returns the length of the instance

-

Generated using TypeDoc

\ No newline at end of file +
interface GetLengthImpl {
    length: unknown;
}

Properties

Properties

length: unknown

Identifies the property that returns the length of the instance

+

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/interfaces/ICachedValue.html b/docs/typedoc/interfaces/ICachedValue.html index be97ee26..cdf04939 100644 --- a/docs/typedoc/interfaces/ICachedValue.html +++ b/docs/typedoc/interfaces/ICachedValue.html @@ -1,8 +1,10 @@ -ICachedValue | @nevware21/ts-utils

Interface ICachedValue<T>

A generic interface for holding a cached value

+ICachedValue | @nevware21/ts-utils

Interface ICachedValue<T>

A generic interface for holding a cached value

Since

0.10.5

Typeparam

T - The type of the value to be cached

Example

let cachedValue: ICachedValue<string> = {
v: "some value"
};
-
interface ICachedValue<T> {
    v: T;
}

Type Parameters

  • T

Hierarchy (view full)

Properties

v -

Properties

v: T

Returns the current cached value

-

Generated using TypeDoc

\ No newline at end of file +
interface ICachedValue<T> {
    toJSON(): T;
    v: T;
}

Type Parameters

  • T

Hierarchy (view full)

Properties

v +

Methods

Properties

v: T

Returns the current cached value

+

Methods

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/interfaces/ILazyValue.html b/docs/typedoc/interfaces/ILazyValue.html index ddf74924..ee32b4b9 100644 --- a/docs/typedoc/interfaces/ILazyValue.html +++ b/docs/typedoc/interfaces/ILazyValue.html @@ -1,8 +1,10 @@ -ILazyValue | @nevware21/ts-utils

Interface ILazyValue<T>

Interface of the object returned by the getLazy instance

+ILazyValue | @nevware21/ts-utils

Interface ILazyValue<T>

Interface of the object returned by the getLazy instance

Since

0.4.5

-
interface ILazyValue<T> {
    b?: boolean;
    v: T;
}

Type Parameters

  • T

Hierarchy (view full)

Properties

b? -v -

Properties

b?: boolean

Identifies if this instance is bypassing the internal caching mechanism which is used for testing

-
v: T

Returns the current cached value from the lazy lookup, if the callback function has not yet occurred +

interface ILazyValue<T> {
    b?: boolean;
    toJSON(): T;
    v: T;
}

Type Parameters

  • T

Hierarchy (view full)

Properties

b? +v +

Methods

Properties

b?: boolean

Identifies if this instance is bypassing the internal caching mechanism which is used for testing

+
v: T

Returns the current cached value from the lazy lookup, if the callback function has not yet occurred accessing the value will cause the lazy evaluation to occur and the result will be returned.

-

Generated using TypeDoc

\ No newline at end of file +

Methods

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/interfaces/IObjDeepCopyHandlerDetails.html b/docs/typedoc/interfaces/IObjDeepCopyHandlerDetails.html index 21a05131..7fd2f950 100644 --- a/docs/typedoc/interfaces/IObjDeepCopyHandlerDetails.html +++ b/docs/typedoc/interfaces/IObjDeepCopyHandlerDetails.html @@ -1,33 +1,33 @@ -IObjDeepCopyHandlerDetails | @nevware21/ts-utils

Interface IObjDeepCopyHandlerDetails

Context details passed to the deep copy handler to allow it parse the current value based on the original source +IObjDeepCopyHandlerDetails | @nevware21/ts-utils

Interface IObjDeepCopyHandlerDetails

Context details passed to the deep copy handler to allow it parse the current value based on the original source and path to reach the current value. The provided value should be updated with the value to by copied into the new deep copy and will be used when the handler returns true.

Since

0.4.4

-
interface IObjDeepCopyHandlerDetails {
    copy<T>(source, key?): T;
    copyTo<T>(target, source): T;
    isPlain: boolean;
    isPrim: boolean;
    origin?: any;
    path: (string | number | symbol)[];
    result: any;
    type: string;
    value: any;
}

Properties

Methods

Properties

isPlain: boolean

Identifies whether the type is a plain object or not, this also saves each handler from checking +

interface IObjDeepCopyHandlerDetails {
    copy<T>(source, key?): T;
    copyTo<T>(target, source): T;
    isPlain: boolean;
    isPrim: boolean;
    origin?: any;
    path: (string | number | symbol)[];
    result: any;
    type: string;
    value: any;
}

Properties

Methods

Properties

isPlain: boolean

Identifies whether the type is a plain object or not, this also saves each handler from checking the type, currently the type will also be "object" if this is true.

Since

0.9.6

-
isPrim: boolean

Identifies whether the type of the value is considered to be a primitive value

-
origin?: any

The original source object passed into the objDeepCopy() or objCopyProps() functions.

-
path: (string | number | symbol)[]

A array of keys from the orginal source (origin) object which lead to the current value

-
result: any

Replace this value with the new deep copied value (defaults to the same as the value property) this value will be +

isPrim: boolean

Identifies whether the type of the value is considered to be a primitive value

+
origin?: any

The original source object passed into the objDeepCopy() or objCopyProps() functions.

+
path: (string | number | symbol)[]

A array of keys from the orginal source (origin) object which lead to the current value

+
result: any

Replace this value with the new deep copied value (defaults to the same as the value property) this value will be used when returning true from the handler. Ignored when the handler returns false.

-
type: string

Identifies the type of the value as per typeof value, saves each check having to process this value.

-
value: any

The current value to be processed, replace this value with the new deep copied value to use when returning +

type: string

Identifies the type of the value as per typeof value, saves each check having to process this value.

+
value: any

The current value to be processed, replace this value with the new deep copied value to use when returning true from the handler. Ignored when the handler returns false.

-

Methods

Methods

  • Continue the deep copy with the current context and recursive checks, effectively calls objDeepCopy but keeps the current context and recursive references.

    -

    Type Parameters

    • T

    Parameters

    • source: T

      The source object to be copied

      -
    • Optional key: string | number | symbol

    Returns T

  • Continue the deep copy with the current context and recursive checks by copying all of the properties +

    Type Parameters

    • T

    Parameters

    • source: T

      The source object to be copied

      +
    • Optional key: string | number | symbol

    Returns T

  • Continue the deep copy with the current context and recursive checks by copying all of the properties from the source to the target instance, effectively calls objCopyProps but keeps the current context and recursive references.

    -

    Type Parameters

    • T

    Parameters

    • target: T

      The target object to populated

      -
    • source: T

      The source object to copy the properties from

      -

    Returns T

Generated using TypeDoc

\ No newline at end of file +

Type Parameters

  • T

Parameters

  • target: T

    The target object to populated

    +
  • source: T

    The source object to copy the properties from

    +

Returns T

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/interfaces/ISafeReturn.html b/docs/typedoc/interfaces/ISafeReturn.html index 3f8ab8f8..a7f30563 100644 --- a/docs/typedoc/interfaces/ISafeReturn.html +++ b/docs/typedoc/interfaces/ISafeReturn.html @@ -1,9 +1,9 @@ -ISafeReturn | @nevware21/ts-utils

Interface ISafeReturn<T>

Defines the return value of the safe function, which is an object with either a value or an error

+ISafeReturn | @nevware21/ts-utils

Interface ISafeReturn<T>

Defines the return value of the safe function, which is an object with either a value or an error

Since

0.10.5

Typeparam

T - The type of the function to call

Typeparam

R - The return type of the function

-
interface ISafeReturn<T> {
    e?: Error;
    v?: SafeReturnType<T>;
}

Type Parameters

  • T extends ((...args) => any)

Properties

e? -v? -

Properties

e?: Error

The error thrown by the function call

-

The value returned by the function call

-

Generated using TypeDoc

\ No newline at end of file +
interface ISafeReturn<T> {
    e?: Error;
    v?: SafeReturnType<T>;
}

Type Parameters

  • T extends ((...args) => any)

Properties

e? +v? +

Properties

e?: Error

The error thrown by the function call

+

The value returned by the function call

+

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/interfaces/ITimerHandler.html b/docs/typedoc/interfaces/ITimerHandler.html index 764a7e73..00dfe394 100644 --- a/docs/typedoc/interfaces/ITimerHandler.html +++ b/docs/typedoc/interfaces/ITimerHandler.html @@ -1,13 +1,13 @@ -ITimerHandler | @nevware21/ts-utils

Interface ITimerHandler

A Timer handler which is returned from scheduleTimeout which contains functions to +ITimerHandler | @nevware21/ts-utils

Interface ITimerHandler

A Timer handler which is returned from scheduleTimeout which contains functions to cancel or restart (refresh) the timeout function.

Since

0.4.4

-
interface ITimerHandler {
    cancel(): void;
    enabled: boolean;
    hasRef(): boolean;
    ref(): this;
    refresh(): ITimerHandler;
    unref(): this;
}

Properties

Methods

Properties

enabled: boolean

Gets or Sets a flag indicating if the underlying timer is currently enabled and running. +

interface ITimerHandler {
    cancel(): void;
    enabled: boolean;
    hasRef(): boolean;
    ref(): this;
    refresh(): ITimerHandler;
    unref(): this;
}

Properties

Methods

Properties

enabled: boolean

Gets or Sets a flag indicating if the underlying timer is currently enabled and running. Setting the enabled flag to the same as it's current value has no effect, setting to true when already true will not refresh() the timer. And setting to 'false` will cancel() the timer.

@@ -15,15 +15,15 @@ *

Example

let theTimer = createTimeout(...);

// Check if enabled
theTimer.enabled; // false

// Start the timer
theTimer.enabled = true; // Same as calling refresh()
theTimer.enabled; //true

// Has no effect as it's already running
theTimer.enabled = true;

// Will refresh / restart the time
theTimer.refresh()

let theTimer = scheduleTimeout(...);

// Check if enabled
theTimer.enabled; // true
-

Methods

  • Cancels a timeout that was previously scheduled, after calling this function any previously +

Methods

  • Cancels a timeout that was previously scheduled, after calling this function any previously scheduled timer will not execute.

    Returns void

    Example

    let theTimer = scheduleTimeout(...);
    theTimer.cancel();
    -
  • If true, any running referenced ITimerHandler instance will keep the Node.js event loop active.

    +
  • If true, any running referenced ITimerHandler instance will keep the Node.js event loop active.

    Returns boolean

    Since

    0.7.0

    Example

    let theTimer = createTimeout(...);

    // Unreference the timer so that the runtime (Node) may terminate if nothing else is running.
    theTimer.unref();
    let hasRef = theTimer.hasRef(); // false

    theTimer.ref();
    hasRef = theTimer.hasRef(); // true
    -
  • When called, requests that the event loop not exit so long when the ITimerHandler is active. +

  • When called, requests that the event loop not exit so long when the ITimerHandler is active. Calling timer.ref() multiple times will have no effect. By default, all ITimerHandler objects will create "ref'ed" instances, making it normally unnecessary to call timer.ref() unless timer.unref() had been called previously.

    @@ -31,14 +31,14 @@

    Example

    let

    Since

    0.7.0

    Example

    let theTimer = createTimeout(...);

    // Make sure the timer is referenced (the default) so that the runtime (Node) does not terminate
    // if there is a waiting referenced timer.
    theTimer.ref();
    -
  • Reschedules the timer to call its callback at the previously specified duration adjusted to the current time. This is useful for refreshing a timer without allocating a new JavaScript object.

    Using this on a timer that has already called its callback will reactivate the timer. Calling on a timer that has not yet executed will just reschedule the current timer.

    Returns ITimerHandler

    Example

    let theTimer = scheduleTimeout(...);
    // The timer will be restarted (if already executed) or rescheduled (if it has not yet executed)
    theTimer.refresh();
    -
  • When called, the any active ITimerHandler instance will not require the event loop to remain +

  • When called, the any active ITimerHandler instance will not require the event loop to remain active (Node.js). If there is no other activity keeping the event loop running, the process may exit before the ITimerHandler instance callback is invoked. Calling timer.unref() multiple times will have no effect.

    @@ -46,4 +46,4 @@

    Example

    let

    Since

    0.7.0

    Example

    let theTimer = createTimeout(...);

    // Unreference the timer so that the runtime (Node) may terminate if nothing else is running.
    theTimer.unref();
    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/interfaces/ObjDefinePropDescriptor.html b/docs/typedoc/interfaces/ObjDefinePropDescriptor.html index e80d272f..a4ed5024 100644 --- a/docs/typedoc/interfaces/ObjDefinePropDescriptor.html +++ b/docs/typedoc/interfaces/ObjDefinePropDescriptor.html @@ -1,4 +1,4 @@ -ObjDefinePropDescriptor | @nevware21/ts-utils

Interface ObjDefinePropDescriptor<V>

Definition of the Property Descriptor mappings for the objDefine functions. +ObjDefinePropDescriptor | @nevware21/ts-utils

Interface ObjDefinePropDescriptor<V>

Definition of the Property Descriptor mappings for the objDefine functions. If a descriptor has neither of value, writable, get and set keys, it is treated as a data descriptor. If a descriptor has both [value or writable] and [get or set] keys, an exception is thrown. Bear in mind that these attributes are not necessarily the descriptor's own properties. Inherited @@ -6,14 +6,14 @@ freeze existing objects in the descriptor object's prototype chain upfront, specify all options explicitly, or point to null with objCreate(null).

Since

0.6.0

-
interface ObjDefinePropDescriptor<V> {
    c?: boolean;
    e?: boolean;
    g?(): V;
    l?: ILazyValue<V>;
    s?(value): void;
    v?: V;
    w?: boolean;
}

Type Parameters

  • V = any

Properties

c? -e? -l? -v? -w? -

Methods

g? -s? -

Properties

c?: boolean

Identifies if this property should be configurable (true) when this value is set to false,

+
interface ObjDefinePropDescriptor<V> {
    c?: boolean;
    e?: boolean;
    g?(): V;
    l?: ILazyValue<V>;
    s?(value): void;
    v?: V;
    w?: boolean;
}

Type Parameters

  • V = any

Properties

c? +e? +l? +v? +w? +

Methods

g? +s? +

Properties

c?: boolean

Identifies if this property should be configurable (true) when this value is set to false,

  • the type of this property cannot be changed between data property and accessor property, and
  • the property may not be deleted, and
  • @@ -21,19 +21,19 @@ the value can be changed, and writable can be changed to false). Defaults to true.
-
e?: boolean

Identifies if this property will be visible during enumeration of the properties on the corresponding object. +

e?: boolean

Identifies if this property will be visible during enumeration of the properties on the corresponding object. Defaults to true.

-

A Lazy value instance which will be used to return the value, this will be wrapped in a getter function.

+

A Lazy value instance which will be used to return the value, this will be wrapped in a getter function.

Since

0.9.4

-
v?: V

data descriptor +

v?: V

data descriptor The value associated with the property. Can be any valid JavaScript value (number, object, function, etc.). Defaults to undefined.

-
w?: boolean

true if the value associated with the property may be changed with an assignment operator. Defaults to false.

-

Methods

  • A function which serves as a getter for the property, or undefined if there is no getter. When the property +

w?: boolean

true if the value associated with the property may be changed with an assignment operator. Defaults to false.

+

Methods

  • A function which serves as a getter for the property, or undefined if there is no getter. When the property is accessed, this function is called without arguments and with this set to the object through which the property is accessed (this may not be the object on which the property is defined due to inheritance). The return value will be used as the value of the property. Defaults to undefined.

    -

    Returns V

  • A function which serves as a setter for the property, or undefined if there is no setter. When the property +

    Returns V

  • A function which serves as a setter for the property, or undefined if there is no setter. When the property is assigned, this function is called with one argument (the value being assigned to the property) and with this set to the object through which the property is assigned. Defaults to undefined.

    -

    Parameters

    • value: V

    Returns void

Generated using TypeDoc

\ No newline at end of file +

Parameters

  • value: V

Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/types/ArrFromMapFn.html b/docs/typedoc/types/ArrFromMapFn.html index 596000fd..e0e0ac8f 100644 --- a/docs/typedoc/types/ArrFromMapFn.html +++ b/docs/typedoc/types/ArrFromMapFn.html @@ -1,8 +1,8 @@ -ArrFromMapFn | @nevware21/ts-utils

Type alias ArrFromMapFn<T, R>

ArrFromMapFn<T, R>: ((value, index?) => R)

Callback signature for arrFrom mapFn that is called for every element of array. Each time mapFn +ArrFromMapFn | @nevware21/ts-utils

Type alias ArrFromMapFn<T, R>

ArrFromMapFn<T, R>: ((value, index?) => R)

Callback signature for arrFrom mapFn that is called for every element of array. Each time mapFn executes, the returned value is added to newArray.

-

Type Parameters

  • T

    Identifies the type of the array elements

    -
  • R = T

    Identifies the type of the elements returned by the map function, defaults to T.

    -

Type declaration

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/types/ArrMapCallbackFn.html b/docs/typedoc/types/ArrMapCallbackFn.html index a9e777a6..85482b55 100644 --- a/docs/typedoc/types/ArrMapCallbackFn.html +++ b/docs/typedoc/types/ArrMapCallbackFn.html @@ -1,9 +1,9 @@ -ArrMapCallbackFn | @nevware21/ts-utils

Type alias ArrMapCallbackFn<T, R>

ArrMapCallbackFn<T, R>: ((value, index?, array?) => R)

Callback signature for arrMap that is called for every element of array. Each time callbackFn +ArrMapCallbackFn | @nevware21/ts-utils

Type alias ArrMapCallbackFn<T, R>

ArrMapCallbackFn<T, R>: ((value, index?, array?) => R)

Callback signature for arrMap that is called for every element of array. Each time callbackFn executes, the returned value is added to newArray.

-

Type Parameters

  • T

    Identifies the type of the array elements

    -
  • R = T

    Identifies the type of the elements returned by the callback function, defaults to T.

    -

Type declaration

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/types/ArrPredicateCallbackFn.html b/docs/typedoc/types/ArrPredicateCallbackFn.html index f758b4d6..604d1d7d 100644 --- a/docs/typedoc/types/ArrPredicateCallbackFn.html +++ b/docs/typedoc/types/ArrPredicateCallbackFn.html @@ -1,10 +1,10 @@ -ArrPredicateCallbackFn | @nevware21/ts-utils

Type alias ArrPredicateCallbackFn<T, E>

ArrPredicateCallbackFn<T, E>: ((value, index, array) => value is E)

The ArrPredicateCallbackFn function is used for arrEvery and arrFilter, +ArrPredicateCallbackFn | @nevware21/ts-utils

Type alias ArrPredicateCallbackFn<T, E>

ArrPredicateCallbackFn<T, E>: ((value, index, array) => value is E)

The ArrPredicateCallbackFn function is used for arrEvery and arrFilter, it should return a truthy value to indicate a matching element has been found.

-

Type Parameters

  • T

    Identifies the type of array elements

    -
  • E extends T

    Identifies the type of the return array elements (defaults to T)

    -

Type declaration

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/types/ArrPredicateCallbackFn2.html b/docs/typedoc/types/ArrPredicateCallbackFn2.html index 1d83039a..b8847c3c 100644 --- a/docs/typedoc/types/ArrPredicateCallbackFn2.html +++ b/docs/typedoc/types/ArrPredicateCallbackFn2.html @@ -1,8 +1,8 @@ -ArrPredicateCallbackFn2 | @nevware21/ts-utils

Type alias ArrPredicateCallbackFn2<T>

ArrPredicateCallbackFn2<T>: ((value, index, array) => unknown)

The ArrPredicateCallbackFn2 function is used for arrEvery and arrFilter, +ArrPredicateCallbackFn2 | @nevware21/ts-utils

Type alias ArrPredicateCallbackFn2<T>

ArrPredicateCallbackFn2<T>: ((value, index, array) => unknown)

The ArrPredicateCallbackFn2 function is used for arrEvery and arrFilter, it should return a truthy value to indicate a matching element has been found.

-

Type Parameters

  • T

    Identifies the type of array elements

    -

Type declaration

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/types/ArrReduceCallbackFn.html b/docs/typedoc/types/ArrReduceCallbackFn.html index be25985d..7da70da3 100644 --- a/docs/typedoc/types/ArrReduceCallbackFn.html +++ b/docs/typedoc/types/ArrReduceCallbackFn.html @@ -1,11 +1,11 @@ -ArrReduceCallbackFn | @nevware21/ts-utils

Type alias ArrReduceCallbackFn<T, R>

ArrReduceCallbackFn<T, R>: ((previousValue, currentValue, currentIndex, array) => R)

The reducer function called for arrReduce.

-

Type Parameters

  • T

    Identifies the type of array elements

    -
  • R = T

    Identifies the type of the return array elements (defaults to T)

    -

Type declaration

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/types/ClearTimeoutOverrideFn.html b/docs/typedoc/types/ClearTimeoutOverrideFn.html index 89ae61b1..455df4a8 100644 --- a/docs/typedoc/types/ClearTimeoutOverrideFn.html +++ b/docs/typedoc/types/ClearTimeoutOverrideFn.html @@ -1,5 +1,5 @@ -ClearTimeoutOverrideFn | @nevware21/ts-utils

Type alias ClearTimeoutOverrideFn

ClearTimeoutOverrideFn: ((timeoutId) => void)

The signatire of the function to override clearing a previous timeout created with the TimeoutOverrideFn, it will be passed +ClearTimeoutOverrideFn | @nevware21/ts-utils

Type alias ClearTimeoutOverrideFn

ClearTimeoutOverrideFn: ((timeoutId) => void)

The signatire of the function to override clearing a previous timeout created with the TimeoutOverrideFn, it will be passed the result returned from the TimeoutOverrideFn call.

-

Type declaration

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/types/EnumCls.html b/docs/typedoc/types/EnumCls.html index ceb5cc79..b3c53bd9 100644 --- a/docs/typedoc/types/EnumCls.html +++ b/docs/typedoc/types/EnumCls.html @@ -1,4 +1,4 @@ -EnumCls | @nevware21/ts-utils

Type alias EnumCls<E>

EnumCls<E>: {
    readonly [key in keyof E extends string | number | symbol
        ? keyof E
        : never]: key extends string
        ? E[key]
        : key
} & {
    readonly [key in keyof E]: E[key]
}

A type that identifies an enum class generated from a constant enum.

-

Type Parameters

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/types/EnumNameMap.html b/docs/typedoc/types/EnumNameMap.html index a3e1a31d..be2d1179 100644 --- a/docs/typedoc/types/EnumNameMap.html +++ b/docs/typedoc/types/EnumNameMap.html @@ -1,5 +1,5 @@ -EnumNameMap | @nevware21/ts-utils

Type alias EnumNameMap<E, T>

EnumNameMap<E, T>: {
    readonly [key in keyof E extends string | number | symbol
        ? keyof E
        : never]: key extends string
        ? key
        : keyof E
} & T

A type that identifies an object whose property values are generally mapped to the key of the source type.

-

Type Parameters

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/types/EnumTypeMap.html b/docs/typedoc/types/EnumTypeMap.html index dc0783b2..533bcead 100644 --- a/docs/typedoc/types/EnumTypeMap.html +++ b/docs/typedoc/types/EnumTypeMap.html @@ -1,6 +1,6 @@ -EnumTypeMap | @nevware21/ts-utils

Type alias EnumTypeMap<E, V, T>

EnumTypeMap<E, V, T>: {
    readonly [key in keyof E extends string
        ? keyof E
        : never]: V
} & T

A type that maps the keys of E to the type of V.

-

Type Parameters

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/types/EnumValueMap.html b/docs/typedoc/types/EnumValueMap.html index 80b1dea0..a88a4aca 100644 --- a/docs/typedoc/types/EnumValueMap.html +++ b/docs/typedoc/types/EnumValueMap.html @@ -1,5 +1,5 @@ -EnumValueMap | @nevware21/ts-utils

Type alias EnumValueMap<E, T>

EnumValueMap<E, T>: {
    readonly [key in keyof E extends string | number | symbol
        ? keyof E
        : never]: key extends string
        ? E[key]
        : E[key]
} & T

A type that identifies an object whose property values are mapped to the resulting values of the source objects keys.

-

Type Parameters

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/types/ObjDeepCopyHandler.html b/docs/typedoc/types/ObjDeepCopyHandler.html index e615b36f..1edec815 100644 --- a/docs/typedoc/types/ObjDeepCopyHandler.html +++ b/docs/typedoc/types/ObjDeepCopyHandler.html @@ -1,9 +1,9 @@ -ObjDeepCopyHandler | @nevware21/ts-utils

Type alias ObjDeepCopyHandler

ObjDeepCopyHandler: ((details) => boolean)

An optional deep copy handler that lets you provide your own logic for deep copying objects, will +ObjDeepCopyHandler | @nevware21/ts-utils

Type alias ObjDeepCopyHandler

ObjDeepCopyHandler: ((details) => boolean)

An optional deep copy handler that lets you provide your own logic for deep copying objects, will only be called once per object/property combination, so if an object is recursively included it will only get called for the first instance. Handlers SHOULD assign the "result" value with the new target instance BEFORE performing any additional deep copying, so any recursive objects will get a reference to the new instance and not keep attempting to create new copies.

-

Type declaration

Since

0.4.4

+

Type declaration

Since

0.4.4

Returns

true if handled and the value in details should be used otherwise false to continue with the default handling The library includes several helpers which can be reused by any user provided handler

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/types/ObjDefinePropDescriptorMap.html b/docs/typedoc/types/ObjDefinePropDescriptorMap.html index 939a7d95..05f8e314 100644 --- a/docs/typedoc/types/ObjDefinePropDescriptorMap.html +++ b/docs/typedoc/types/ObjDefinePropDescriptorMap.html @@ -1,5 +1,5 @@ -ObjDefinePropDescriptorMap | @nevware21/ts-utils

Type alias ObjDefinePropDescriptorMap

ObjDefinePropDescriptorMap: {
    [key: PropertyKey]: ObjDefinePropDescriptor;
}

An object whose keys represent the names of properties to be defined or modified and whose values are objects +ObjDefinePropDescriptorMap | @nevware21/ts-utils

Type alias ObjDefinePropDescriptorMap

ObjDefinePropDescriptorMap: {
    [key: PropertyKey]: ObjDefinePropDescriptor;
}

An object whose keys represent the names of properties to be defined or modified and whose values are objects describing those properties. Each value in props must be either a data descriptor or an accessor descriptor; it cannot be both (see ObjDefinePropDescriptor for more details).

Type declaration

Since

0.6.0

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/types/ProxyFunctionDef.html b/docs/typedoc/types/ProxyFunctionDef.html index fced6727..8784c21f 100644 --- a/docs/typedoc/types/ProxyFunctionDef.html +++ b/docs/typedoc/types/ProxyFunctionDef.html @@ -1,6 +1,6 @@ -ProxyFunctionDef | @nevware21/ts-utils

Type alias ProxyFunctionDef<T, H>

ProxyFunctionDef<T, H>: {
    as?: TypeFuncNames<T>;
    n: TypeFuncNames<H>;
    rp?: boolean;
}

The Definition of how proxy functions should be applied to target objects

-

Type Parameters

  • T

  • H

Type declaration

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/types/SafeReturnType.html b/docs/typedoc/types/SafeReturnType.html index 25bf420a..d87802fd 100644 --- a/docs/typedoc/types/SafeReturnType.html +++ b/docs/typedoc/types/SafeReturnType.html @@ -1,4 +1,4 @@ -SafeReturnType | @nevware21/ts-utils

Type alias SafeReturnType<T>

SafeReturnType<T>: T extends ((...args) => infer R)
    ? R
    : any

Infers the return type of the specified function

-

Type Parameters

  • T extends ((...args) => any)

Since

0.10.5

+SafeReturnType | @nevware21/ts-utils

Type alias SafeReturnType<T>

SafeReturnType<T>: T extends ((...args) => infer R)
    ? R
    : any

Infers the return type of the specified function

+

Type Parameters

  • T extends ((...args) => any)

Since

0.10.5

Typeparam

T - The type of the function which to infer the return type

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/types/TimeoutOverrideFn.html b/docs/typedoc/types/TimeoutOverrideFn.html index 8f7081dc..a800b2a5 100644 --- a/docs/typedoc/types/TimeoutOverrideFn.html +++ b/docs/typedoc/types/TimeoutOverrideFn.html @@ -1,10 +1,10 @@ -TimeoutOverrideFn | @nevware21/ts-utils

Type alias TimeoutOverrideFn

TimeoutOverrideFn: (<TArgs>(callback, ms?, ...args) => number | any)

The signature of the override timeout function used to create a new timeout instance, it follows the same signature as +TimeoutOverrideFn | @nevware21/ts-utils

Type alias TimeoutOverrideFn

TimeoutOverrideFn: (<TArgs>(callback, ms?, ...args) => number | any)

The signature of the override timeout function used to create a new timeout instance, it follows the same signature as the native setTimeout API.

-

Type declaration

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/types/TimeoutOverrideFuncs.html b/docs/typedoc/types/TimeoutOverrideFuncs.html index 07695b90..bfd46c03 100644 --- a/docs/typedoc/types/TimeoutOverrideFuncs.html +++ b/docs/typedoc/types/TimeoutOverrideFuncs.html @@ -1,4 +1,4 @@ -TimeoutOverrideFuncs | @nevware21/ts-utils

Type alias TimeoutOverrideFuncs

TimeoutOverrideFuncs: [TimeoutOverrideFn | null, ClearTimeoutOverrideFn | null]

Defines the array signature used to pass the override set and clean functions for creating a timeout. +TimeoutOverrideFuncs | @nevware21/ts-utils

Type alias TimeoutOverrideFuncs

TimeoutOverrideFuncs: [TimeoutOverrideFn | null, ClearTimeoutOverrideFn | null]

Defines the array signature used to pass the override set and clean functions for creating a timeout. The first index [0] is the set function to be used and the second index [1] is the clear function to be used.

Since

0.4.5

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/typedoc/types/TypeFuncNames.html b/docs/typedoc/types/TypeFuncNames.html index 2aa09eb4..02f9f15c 100644 --- a/docs/typedoc/types/TypeFuncNames.html +++ b/docs/typedoc/types/TypeFuncNames.html @@ -1 +1 @@ -TypeFuncNames | @nevware21/ts-utils

Generated using TypeDoc

\ No newline at end of file +TypeFuncNames | @nevware21/ts-utils

Type alias TypeFuncNames<T>

TypeFuncNames<T>: {
    [key in keyof T]: T[key] extends Function
        ? key
        : never
}[keyof T]

Type Parameters

  • T

Generated using TypeDoc

\ No newline at end of file diff --git a/lib/package.json b/lib/package.json index e2a4c49d..d313c7cb 100644 --- a/lib/package.json +++ b/lib/package.json @@ -1,7 +1,7 @@ { "name": "@nevware21/ts-utils", "description": "Common JavaScript/TypeScript helper functions for better minification", - "version": "0.10.5", + "version": "0.11.0", "homepage": "https://github.com/nevware21/ts-utils", "license": "MIT", "author": { diff --git a/package.json b/package.json index df5ef2fd..6b2a2deb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@nevware21/ts-utils", "description": "Common JavaScript/TypeScript helper functions for better minification", - "version": "0.10.5", + "version": "0.11.0", "homepage": "https://github.com/nevware21/ts-utils", "license": "MIT", "author": {