Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jonahsnider/util

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jonahsnider/util - npm Package Compare versions

Comparing version 8.5.2 to 8.6.0

2

dist/index.dev.js

@@ -1,2 +0,2 @@

var t,e;t=this,e=function(t){"use strict";class e{constructor(t,e){if(this.lower=t,this.upper=e,t>e)throw new RangeError("lower must be less than upper")}static from(t){const[n,r]=t;return new e(n,r)}has(t){return t>=this.lower&&t<=this.upper}*[Symbol.iterator](){yield this.lower,yield this.upper}isSuperrange(t){return t===this||this.lower>=t.lower&&this.upper<=t.upper}isSubrange(t){return t===this||this.lower<=t.lower&&this.upper>=t.upper}equals(t){return t===this||this.lower===t.lower&&this.upper===t.upper}intersects(t){return t===this||this.lower<=t.upper&&this.upper>=t.lower}}const n=Object.freeze(new e(100,200)),r=Object.freeze(new e(200,300)),i=Object.freeze(new e(300,400)),o=Object.freeze(new e(400,500)),u=Object.freeze(new e(500,600));var a,s,c=Object.freeze({__proto__:null,informational:n,success:r,redirects:i,clientErrors:o,serverErrors:u});!function(t){t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(a||(a={})),function(t){t.Get="GET",t.Head="HEAD",t.Post="POST",t.Put="PUT",t.Delete="DELETE",t.Connect="CONNECT",t.Options="OPTIONS",t.Trace="TRACE",t.Patch="PATCH"}(s||(s={}));var f,l,d=Object.freeze({__proto__:null,StatusRange:c,get Status(){return a},get Method(){return s}});function h(t,e){return Array.from({length:e},((e,n)=>t(n)))}function p(t,e){const n=[];for(let r=0;r<t.length;r++)t[r]===e&&n.push(r);return n}function S(t,e){let n;if("size"in t?n="size":"length"in t&&(n="length"),!n)throw new RangeError("Expected a to have a size property or a length property");return t[n]<e[n]?[e,t]:[t,e]}function*k(...t){for(const e of t)yield*e}function m(t){const e=new Map;for(const n of t){const t=(e.get(n)??0)+1;e.set(n,t)}return e}function*g(t,e){for(let n=0;n<e;n++)yield t}t.Rank=void 0,(f=t.Rank||(t.Rank={}))[f.Ace=1]="Ace",f[f.Two=2]="Two",f[f.Three=3]="Three",f[f.Four=4]="Four",f[f.Five=5]="Five",f[f.Six=6]="Six",f[f.Seven=7]="Seven",f[f.Eight=8]="Eight",f[f.Nine=9]="Nine",f[f.Ten=10]="Ten",f[f.Jack=11]="Jack",f[f.Queen=12]="Queen",f[f.King=13]="King",t.Suit=void 0,(l=t.Suit||(t.Suit={}))[l.Clubs=0]="Clubs",l[l.Diamonds=1]="Diamonds",l[l.Hearts=2]="Hearts",l[l.Spades=3]="Spades";const R=[{rank:t.Rank.Ace,suit:t.Suit.Clubs},{rank:t.Rank.Two,suit:t.Suit.Clubs},{rank:t.Rank.Three,suit:t.Suit.Clubs},{rank:t.Rank.Four,suit:t.Suit.Clubs},{rank:t.Rank.Five,suit:t.Suit.Clubs},{rank:t.Rank.Six,suit:t.Suit.Clubs},{rank:t.Rank.Seven,suit:t.Suit.Clubs},{rank:t.Rank.Eight,suit:t.Suit.Clubs},{rank:t.Rank.Nine,suit:t.Suit.Clubs},{rank:t.Rank.Ten,suit:t.Suit.Clubs},{rank:t.Rank.Jack,suit:t.Suit.Clubs},{rank:t.Rank.Queen,suit:t.Suit.Clubs},{rank:t.Rank.King,suit:t.Suit.Clubs},{rank:t.Rank.Ace,suit:t.Suit.Diamonds},{rank:t.Rank.Two,suit:t.Suit.Diamonds},{rank:t.Rank.Three,suit:t.Suit.Diamonds},{rank:t.Rank.Four,suit:t.Suit.Diamonds},{rank:t.Rank.Five,suit:t.Suit.Diamonds},{rank:t.Rank.Six,suit:t.Suit.Diamonds},{rank:t.Rank.Seven,suit:t.Suit.Diamonds},{rank:t.Rank.Eight,suit:t.Suit.Diamonds},{rank:t.Rank.Nine,suit:t.Suit.Diamonds},{rank:t.Rank.Ten,suit:t.Suit.Diamonds},{rank:t.Rank.Jack,suit:t.Suit.Diamonds},{rank:t.Rank.Queen,suit:t.Suit.Diamonds},{rank:t.Rank.King,suit:t.Suit.Diamonds},{rank:t.Rank.Ace,suit:t.Suit.Hearts},{rank:t.Rank.Two,suit:t.Suit.Hearts},{rank:t.Rank.Three,suit:t.Suit.Hearts},{rank:t.Rank.Four,suit:t.Suit.Hearts},{rank:t.Rank.Five,suit:t.Suit.Hearts},{rank:t.Rank.Six,suit:t.Suit.Hearts},{rank:t.Rank.Seven,suit:t.Suit.Hearts},{rank:t.Rank.Eight,suit:t.Suit.Hearts},{rank:t.Rank.Nine,suit:t.Suit.Hearts},{rank:t.Rank.Ten,suit:t.Suit.Hearts},{rank:t.Rank.Jack,suit:t.Suit.Hearts},{rank:t.Rank.Queen,suit:t.Suit.Hearts},{rank:t.Rank.King,suit:t.Suit.Hearts},{rank:t.Rank.Ace,suit:t.Suit.Spades},{rank:t.Rank.Two,suit:t.Suit.Spades},{rank:t.Rank.Three,suit:t.Suit.Spades},{rank:t.Rank.Four,suit:t.Suit.Spades},{rank:t.Rank.Five,suit:t.Suit.Spades},{rank:t.Rank.Six,suit:t.Suit.Spades},{rank:t.Rank.Seven,suit:t.Suit.Spades},{rank:t.Rank.Eight,suit:t.Suit.Spades},{rank:t.Rank.Nine,suit:t.Suit.Spades},{rank:t.Rank.Ten,suit:t.Suit.Spades},{rank:t.Rank.Jack,suit:t.Suit.Spades},{rank:t.Rank.Queen,suit:t.Suit.Spades},{rank:t.Rank.King,suit:t.Suit.Spades}];class w extends Map{constructor(t,e){super(e),this.defaultValueOrDefaultValueFn=t,this.defaultValueIsFunction="function"==typeof t}get(t){return this.has(t)?super.get(t):this.defaultValueIsFunction?this.defaultValueOrDefaultValueFn(t):this.defaultValueOrDefaultValueFn}}const y=new WeakMap;function b(t){const e=t[0].map((t=>t.length));for(const n of t)for(const[t,{length:r}]of n.entries())e[t]<r&&(e[t]=r);return e}function T(t,e){if(Array.isArray(t)&&Array.isArray(e))return function(t,e){return t===e||t.length===e.length&&t.every(((t,n)=>t===e[n]))}(t,e);if(t instanceof Set&&e instanceof Set)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}(t,e);if(t instanceof Map&&e instanceof Map)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(const[n,r]of t.entries())if(!e.has(n)||e.get(n)!==r)return!1;return!0}(t,e);throw new RangeError("Expected both parameters to be an array, Set, or Map")}function v(t,e){return t+e}function E(t){const e=t.reduce(v);return e/("bigint"==typeof e?BigInt(t.length):t.length)}function A(t,e,n){return 1/(2.5066282746310002*e)*Math.E**(-.5*(t-n/e)**2)}function C(t,e){if(t>e)throw new RangeError("min exceeded max");return Math.random()*(e-t)+t}function N(t,e=E(t)){return t.map((t=>(t-e)**2)).reduce(v)/(t.length-1)}function x(t,e=E(t)){return Math.sqrt(N(t,e))}const M=Symbol("delayResolvedValue");var F=Object.freeze({__proto__:null,and:function(t,e){return t&e},or:function(t,e){return t|e},xor:function(t,e){return t^e}});function P(t,e){return t<e?-1:t>e?1:0}function O(t,e){return t<e?1:t>e?-1:0}var D=Object.freeze({__proto__:null,ascending:function(t,e){return e===undefined&&"function"==typeof t?(e,n)=>P(t(e),t(n)):P(t,e)},descending:function(t,e){return e===undefined&&"function"==typeof t?(e,n)=>O(t(e),t(n)):O(t,e)}});const H=/\S/;t.AutoPercentage=class{constructor(){this._count=0}percentage(){return this._count++,{[Symbol.toPrimitive]:()=>1/this._count}}count(){return this._count++,{[Symbol.toPrimitive]:()=>this._count}}},t.Bitwise=F,t.DefaultMap=w,t.Http=d,t.Range=e,t.Sort=D,t.Stopwatch=class{static start(){const t=new this;return t.start(),t}get started(){return this.startTime!==undefined}start(){this.startTime=process.hrtime.bigint()}end(){if(this.startTime===undefined)throw Error("This timer was not started");return Number(process.hrtime.bigint()-this.startTime)/1e6}},t.allDuplicates=function(t){const e=new Set,n=[];for(const r of t)e.has(r)?n.push(r):e.add(r);return n},t.binarySearch=function(t,e){let n=0,r=t.length-1;for(;n<=r;){const i=Math.trunc((n+r)/2),o=e(t[i]);if(o<0)n=i+1;else{if(!(o>0))return t[i];r=i-1}}return undefined},t.capitalize=function(t){const e=t.charAt(0).toUpperCase();return`${e}${t.slice(e.length)}`},t.chunk=function(t,e){return t.length===e?t.map((t=>[t])):h((n=>t.slice(n*e,n*e+e)),Math.ceil(t.length/e))},t.clamp=function(t,e,n){if(e>n)throw new RangeError("min exceeded max");return t<e?e:t>n?n:t},t.combineIterables=k,t.count=function(t){let e=0;for(const n of t)e++;return e},t.cycle=function*(t,e){for(let n=0;n<e;n++)yield*t},t.difference=function(t,e){if(t===e)return new Set;const n=new Set(t);for(const t of e)n["delete"](t);return n},t.duplicates=function(t){const e=new Set,n=new Set;for(const r of t)e.has(r)?n.add(r):e.add(r);return n},t.enumHas=function(t,e){return y.has(t)||y.set(t,new Set(Object.values(t))),y.get(t).has(e)},t.every=function(t,e){for(const n of t)if(!e(n))return!1;return!0},t.fill=function(t,e){return Array.from({length:e},(()=>t))},t.find=function(t,e){for(const n of t)if(e(n))return n;return undefined},t.findIndexAll=function(t,e){const n=[];for(let r=0;r<t.length;r++)e(t[r],r)&&n.push(r);return n},t.first=function(t,e){if(e===undefined){for(const e of t)return e;return undefined}return function*(t,e){for(const n of t){if(!e--)break;yield n}}(t,e)},t.formatTable=function(t,e=" "){const n=b(t);return t.map((t=>t.map(((t,e)=>t.padEnd(n[e]))).join(e))).join("\n")},t.frequencyTable=m,t.holes=function(t){const e=[];for(let n=0;n<t.length;n++)n in t||e.push(n);return e},t.identical=T,t.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1},t.indexOfAll=p,t.intersection=function(t,e){if(t===e)return new Set(t);const n=new Set,[r,i]=S(t,e);for(const t of r)i.has(t)&&n.add(t);return n},t.invert=function(t){return(...e)=>-t(...e)},t.isAnagram=function(t,e){return t===e||t.length===e.length&&T(m(t),m(e))},t.isDisjoint=function(t,e){if(t===e)return!1;const n=t instanceof Set?t:new Set(t);for(const t of e)if(n.has(t))return!1;return!0},t.isEmpty=function(t){for(const e of t)return!1;return!0},t.isSorted=function(t,e){for(let n=0;n<t.length-1;n++)if(e(t[n],t[n+1])>0)return!1;return!0},t.isSubset=function(t,e){if(t===e)return!0;for(const n of t)if(!e.has(n))return!1;return!0},t.isSuperset=function(t,e){if(t===e)return!0;for(const n of e)if(!t.has(n))return!1;return!0},t.isWhitespace=function(t){return!H.test(t)},t.join=function(t,e=","){let n="";const r=t[Symbol.iterator]();let i=r.next();for(;;){const t=i;if(i=r.next(),n+=t.value,i.done)return n;n+=e}},t.largeToSmall=S,t.lines=function(t){return t.split("\n").map((t=>t.trim())).filter((t=>t.length>0))},t.mapFill=h,t.mapRepeat=function*(t,e){for(let n=0;n<e;n++)yield t(n)},t.max=function(t,e){return e>t?e:t},t.maxColumnLength=b,t.mean=E,t.median=function(t){const e=t.length%2==0,n=t.length/2;if(e){const e="bigint"==typeof t[0]?2n:2;return(t[n-1]+t[n])/e}return t[Math.floor(n)]},t.min=function(t,e){return e<t?e:t},t.mode=function(t){const e=new Map;let n=0,r=[];for(const i of t){const t=e.get(i),o=t===undefined?1:t+1;e.set(i,o),o>n?(n=o,r=[i]):o===n&&r.push(i)}return r},t.multiReplace=function(t,e){const n=Object.entries(e);let r="",i=0;for(;i<t.length;)t:{for(const[e,o]of n)if(t.slice(i).startsWith(e)){r+=o,i+=e.length;break t}r+=t[i++]}return r},t.name=function q(t,e){return e?`${q(t)}${e.name in t?".":"#"}${e.name}`:t.name},t.newDeck=function(){return[...R]},t.normaldist=A,t.not=function(t){return(...e)=>!t(...e)},t.nullish=function(t){return null===t||t===undefined},t.padEnd=function(t,e,n){t.push(...g(n,e-t.length))},t.padStart=function(t,e,n){t.unshift(...g(n,e-t.length))},t.partition=function(t,e){const n=[],r=[];let i=0;for(const o of t)(e(o,i++)?n:r).push(o);return[n,r]},t.product=function(t,e){return t*e},t.pull=function(t,e){const n=t.indexOf(e);return-1===n?[]:t.splice(n,1)},t.pullAll=function(t,e){const n=p(t,e);n.reverse();const r=[];for(const e of n)r.push(t.splice(e,1)[0]);return r},t.random=C,t.randomInt=function(t,e){if(t>e)throw new RangeError("min exceeded max");return Math.floor(C(Math.ceil(t),Math.floor(e)))},t.regExpUnion=function(...t){return RegExp(t.map((t=>`(${t.source})`)).join("|"))},t.relativeStddev=function(t,e=E(t)){return x(t,e)/e},t.rename=function(t,e,n){if(e===n)return{...t};const{[e]:r,...i}={...t,[n]:t[e]};return i},t.repeat=g,t.replace=function(t,e,n){const r=t.indexOf(e);return-1!==r&&(t[r]=n),r},t.replaceAll=function(t,e,n){let r=0;for(let i=0;i<t.length;i++)t[i]===e&&(t[i]=n,r++);return r},t.same=function(...t){const e=t.map((t=>t[Symbol.iterator]()));for(;;){const t=e.map((t=>t.next())),[{done:n,value:r}]=t;for(const e of t){if(e.done)return t.every((t=>t.done===n));if(e.value!==r)return!1}}},t.sample=function(t){return t[Math.floor(Math.random()*t.length)]},t.settled=async function(t){try{return[await t,undefined]}catch(e){return[undefined,e]}},t.shuffle=function(t,e=!0){const n=e?t:[...t];for(let t=n.length-1;t>0;t--){const e=Math.floor(Math.random()*(t+1));[n[t],n[e]]=[n[e],n[t]]}if(!e)return n},t.some=function(t,e){for(const n of t)if(e(n))return!0;return!1},t.sortObject=function(t,e){return Object.entries(t).sort((([,t],[,n])=>e(t,n)))},t.standardNormaldist=function(t){return A(t,1,0)},t.stddev=x,t.sum=v,t.symmetricDifference=function(t,e){if(t===e)return new Set;const n=new Set(t);for(const t of e)n.has(t)?n["delete"](t):n.add(t);return n},t.thunkify=function(t){let e,n=!1;return(...r)=>(n||(n=!0,e=t(...r)),e)},t.timeout=async function(t,e){const[n,r]=function(t){let e;const n=new Promise((n=>{e=setTimeout((()=>{n(M)}),t)}));return[e,n]}(e),i=await Promise.race([t,r])["finally"]((()=>{clearTimeout(n)}));if(i===M)throw Error("Timed out");return i},t.toDigits=function(t,e){const n=10**e;return Math.round(t*n*(1+Number.EPSILON))/n},t.truncate=function(t,e,n=""){return t.length>e?`${t.slice(0,e)}${n}`:t},t.uncapitalize=function(t){const e=t.charAt(0).toLowerCase();return`${e}${t.slice(e.length)}`},t.union=function(t,e){return t===e?new Set(t):new Set(k(t,e))},t.variance=N,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jonahsniderUtil={});
var t,e;t=this,e=function(t){"use strict";class e{constructor(t,e){if(this.lower=t,this.upper=e,t>e)throw new RangeError("lower must be less than upper")}static from(t){const[n,r]=t;return new e(n,r)}has(t){return t>=this.lower&&t<=this.upper}*[Symbol.iterator](){yield this.lower,yield this.upper}isSuperrange(t){return t===this||this.lower>=t.lower&&this.upper<=t.upper}isSubrange(t){return t===this||this.lower<=t.lower&&this.upper>=t.upper}equals(t){return t===this||this.lower===t.lower&&this.upper===t.upper}intersects(t){return t===this||this.lower<=t.upper&&this.upper>=t.lower}}const n=Object.freeze(new e(100,200)),r=Object.freeze(new e(200,300)),i=Object.freeze(new e(300,400)),o=Object.freeze(new e(400,500)),u=Object.freeze(new e(500,600));var a,s,c=Object.freeze({__proto__:null,informational:n,success:r,redirects:i,clientErrors:o,serverErrors:u});!function(t){t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(a||(a={})),function(t){t.Get="GET",t.Head="HEAD",t.Post="POST",t.Put="PUT",t.Delete="DELETE",t.Connect="CONNECT",t.Options="OPTIONS",t.Trace="TRACE",t.Patch="PATCH"}(s||(s={}));var f,l,d=Object.freeze({__proto__:null,StatusRange:c,get Status(){return a},get Method(){return s}});function h(t,e){return Array.from({length:e},((e,n)=>t(n)))}function p(t,e){const n=[];for(let r=0;r<t.length;r++)t[r]===e&&n.push(r);return n}function S(t,e){let n;if("size"in t?n="size":"length"in t&&(n="length"),!n)throw new RangeError("Expected a to have a size property or a length property");return t[n]<e[n]?[e,t]:[t,e]}function*k(...t){for(const e of t)yield*e}function m(t){const e=new Map;for(const n of t){const t=(e.get(n)??0)+1;e.set(n,t)}return e}function*g(t,e){for(let n=0;n<e;n++)yield t}t.Rank=void 0,(f=t.Rank||(t.Rank={}))[f.Ace=1]="Ace",f[f.Two=2]="Two",f[f.Three=3]="Three",f[f.Four=4]="Four",f[f.Five=5]="Five",f[f.Six=6]="Six",f[f.Seven=7]="Seven",f[f.Eight=8]="Eight",f[f.Nine=9]="Nine",f[f.Ten=10]="Ten",f[f.Jack=11]="Jack",f[f.Queen=12]="Queen",f[f.King=13]="King",t.Suit=void 0,(l=t.Suit||(t.Suit={}))[l.Clubs=0]="Clubs",l[l.Diamonds=1]="Diamonds",l[l.Hearts=2]="Hearts",l[l.Spades=3]="Spades";const R=[{rank:t.Rank.Ace,suit:t.Suit.Clubs},{rank:t.Rank.Two,suit:t.Suit.Clubs},{rank:t.Rank.Three,suit:t.Suit.Clubs},{rank:t.Rank.Four,suit:t.Suit.Clubs},{rank:t.Rank.Five,suit:t.Suit.Clubs},{rank:t.Rank.Six,suit:t.Suit.Clubs},{rank:t.Rank.Seven,suit:t.Suit.Clubs},{rank:t.Rank.Eight,suit:t.Suit.Clubs},{rank:t.Rank.Nine,suit:t.Suit.Clubs},{rank:t.Rank.Ten,suit:t.Suit.Clubs},{rank:t.Rank.Jack,suit:t.Suit.Clubs},{rank:t.Rank.Queen,suit:t.Suit.Clubs},{rank:t.Rank.King,suit:t.Suit.Clubs},{rank:t.Rank.Ace,suit:t.Suit.Diamonds},{rank:t.Rank.Two,suit:t.Suit.Diamonds},{rank:t.Rank.Three,suit:t.Suit.Diamonds},{rank:t.Rank.Four,suit:t.Suit.Diamonds},{rank:t.Rank.Five,suit:t.Suit.Diamonds},{rank:t.Rank.Six,suit:t.Suit.Diamonds},{rank:t.Rank.Seven,suit:t.Suit.Diamonds},{rank:t.Rank.Eight,suit:t.Suit.Diamonds},{rank:t.Rank.Nine,suit:t.Suit.Diamonds},{rank:t.Rank.Ten,suit:t.Suit.Diamonds},{rank:t.Rank.Jack,suit:t.Suit.Diamonds},{rank:t.Rank.Queen,suit:t.Suit.Diamonds},{rank:t.Rank.King,suit:t.Suit.Diamonds},{rank:t.Rank.Ace,suit:t.Suit.Hearts},{rank:t.Rank.Two,suit:t.Suit.Hearts},{rank:t.Rank.Three,suit:t.Suit.Hearts},{rank:t.Rank.Four,suit:t.Suit.Hearts},{rank:t.Rank.Five,suit:t.Suit.Hearts},{rank:t.Rank.Six,suit:t.Suit.Hearts},{rank:t.Rank.Seven,suit:t.Suit.Hearts},{rank:t.Rank.Eight,suit:t.Suit.Hearts},{rank:t.Rank.Nine,suit:t.Suit.Hearts},{rank:t.Rank.Ten,suit:t.Suit.Hearts},{rank:t.Rank.Jack,suit:t.Suit.Hearts},{rank:t.Rank.Queen,suit:t.Suit.Hearts},{rank:t.Rank.King,suit:t.Suit.Hearts},{rank:t.Rank.Ace,suit:t.Suit.Spades},{rank:t.Rank.Two,suit:t.Suit.Spades},{rank:t.Rank.Three,suit:t.Suit.Spades},{rank:t.Rank.Four,suit:t.Suit.Spades},{rank:t.Rank.Five,suit:t.Suit.Spades},{rank:t.Rank.Six,suit:t.Suit.Spades},{rank:t.Rank.Seven,suit:t.Suit.Spades},{rank:t.Rank.Eight,suit:t.Suit.Spades},{rank:t.Rank.Nine,suit:t.Suit.Spades},{rank:t.Rank.Ten,suit:t.Suit.Spades},{rank:t.Rank.Jack,suit:t.Suit.Spades},{rank:t.Rank.Queen,suit:t.Suit.Spades},{rank:t.Rank.King,suit:t.Suit.Spades}];class w extends Map{constructor(t,e){super(e),this.defaultValueOrDefaultValueFn=t,this.defaultValueIsFunction="function"==typeof t}get(t){return this.has(t)?super.get(t):this.defaultValueIsFunction?this.defaultValueOrDefaultValueFn(t):this.defaultValueOrDefaultValueFn}}const y=new WeakMap;function b(t){const e=t[0].map((t=>t.length));for(const n of t)for(const[t,{length:r}]of n.entries())e[t]<r&&(e[t]=r);return e}function T(t,e){if(Array.isArray(t)&&Array.isArray(e))return function(t,e){return t===e||t.length===e.length&&t.every(((t,n)=>t===e[n]))}(t,e);if(t instanceof Set&&e instanceof Set)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}(t,e);if(t instanceof Map&&e instanceof Map)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(const[n,r]of t.entries())if(!e.has(n)||e.get(n)!==r)return!1;return!0}(t,e);throw new RangeError("Expected both parameters to be an array, Set, or Map")}function v(t,e,n){if(e>n)throw new RangeError("min exceeded max");return t<e?e:t>n?n:t}function E(t,e){return t+e}function A(t){const e=t.reduce(E);return e/("bigint"==typeof e?BigInt(t.length):t.length)}function x(t,e,n){return 1/(2.5066282746310002*e)*Math.E**(-.5*(t-n/e)**2)}function C(t,e){if(t>e)throw new RangeError("min exceeded max");return Math.random()*(e-t)+t}function N(t,e=A(t)){return t.map((t=>(t-e)**2)).reduce(E)/(t.length-1)}function M(t,e=A(t)){return Math.sqrt(N(t,e))}const F=Symbol("delayResolvedValue");var P=Object.freeze({__proto__:null,and:function(t,e){return t&e},or:function(t,e){return t|e},xor:function(t,e){return t^e}});function O(t,e){return t<e?-1:t>e?1:0}function D(t,e){return t<e?1:t>e?-1:0}var H=Object.freeze({__proto__:null,ascending:function(t,e){return e===undefined&&"function"==typeof t?(e,n)=>O(t(e),t(n)):O(t,e)},descending:function(t,e){return e===undefined&&"function"==typeof t?(e,n)=>D(t(e),t(n)):D(t,e)}});const z=/\S/;t.AutoPercentage=class{constructor(){this._count=0}percentage(){return this._count++,{[Symbol.toPrimitive]:()=>1/this._count}}count(){return this._count++,{[Symbol.toPrimitive]:()=>this._count}}},t.Bitwise=P,t.DefaultMap=w,t.Http=d,t.Range=e,t.Sort=H,t.Stopwatch=class{static start(){const t=new this;return t.start(),t}get started(){return this.startTime!==undefined}start(){this.startTime=process.hrtime.bigint()}end(){if(this.startTime===undefined)throw Error("This timer was not started");return Number(process.hrtime.bigint()-this.startTime)/1e6}},t.allDuplicates=function(t){const e=new Set,n=[];for(const r of t)e.has(r)?n.push(r):e.add(r);return n},t.binarySearch=function(t,e){let n=0,r=t.length-1;for(;n<=r;){const i=Math.trunc((n+r)/2),o=e(t[i]);if(o<0)n=i+1;else{if(!(o>0))return t[i];r=i-1}}return undefined},t.capitalize=function(t){const e=t.charAt(0).toUpperCase();return`${e}${t.slice(e.length)}`},t.chunk=function(t,e){return t.length===e?t.map((t=>[t])):h((n=>t.slice(n*e,n*e+e)),Math.ceil(t.length/e))},t.clamp=v,t.combineIterables=k,t.count=function(t){let e=0;for(const n of t)e++;return e},t.cycle=function*(t,e){for(let n=0;n<e;n++)yield*t},t.difference=function(t,e){if(t===e)return new Set;const n=new Set(t);for(const t of e)n["delete"](t);return n},t.duplicates=function(t){const e=new Set,n=new Set;for(const r of t)e.has(r)?n.add(r):e.add(r);return n},t.enumHas=function(t,e){return y.has(t)||y.set(t,new Set(Object.values(t))),y.get(t).has(e)},t.every=function(t,e){for(const n of t)if(!e(n))return!1;return!0},t.fill=function(t,e){return Array.from({length:e},(()=>t))},t.find=function(t,e){for(const n of t)if(e(n))return n;return undefined},t.findIndexAll=function(t,e){const n=[];for(let r=0;r<t.length;r++)e(t[r],r)&&n.push(r);return n},t.first=function(t,e){if(e===undefined){for(const e of t)return e;return undefined}return function*(t,e){for(const n of t){if(!e--)break;yield n}}(t,e)},t.formatTable=function(t,e=" "){const n=b(t);return t.map((t=>t.map(((t,e)=>t.padEnd(n[e]))).join(e))).join("\n")},t.frequencyTable=m,t.holes=function(t){const e=[];for(let n=0;n<t.length;n++)n in t||e.push(n);return e},t.identical=T,t.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1},t.indexOfAll=p,t.intersection=function(t,e){if(t===e)return new Set(t);const n=new Set,[r,i]=S(t,e);for(const t of r)i.has(t)&&n.add(t);return n},t.invert=function(t){return(...e)=>-t(...e)},t.isAnagram=function(t,e){return t===e||t.length===e.length&&T(m(t),m(e))},t.isDisjoint=function(t,e){if(t===e)return!1;const n=t instanceof Set?t:new Set(t);for(const t of e)if(n.has(t))return!1;return!0},t.isEmpty=function(t){for(const e of t)return!1;return!0},t.isSorted=function(t,e){for(let n=0;n<t.length-1;n++)if(e(t[n],t[n+1])>0)return!1;return!0},t.isSubset=function(t,e){if(t===e)return!0;for(const n of t)if(!e.has(n))return!1;return!0},t.isSuperset=function(t,e){if(t===e)return!0;for(const n of e)if(!t.has(n))return!1;return!0},t.isWhitespace=function(t){return!z.test(t)},t.jaccardIndex=function(t,e){if(0===t.size&&0===e.size)return 1;let n=0;const[r,i]=S(t,e);for(const t of r)i.has(t)&&n++;return v(n/(t.size+e.size-n),0,1)},t.join=function(t,e=","){let n="";const r=t[Symbol.iterator]();let i=r.next();for(;;){const t=i;if(i=r.next(),n+=t.value,i.done)return n;n+=e}},t.largeToSmall=S,t.lines=function(t){return t.split("\n").map((t=>t.trim())).filter((t=>t.length>0))},t.mapFill=h,t.mapRepeat=function*(t,e){for(let n=0;n<e;n++)yield t(n)},t.max=function(t,e){return e>t?e:t},t.maxColumnLength=b,t.mean=A,t.median=function(t){const e=t.length%2==0,n=t.length/2;if(e){const e="bigint"==typeof t[0]?2n:2;return(t[n-1]+t[n])/e}return t[Math.floor(n)]},t.min=function(t,e){return e<t?e:t},t.mode=function(t){const e=new Map;let n=0,r=[];for(const i of t){const t=e.get(i),o=t===undefined?1:t+1;e.set(i,o),o>n?(n=o,r=[i]):o===n&&r.push(i)}return r},t.multiReplace=function(t,e){const n=Object.entries(e);let r="",i=0;for(;i<t.length;)t:{for(const[e,o]of n)if(t.slice(i).startsWith(e)){r+=o,i+=e.length;break t}r+=t[i++]}return r},t.name=function q(t,e){return e?`${q(t)}${e.name in t?".":"#"}${e.name}`:t.name},t.newDeck=function(){return[...R]},t.normaldist=x,t.not=function(t){return(...e)=>!t(...e)},t.nullish=function(t){return null===t||t===undefined},t.padEnd=function(t,e,n){t.push(...g(n,e-t.length))},t.padStart=function(t,e,n){t.unshift(...g(n,e-t.length))},t.partition=function(t,e){const n=[],r=[];let i=0;for(const o of t)(e(o,i++)?n:r).push(o);return[n,r]},t.product=function(t,e){return t*e},t.pull=function(t,e){const n=t.indexOf(e);return-1===n?[]:t.splice(n,1)},t.pullAll=function(t,e){const n=p(t,e);n.reverse();const r=[];for(const e of n)r.push(t.splice(e,1)[0]);return r},t.random=C,t.randomInt=function(t,e){if(t>e)throw new RangeError("min exceeded max");return Math.floor(C(Math.ceil(t),Math.floor(e)))},t.regExpUnion=function(...t){return RegExp(t.map((t=>`(${t.source})`)).join("|"))},t.relativeStddev=function(t,e=A(t)){return M(t,e)/e},t.rename=function(t,e,n){if(e===n)return{...t};const{[e]:r,...i}={...t,[n]:t[e]};return i},t.repeat=g,t.replace=function(t,e,n){const r=t.indexOf(e);return-1!==r&&(t[r]=n),r},t.replaceAll=function(t,e,n){let r=0;for(let i=0;i<t.length;i++)t[i]===e&&(t[i]=n,r++);return r},t.same=function(...t){const e=t.map((t=>t[Symbol.iterator]()));for(;;){const t=e.map((t=>t.next())),[{done:n,value:r}]=t;for(const e of t){if(e.done)return t.every((t=>t.done===n));if(e.value!==r)return!1}}},t.sample=function(t){return t[Math.floor(Math.random()*t.length)]},t.settled=async function(t){try{return[await t,undefined]}catch(e){return[undefined,e]}},t.shuffle=function(t,e=!0){const n=e?t:[...t];for(let t=n.length-1;t>0;t--){const e=Math.floor(Math.random()*(t+1));[n[t],n[e]]=[n[e],n[t]]}if(!e)return n},t.some=function(t,e){for(const n of t)if(e(n))return!0;return!1},t.sortObject=function(t,e){return Object.entries(t).sort((([,t],[,n])=>e(t,n)))},t.standardNormaldist=function(t){return x(t,1,0)},t.stddev=M,t.sum=E,t.symmetricDifference=function(t,e){if(t===e)return new Set;const n=new Set(t);for(const t of e)n.has(t)?n["delete"](t):n.add(t);return n},t.thunkify=function(t){let e,n=!1;return(...r)=>(n||(n=!0,e=t(...r)),e)},t.timeout=async function(t,e){const[n,r]=function(t){let e;const n=new Promise((n=>{e=setTimeout((()=>{n(F)}),t)}));return[e,n]}(e),i=await Promise.race([t,r])["finally"]((()=>{clearTimeout(n)}));if(i===F)throw Error("Timed out");return i},t.toDigits=function(t,e){const n=10**e;return Math.round(t*n*(1+Number.EPSILON))/n},t.truncate=function(t,e,n=""){return t.length>e?`${t.slice(0,e)}${n}`:t},t.uncapitalize=function(t){const e=t.charAt(0).toLowerCase();return`${e}${t.slice(e.length)}`},t.union=function(t,e){return t===e?new Set(t):new Set(k(t,e))},t.variance=N,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jonahsniderUtil={});
//# sourceMappingURL=index.dev.js.map

@@ -1,2 +0,2 @@

var t,e;t=this,e=function(t){"use strict";class e{constructor(t,e){if(this.lower=t,this.upper=e,t>e)throw new RangeError("lower must be less than upper")}static from(t){const[n,r]=t;return new e(n,r)}has(t){return t>=this.lower&&t<=this.upper}*[Symbol.iterator](){yield this.lower,yield this.upper}isSuperrange(t){return t===this||this.lower>=t.lower&&this.upper<=t.upper}isSubrange(t){return t===this||this.lower<=t.lower&&this.upper>=t.upper}equals(t){return t===this||this.lower===t.lower&&this.upper===t.upper}intersects(t){return t===this||this.lower<=t.upper&&this.upper>=t.lower}}const n=Object.freeze(new e(100,200)),r=Object.freeze(new e(200,300)),i=Object.freeze(new e(300,400)),o=Object.freeze(new e(400,500)),u=Object.freeze(new e(500,600));var a,s,c=Object.freeze({__proto__:null,informational:n,success:r,redirects:i,clientErrors:o,serverErrors:u});!function(t){t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(a||(a={})),function(t){t.Get="GET",t.Head="HEAD",t.Post="POST",t.Put="PUT",t.Delete="DELETE",t.Connect="CONNECT",t.Options="OPTIONS",t.Trace="TRACE",t.Patch="PATCH"}(s||(s={}));var f,l,d=Object.freeze({__proto__:null,StatusRange:c,get Status(){return a},get Method(){return s}});function h(t,e){return Array.from({length:e},((e,n)=>t(n)))}function p(t,e){const n=[];for(let r=0;r<t.length;r++)t[r]===e&&n.push(r);return n}function S(t,e){let n;if("size"in t?n="size":"length"in t&&(n="length"),!n)throw new RangeError("Expected a to have a size property or a length property");return t[n]<e[n]?[e,t]:[t,e]}function*k(...t){for(const e of t)yield*e}function m(t){const e=new Map;for(const n of t){const t=(e.get(n)??0)+1;e.set(n,t)}return e}function*g(t,e){for(let n=0;n<e;n++)yield t}t.Rank=void 0,(f=t.Rank||(t.Rank={}))[f.Ace=1]="Ace",f[f.Two=2]="Two",f[f.Three=3]="Three",f[f.Four=4]="Four",f[f.Five=5]="Five",f[f.Six=6]="Six",f[f.Seven=7]="Seven",f[f.Eight=8]="Eight",f[f.Nine=9]="Nine",f[f.Ten=10]="Ten",f[f.Jack=11]="Jack",f[f.Queen=12]="Queen",f[f.King=13]="King",t.Suit=void 0,(l=t.Suit||(t.Suit={}))[l.Clubs=0]="Clubs",l[l.Diamonds=1]="Diamonds",l[l.Hearts=2]="Hearts",l[l.Spades=3]="Spades";const R=[{rank:t.Rank.Ace,suit:t.Suit.Clubs},{rank:t.Rank.Two,suit:t.Suit.Clubs},{rank:t.Rank.Three,suit:t.Suit.Clubs},{rank:t.Rank.Four,suit:t.Suit.Clubs},{rank:t.Rank.Five,suit:t.Suit.Clubs},{rank:t.Rank.Six,suit:t.Suit.Clubs},{rank:t.Rank.Seven,suit:t.Suit.Clubs},{rank:t.Rank.Eight,suit:t.Suit.Clubs},{rank:t.Rank.Nine,suit:t.Suit.Clubs},{rank:t.Rank.Ten,suit:t.Suit.Clubs},{rank:t.Rank.Jack,suit:t.Suit.Clubs},{rank:t.Rank.Queen,suit:t.Suit.Clubs},{rank:t.Rank.King,suit:t.Suit.Clubs},{rank:t.Rank.Ace,suit:t.Suit.Diamonds},{rank:t.Rank.Two,suit:t.Suit.Diamonds},{rank:t.Rank.Three,suit:t.Suit.Diamonds},{rank:t.Rank.Four,suit:t.Suit.Diamonds},{rank:t.Rank.Five,suit:t.Suit.Diamonds},{rank:t.Rank.Six,suit:t.Suit.Diamonds},{rank:t.Rank.Seven,suit:t.Suit.Diamonds},{rank:t.Rank.Eight,suit:t.Suit.Diamonds},{rank:t.Rank.Nine,suit:t.Suit.Diamonds},{rank:t.Rank.Ten,suit:t.Suit.Diamonds},{rank:t.Rank.Jack,suit:t.Suit.Diamonds},{rank:t.Rank.Queen,suit:t.Suit.Diamonds},{rank:t.Rank.King,suit:t.Suit.Diamonds},{rank:t.Rank.Ace,suit:t.Suit.Hearts},{rank:t.Rank.Two,suit:t.Suit.Hearts},{rank:t.Rank.Three,suit:t.Suit.Hearts},{rank:t.Rank.Four,suit:t.Suit.Hearts},{rank:t.Rank.Five,suit:t.Suit.Hearts},{rank:t.Rank.Six,suit:t.Suit.Hearts},{rank:t.Rank.Seven,suit:t.Suit.Hearts},{rank:t.Rank.Eight,suit:t.Suit.Hearts},{rank:t.Rank.Nine,suit:t.Suit.Hearts},{rank:t.Rank.Ten,suit:t.Suit.Hearts},{rank:t.Rank.Jack,suit:t.Suit.Hearts},{rank:t.Rank.Queen,suit:t.Suit.Hearts},{rank:t.Rank.King,suit:t.Suit.Hearts},{rank:t.Rank.Ace,suit:t.Suit.Spades},{rank:t.Rank.Two,suit:t.Suit.Spades},{rank:t.Rank.Three,suit:t.Suit.Spades},{rank:t.Rank.Four,suit:t.Suit.Spades},{rank:t.Rank.Five,suit:t.Suit.Spades},{rank:t.Rank.Six,suit:t.Suit.Spades},{rank:t.Rank.Seven,suit:t.Suit.Spades},{rank:t.Rank.Eight,suit:t.Suit.Spades},{rank:t.Rank.Nine,suit:t.Suit.Spades},{rank:t.Rank.Ten,suit:t.Suit.Spades},{rank:t.Rank.Jack,suit:t.Suit.Spades},{rank:t.Rank.Queen,suit:t.Suit.Spades},{rank:t.Rank.King,suit:t.Suit.Spades}];class y extends Map{constructor(t,e){super(e),this.defaultValueOrDefaultValueFn=t,this.defaultValueIsFunction="function"==typeof t}get(t){return this.has(t)?super.get(t):this.defaultValueIsFunction?this.defaultValueOrDefaultValueFn(t):this.defaultValueOrDefaultValueFn}}const b=new WeakMap;function w(t){const e=t[0].map((t=>t.length));for(const n of t)for(const[t,{length:r}]of n.entries())e[t]<r&&(e[t]=r);return e}function T(t,e){if(Array.isArray(t)&&Array.isArray(e))return function(t,e){return t===e||t.length===e.length&&t.every(((t,n)=>t===e[n]))}(t,e);if(t instanceof Set&&e instanceof Set)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}(t,e);if(t instanceof Map&&e instanceof Map)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(const[n,r]of t.entries())if(!e.has(n)||e.get(n)!==r)return!1;return!0}(t,e);throw new RangeError("Expected both parameters to be an array, Set, or Map")}function v(t,e){return t+e}function E(t){const e=t.reduce(v);return e/("bigint"==typeof e?BigInt(t.length):t.length)}function A(t,e,n){return 1/(2.5066282746310002*e)*Math.E**(-.5*(t-n/e)**2)}function C(t,e){return Math.random()*(e-t)+t}function N(t,e=E(t)){return t.map((t=>(t-e)**2)).reduce(v)/(t.length-1)}function M(t,e=E(t)){return Math.sqrt(N(t,e))}const F=Symbol("delayResolvedValue");var P=Object.freeze({__proto__:null,and:function(t,e){return t&e},or:function(t,e){return t|e},xor:function(t,e){return t^e}});function x(t,e){return t<e?-1:t>e?1:0}function O(t,e){return t<e?1:t>e?-1:0}var D=Object.freeze({__proto__:null,ascending:function(t,e){return e===undefined&&"function"==typeof t?(e,n)=>x(t(e),t(n)):x(t,e)},descending:function(t,e){return e===undefined&&"function"==typeof t?(e,n)=>O(t(e),t(n)):O(t,e)}});const H=/\S/;t.AutoPercentage=class{constructor(){this._count=0}percentage(){return this._count++,{[Symbol.toPrimitive]:()=>1/this._count}}count(){return this._count++,{[Symbol.toPrimitive]:()=>this._count}}},t.Bitwise=P,t.DefaultMap=y,t.Http=d,t.Range=e,t.Sort=D,t.Stopwatch=class{static start(){const t=new this;return t.start(),t}get started(){return this.startTime!==undefined}start(){this.startTime=process.hrtime.bigint()}end(){return Number(process.hrtime.bigint()-this.startTime)/1e6}},t.allDuplicates=function(t){const e=new Set,n=[];for(const r of t)e.has(r)?n.push(r):e.add(r);return n},t.binarySearch=function(t,e){let n=0,r=t.length-1;for(;n<=r;){const i=Math.trunc((n+r)/2),o=e(t[i]);if(o<0)n=i+1;else{if(!(o>0))return t[i];r=i-1}}return undefined},t.capitalize=function(t){const e=t.charAt(0).toUpperCase();return`${e}${t.slice(e.length)}`},t.chunk=function(t,e){return t.length===e?t.map((t=>[t])):h((n=>t.slice(n*e,n*e+e)),Math.ceil(t.length/e))},t.clamp=function(t,e,n){return t<e?e:t>n?n:t},t.combineIterables=k,t.count=function(t){let e=0;for(const n of t)e++;return e},t.cycle=function*(t,e){for(let n=0;n<e;n++)yield*t},t.difference=function(t,e){if(t===e)return new Set;const n=new Set(t);for(const t of e)n["delete"](t);return n},t.duplicates=function(t){const e=new Set,n=new Set;for(const r of t)e.has(r)?n.add(r):e.add(r);return n},t.enumHas=function(t,e){return b.has(t)||b.set(t,new Set(Object.values(t))),b.get(t).has(e)},t.every=function(t,e){for(const n of t)if(!e(n))return!1;return!0},t.fill=function(t,e){return Array.from({length:e},(()=>t))},t.find=function(t,e){for(const n of t)if(e(n))return n;return undefined},t.findIndexAll=function(t,e){const n=[];for(let r=0;r<t.length;r++)e(t[r],r)&&n.push(r);return n},t.first=function(t,e){if(e===undefined){for(const e of t)return e;return undefined}return function*(t,e){for(const n of t){if(!e--)break;yield n}}(t,e)},t.formatTable=function(t,e=" "){const n=w(t);return t.map((t=>t.map(((t,e)=>t.padEnd(n[e]))).join(e))).join("\n")},t.frequencyTable=m,t.holes=function(t){const e=[];for(let n=0;n<t.length;n++)n in t||e.push(n);return e},t.identical=T,t.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1},t.indexOfAll=p,t.intersection=function(t,e){if(t===e)return new Set(t);const n=new Set,[r,i]=S(t,e);for(const t of r)i.has(t)&&n.add(t);return n},t.invert=function(t){return(...e)=>-t(...e)},t.isAnagram=function(t,e){return t===e||t.length===e.length&&T(m(t),m(e))},t.isDisjoint=function(t,e){if(t===e)return!1;const n=t instanceof Set?t:new Set(t);for(const t of e)if(n.has(t))return!1;return!0},t.isEmpty=function(t){for(const e of t)return!1;return!0},t.isSorted=function(t,e){for(let n=0;n<t.length-1;n++)if(e(t[n],t[n+1])>0)return!1;return!0},t.isSubset=function(t,e){if(t===e)return!0;for(const n of t)if(!e.has(n))return!1;return!0},t.isSuperset=function(t,e){if(t===e)return!0;for(const n of e)if(!t.has(n))return!1;return!0},t.isWhitespace=function(t){return!H.test(t)},t.join=function(t,e=","){let n="";const r=t[Symbol.iterator]();let i=r.next();for(;;){const t=i;if(i=r.next(),n+=t.value,i.done)return n;n+=e}},t.largeToSmall=S,t.lines=function(t){return t.split("\n").map((t=>t.trim())).filter((t=>t.length>0))},t.mapFill=h,t.mapRepeat=function*(t,e){for(let n=0;n<e;n++)yield t(n)},t.max=function(t,e){return e>t?e:t},t.maxColumnLength=w,t.mean=E,t.median=function(t){const e=t.length%2==0,n=t.length/2;if(e){const e="bigint"==typeof t[0]?2n:2;return(t[n-1]+t[n])/e}return t[Math.floor(n)]},t.min=function(t,e){return e<t?e:t},t.mode=function(t){const e=new Map;let n=0,r=[];for(const i of t){const t=e.get(i),o=t===undefined?1:t+1;e.set(i,o),o>n?(n=o,r=[i]):o===n&&r.push(i)}return r},t.multiReplace=function(t,e){const n=Object.entries(e);let r="",i=0;for(;i<t.length;)t:{for(const[e,o]of n)if(t.slice(i).startsWith(e)){r+=o,i+=e.length;break t}r+=t[i++]}return r},t.name=function q(t,e){return e?`${q(t)}${e.name in t?".":"#"}${e.name}`:t.name},t.newDeck=function(){return[...R]},t.normaldist=A,t.not=function(t){return(...e)=>!t(...e)},t.nullish=function(t){return null===t||t===undefined},t.padEnd=function(t,e,n){t.push(...g(n,e-t.length))},t.padStart=function(t,e,n){t.unshift(...g(n,e-t.length))},t.partition=function(t,e){const n=[],r=[];let i=0;for(const o of t)(e(o,i++)?n:r).push(o);return[n,r]},t.product=function(t,e){return t*e},t.pull=function(t,e){const n=t.indexOf(e);return-1===n?[]:t.splice(n,1)},t.pullAll=function(t,e){const n=p(t,e);n.reverse();const r=[];for(const e of n)r.push(t.splice(e,1)[0]);return r},t.random=C,t.randomInt=function(t,e){return Math.floor(C(Math.ceil(t),Math.floor(e)))},t.regExpUnion=function(...t){return RegExp(t.map((t=>`(${t.source})`)).join("|"))},t.relativeStddev=function(t,e=E(t)){return M(t,e)/e},t.rename=function(t,e,n){if(e===n)return{...t};const{[e]:r,...i}={...t,[n]:t[e]};return i},t.repeat=g,t.replace=function(t,e,n){const r=t.indexOf(e);return-1!==r&&(t[r]=n),r},t.replaceAll=function(t,e,n){let r=0;for(let i=0;i<t.length;i++)t[i]===e&&(t[i]=n,r++);return r},t.same=function(...t){const e=t.map((t=>t[Symbol.iterator]()));for(;;){const t=e.map((t=>t.next())),[{done:n,value:r}]=t;for(const e of t){if(e.done)return t.every((t=>t.done===n));if(e.value!==r)return!1}}},t.sample=function(t){return t[Math.floor(Math.random()*t.length)]},t.settled=async function(t){try{return[await t,undefined]}catch(e){return[undefined,e]}},t.shuffle=function(t,e=!0){const n=e?t:[...t];for(let t=n.length-1;t>0;t--){const e=Math.floor(Math.random()*(t+1));[n[t],n[e]]=[n[e],n[t]]}if(!e)return n},t.some=function(t,e){for(const n of t)if(e(n))return!0;return!1},t.sortObject=function(t,e){return Object.entries(t).sort((([,t],[,n])=>e(t,n)))},t.standardNormaldist=function(t){return A(t,1,0)},t.stddev=M,t.sum=v,t.symmetricDifference=function(t,e){if(t===e)return new Set;const n=new Set(t);for(const t of e)n.has(t)?n["delete"](t):n.add(t);return n},t.thunkify=function(t){let e,n=!1;return(...r)=>(n||(n=!0,e=t(...r)),e)},t.timeout=async function(t,e){const[n,r]=function(t){let e;const n=new Promise((n=>{e=setTimeout((()=>{n(F)}),t)}));return[e,n]}(e),i=await Promise.race([t,r])["finally"]((()=>{clearTimeout(n)}));if(i===F)throw Error("Timed out");return i},t.toDigits=function(t,e){const n=10**e;return Math.round(t*n*(1+Number.EPSILON))/n},t.truncate=function(t,e,n=""){return t.length>e?`${t.slice(0,e)}${n}`:t},t.uncapitalize=function(t){const e=t.charAt(0).toLowerCase();return`${e}${t.slice(e.length)}`},t.union=function(t,e){return t===e?new Set(t):new Set(k(t,e))},t.variance=N,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jonahsniderUtil={});
var t,e;t=this,e=function(t){"use strict";class e{constructor(t,e){if(this.lower=t,this.upper=e,t>e)throw new RangeError("lower must be less than upper")}static from(t){const[n,r]=t;return new e(n,r)}has(t){return t>=this.lower&&t<=this.upper}*[Symbol.iterator](){yield this.lower,yield this.upper}isSuperrange(t){return t===this||this.lower>=t.lower&&this.upper<=t.upper}isSubrange(t){return t===this||this.lower<=t.lower&&this.upper>=t.upper}equals(t){return t===this||this.lower===t.lower&&this.upper===t.upper}intersects(t){return t===this||this.lower<=t.upper&&this.upper>=t.lower}}const n=Object.freeze(new e(100,200)),r=Object.freeze(new e(200,300)),i=Object.freeze(new e(300,400)),o=Object.freeze(new e(400,500)),u=Object.freeze(new e(500,600));var a,s,c=Object.freeze({__proto__:null,informational:n,success:r,redirects:i,clientErrors:o,serverErrors:u});!function(t){t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(a||(a={})),function(t){t.Get="GET",t.Head="HEAD",t.Post="POST",t.Put="PUT",t.Delete="DELETE",t.Connect="CONNECT",t.Options="OPTIONS",t.Trace="TRACE",t.Patch="PATCH"}(s||(s={}));var f,l,d=Object.freeze({__proto__:null,StatusRange:c,get Status(){return a},get Method(){return s}});function h(t,e){return Array.from({length:e},((e,n)=>t(n)))}function p(t,e){const n=[];for(let r=0;r<t.length;r++)t[r]===e&&n.push(r);return n}function S(t,e){let n;if("size"in t?n="size":"length"in t&&(n="length"),!n)throw new RangeError("Expected a to have a size property or a length property");return t[n]<e[n]?[e,t]:[t,e]}function*k(...t){for(const e of t)yield*e}function m(t){const e=new Map;for(const n of t){const t=(e.get(n)??0)+1;e.set(n,t)}return e}function*g(t,e){for(let n=0;n<e;n++)yield t}t.Rank=void 0,(f=t.Rank||(t.Rank={}))[f.Ace=1]="Ace",f[f.Two=2]="Two",f[f.Three=3]="Three",f[f.Four=4]="Four",f[f.Five=5]="Five",f[f.Six=6]="Six",f[f.Seven=7]="Seven",f[f.Eight=8]="Eight",f[f.Nine=9]="Nine",f[f.Ten=10]="Ten",f[f.Jack=11]="Jack",f[f.Queen=12]="Queen",f[f.King=13]="King",t.Suit=void 0,(l=t.Suit||(t.Suit={}))[l.Clubs=0]="Clubs",l[l.Diamonds=1]="Diamonds",l[l.Hearts=2]="Hearts",l[l.Spades=3]="Spades";const R=[{rank:t.Rank.Ace,suit:t.Suit.Clubs},{rank:t.Rank.Two,suit:t.Suit.Clubs},{rank:t.Rank.Three,suit:t.Suit.Clubs},{rank:t.Rank.Four,suit:t.Suit.Clubs},{rank:t.Rank.Five,suit:t.Suit.Clubs},{rank:t.Rank.Six,suit:t.Suit.Clubs},{rank:t.Rank.Seven,suit:t.Suit.Clubs},{rank:t.Rank.Eight,suit:t.Suit.Clubs},{rank:t.Rank.Nine,suit:t.Suit.Clubs},{rank:t.Rank.Ten,suit:t.Suit.Clubs},{rank:t.Rank.Jack,suit:t.Suit.Clubs},{rank:t.Rank.Queen,suit:t.Suit.Clubs},{rank:t.Rank.King,suit:t.Suit.Clubs},{rank:t.Rank.Ace,suit:t.Suit.Diamonds},{rank:t.Rank.Two,suit:t.Suit.Diamonds},{rank:t.Rank.Three,suit:t.Suit.Diamonds},{rank:t.Rank.Four,suit:t.Suit.Diamonds},{rank:t.Rank.Five,suit:t.Suit.Diamonds},{rank:t.Rank.Six,suit:t.Suit.Diamonds},{rank:t.Rank.Seven,suit:t.Suit.Diamonds},{rank:t.Rank.Eight,suit:t.Suit.Diamonds},{rank:t.Rank.Nine,suit:t.Suit.Diamonds},{rank:t.Rank.Ten,suit:t.Suit.Diamonds},{rank:t.Rank.Jack,suit:t.Suit.Diamonds},{rank:t.Rank.Queen,suit:t.Suit.Diamonds},{rank:t.Rank.King,suit:t.Suit.Diamonds},{rank:t.Rank.Ace,suit:t.Suit.Hearts},{rank:t.Rank.Two,suit:t.Suit.Hearts},{rank:t.Rank.Three,suit:t.Suit.Hearts},{rank:t.Rank.Four,suit:t.Suit.Hearts},{rank:t.Rank.Five,suit:t.Suit.Hearts},{rank:t.Rank.Six,suit:t.Suit.Hearts},{rank:t.Rank.Seven,suit:t.Suit.Hearts},{rank:t.Rank.Eight,suit:t.Suit.Hearts},{rank:t.Rank.Nine,suit:t.Suit.Hearts},{rank:t.Rank.Ten,suit:t.Suit.Hearts},{rank:t.Rank.Jack,suit:t.Suit.Hearts},{rank:t.Rank.Queen,suit:t.Suit.Hearts},{rank:t.Rank.King,suit:t.Suit.Hearts},{rank:t.Rank.Ace,suit:t.Suit.Spades},{rank:t.Rank.Two,suit:t.Suit.Spades},{rank:t.Rank.Three,suit:t.Suit.Spades},{rank:t.Rank.Four,suit:t.Suit.Spades},{rank:t.Rank.Five,suit:t.Suit.Spades},{rank:t.Rank.Six,suit:t.Suit.Spades},{rank:t.Rank.Seven,suit:t.Suit.Spades},{rank:t.Rank.Eight,suit:t.Suit.Spades},{rank:t.Rank.Nine,suit:t.Suit.Spades},{rank:t.Rank.Ten,suit:t.Suit.Spades},{rank:t.Rank.Jack,suit:t.Suit.Spades},{rank:t.Rank.Queen,suit:t.Suit.Spades},{rank:t.Rank.King,suit:t.Suit.Spades}];class y extends Map{constructor(t,e){super(e),this.defaultValueOrDefaultValueFn=t,this.defaultValueIsFunction="function"==typeof t}get(t){return this.has(t)?super.get(t):this.defaultValueIsFunction?this.defaultValueOrDefaultValueFn(t):this.defaultValueOrDefaultValueFn}}const b=new WeakMap;function w(t){const e=t[0].map((t=>t.length));for(const n of t)for(const[t,{length:r}]of n.entries())e[t]<r&&(e[t]=r);return e}function T(t,e){if(Array.isArray(t)&&Array.isArray(e))return function(t,e){return t===e||t.length===e.length&&t.every(((t,n)=>t===e[n]))}(t,e);if(t instanceof Set&&e instanceof Set)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}(t,e);if(t instanceof Map&&e instanceof Map)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(const[n,r]of t.entries())if(!e.has(n)||e.get(n)!==r)return!1;return!0}(t,e);throw new RangeError("Expected both parameters to be an array, Set, or Map")}function v(t,e,n){return t<e?e:t>n?n:t}function E(t,e){return t+e}function A(t){const e=t.reduce(E);return e/("bigint"==typeof e?BigInt(t.length):t.length)}function C(t,e,n){return 1/(2.5066282746310002*e)*Math.E**(-.5*(t-n/e)**2)}function N(t,e){return Math.random()*(e-t)+t}function M(t,e=A(t)){return t.map((t=>(t-e)**2)).reduce(E)/(t.length-1)}function F(t,e=A(t)){return Math.sqrt(M(t,e))}const P=Symbol("delayResolvedValue");var x=Object.freeze({__proto__:null,and:function(t,e){return t&e},or:function(t,e){return t|e},xor:function(t,e){return t^e}});function O(t,e){return t<e?-1:t>e?1:0}function D(t,e){return t<e?1:t>e?-1:0}var H=Object.freeze({__proto__:null,ascending:function(t,e){return e===undefined&&"function"==typeof t?(e,n)=>O(t(e),t(n)):O(t,e)},descending:function(t,e){return e===undefined&&"function"==typeof t?(e,n)=>D(t(e),t(n)):D(t,e)}});const z=/\S/;t.AutoPercentage=class{constructor(){this._count=0}percentage(){return this._count++,{[Symbol.toPrimitive]:()=>1/this._count}}count(){return this._count++,{[Symbol.toPrimitive]:()=>this._count}}},t.Bitwise=x,t.DefaultMap=y,t.Http=d,t.Range=e,t.Sort=H,t.Stopwatch=class{static start(){const t=new this;return t.start(),t}get started(){return this.startTime!==undefined}start(){this.startTime=process.hrtime.bigint()}end(){return Number(process.hrtime.bigint()-this.startTime)/1e6}},t.allDuplicates=function(t){const e=new Set,n=[];for(const r of t)e.has(r)?n.push(r):e.add(r);return n},t.binarySearch=function(t,e){let n=0,r=t.length-1;for(;n<=r;){const i=Math.trunc((n+r)/2),o=e(t[i]);if(o<0)n=i+1;else{if(!(o>0))return t[i];r=i-1}}return undefined},t.capitalize=function(t){const e=t.charAt(0).toUpperCase();return`${e}${t.slice(e.length)}`},t.chunk=function(t,e){return t.length===e?t.map((t=>[t])):h((n=>t.slice(n*e,n*e+e)),Math.ceil(t.length/e))},t.clamp=v,t.combineIterables=k,t.count=function(t){let e=0;for(const n of t)e++;return e},t.cycle=function*(t,e){for(let n=0;n<e;n++)yield*t},t.difference=function(t,e){if(t===e)return new Set;const n=new Set(t);for(const t of e)n["delete"](t);return n},t.duplicates=function(t){const e=new Set,n=new Set;for(const r of t)e.has(r)?n.add(r):e.add(r);return n},t.enumHas=function(t,e){return b.has(t)||b.set(t,new Set(Object.values(t))),b.get(t).has(e)},t.every=function(t,e){for(const n of t)if(!e(n))return!1;return!0},t.fill=function(t,e){return Array.from({length:e},(()=>t))},t.find=function(t,e){for(const n of t)if(e(n))return n;return undefined},t.findIndexAll=function(t,e){const n=[];for(let r=0;r<t.length;r++)e(t[r],r)&&n.push(r);return n},t.first=function(t,e){if(e===undefined){for(const e of t)return e;return undefined}return function*(t,e){for(const n of t){if(!e--)break;yield n}}(t,e)},t.formatTable=function(t,e=" "){const n=w(t);return t.map((t=>t.map(((t,e)=>t.padEnd(n[e]))).join(e))).join("\n")},t.frequencyTable=m,t.holes=function(t){const e=[];for(let n=0;n<t.length;n++)n in t||e.push(n);return e},t.identical=T,t.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1},t.indexOfAll=p,t.intersection=function(t,e){if(t===e)return new Set(t);const n=new Set,[r,i]=S(t,e);for(const t of r)i.has(t)&&n.add(t);return n},t.invert=function(t){return(...e)=>-t(...e)},t.isAnagram=function(t,e){return t===e||t.length===e.length&&T(m(t),m(e))},t.isDisjoint=function(t,e){if(t===e)return!1;const n=t instanceof Set?t:new Set(t);for(const t of e)if(n.has(t))return!1;return!0},t.isEmpty=function(t){for(const e of t)return!1;return!0},t.isSorted=function(t,e){for(let n=0;n<t.length-1;n++)if(e(t[n],t[n+1])>0)return!1;return!0},t.isSubset=function(t,e){if(t===e)return!0;for(const n of t)if(!e.has(n))return!1;return!0},t.isSuperset=function(t,e){if(t===e)return!0;for(const n of e)if(!t.has(n))return!1;return!0},t.isWhitespace=function(t){return!z.test(t)},t.jaccardIndex=function(t,e){if(0===t.size&&0===e.size)return 1;let n=0;const[r,i]=S(t,e);for(const t of r)i.has(t)&&n++;return v(n/(t.size+e.size-n),0,1)},t.join=function(t,e=","){let n="";const r=t[Symbol.iterator]();let i=r.next();for(;;){const t=i;if(i=r.next(),n+=t.value,i.done)return n;n+=e}},t.largeToSmall=S,t.lines=function(t){return t.split("\n").map((t=>t.trim())).filter((t=>t.length>0))},t.mapFill=h,t.mapRepeat=function*(t,e){for(let n=0;n<e;n++)yield t(n)},t.max=function(t,e){return e>t?e:t},t.maxColumnLength=w,t.mean=A,t.median=function(t){const e=t.length%2==0,n=t.length/2;if(e){const e="bigint"==typeof t[0]?2n:2;return(t[n-1]+t[n])/e}return t[Math.floor(n)]},t.min=function(t,e){return e<t?e:t},t.mode=function(t){const e=new Map;let n=0,r=[];for(const i of t){const t=e.get(i),o=t===undefined?1:t+1;e.set(i,o),o>n?(n=o,r=[i]):o===n&&r.push(i)}return r},t.multiReplace=function(t,e){const n=Object.entries(e);let r="",i=0;for(;i<t.length;)t:{for(const[e,o]of n)if(t.slice(i).startsWith(e)){r+=o,i+=e.length;break t}r+=t[i++]}return r},t.name=function q(t,e){return e?`${q(t)}${e.name in t?".":"#"}${e.name}`:t.name},t.newDeck=function(){return[...R]},t.normaldist=C,t.not=function(t){return(...e)=>!t(...e)},t.nullish=function(t){return null===t||t===undefined},t.padEnd=function(t,e,n){t.push(...g(n,e-t.length))},t.padStart=function(t,e,n){t.unshift(...g(n,e-t.length))},t.partition=function(t,e){const n=[],r=[];let i=0;for(const o of t)(e(o,i++)?n:r).push(o);return[n,r]},t.product=function(t,e){return t*e},t.pull=function(t,e){const n=t.indexOf(e);return-1===n?[]:t.splice(n,1)},t.pullAll=function(t,e){const n=p(t,e);n.reverse();const r=[];for(const e of n)r.push(t.splice(e,1)[0]);return r},t.random=N,t.randomInt=function(t,e){return Math.floor(N(Math.ceil(t),Math.floor(e)))},t.regExpUnion=function(...t){return RegExp(t.map((t=>`(${t.source})`)).join("|"))},t.relativeStddev=function(t,e=A(t)){return F(t,e)/e},t.rename=function(t,e,n){if(e===n)return{...t};const{[e]:r,...i}={...t,[n]:t[e]};return i},t.repeat=g,t.replace=function(t,e,n){const r=t.indexOf(e);return-1!==r&&(t[r]=n),r},t.replaceAll=function(t,e,n){let r=0;for(let i=0;i<t.length;i++)t[i]===e&&(t[i]=n,r++);return r},t.same=function(...t){const e=t.map((t=>t[Symbol.iterator]()));for(;;){const t=e.map((t=>t.next())),[{done:n,value:r}]=t;for(const e of t){if(e.done)return t.every((t=>t.done===n));if(e.value!==r)return!1}}},t.sample=function(t){return t[Math.floor(Math.random()*t.length)]},t.settled=async function(t){try{return[await t,undefined]}catch(e){return[undefined,e]}},t.shuffle=function(t,e=!0){const n=e?t:[...t];for(let t=n.length-1;t>0;t--){const e=Math.floor(Math.random()*(t+1));[n[t],n[e]]=[n[e],n[t]]}if(!e)return n},t.some=function(t,e){for(const n of t)if(e(n))return!0;return!1},t.sortObject=function(t,e){return Object.entries(t).sort((([,t],[,n])=>e(t,n)))},t.standardNormaldist=function(t){return C(t,1,0)},t.stddev=F,t.sum=E,t.symmetricDifference=function(t,e){if(t===e)return new Set;const n=new Set(t);for(const t of e)n.has(t)?n["delete"](t):n.add(t);return n},t.thunkify=function(t){let e,n=!1;return(...r)=>(n||(n=!0,e=t(...r)),e)},t.timeout=async function(t,e){const[n,r]=function(t){let e;const n=new Promise((n=>{e=setTimeout((()=>{n(P)}),t)}));return[e,n]}(e),i=await Promise.race([t,r])["finally"]((()=>{clearTimeout(n)}));if(i===P)throw Error("Timed out");return i},t.toDigits=function(t,e){const n=10**e;return Math.round(t*n*(1+Number.EPSILON))/n},t.truncate=function(t,e,n=""){return t.length>e?`${t.slice(0,e)}${n}`:t},t.uncapitalize=function(t){const e=t.charAt(0).toLowerCase();return`${e}${t.slice(e.length)}`},t.union=function(t,e){return t===e?new Set(t):new Set(k(t,e))},t.variance=M,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jonahsniderUtil={});
//# sourceMappingURL=index.prod.js.map
{
"name": "@jonahsnider/util",
"version": "8.5.2",
"version": "8.6.0",
"description": "A useful collection of optimized utility functions",

@@ -5,0 +5,0 @@ "homepage": "https://util.jonah.pw/",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc