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

absurdum

Package Overview
Dependencies
Maintainers
1
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

absurdum - npm Package Compare versions

Comparing version 0.81.6 to 0.81.7

2

index.min.js

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

var e=Object.freeze({__proto__:null,chunk:function(e,t=1){let r=[];return e.reduce((e,n,u,c)=>(r.push(n),r.length===t&&(e.push(r),r=[]),r.length>0&&u===c.length-1&&e.push(r),e),[])},compact:function(e){return e.reduce((e,t)=>(t&&e.push(t),e),[])},difference:function(e,t){const r=new Set(t);return e.reduce((e,t)=>(r.has(t)||e.push(t),e),[])},drop:function(e,t=1){return e.reduce((e,r)=>t>0?(t--,e):(e.push(r),e),[])},dropRight:function(e,t=1){return e.reduce((e,r,n,u)=>t>0?(t--,e):(e.unshift(u[u.length-n-1]),e),[])},every:function(e,t,r){if(0===e.length)return!1;if(null==this)throw TypeError('"this" is null or not defined');if("function"!=typeof t)throw TypeError("predicate must be a function");return!!t.call(r,e[0])&&(1===e.length||e.reduce((e,n,u)=>1===u?t.call(r,n):!(!e||!t.call(r,n))))},fill:function(e,t,r=0,n=null){return null===n&&(n=e.length-1),e.reduce((e,u,c,i)=>(c>=r&&c<=n?e.push(t):e.push(u),e),[])},filter:function(e,t){return e.reduce((e,r)=>(t(r)&&e.push(r),e),[])},find:function(e,t,r){if(0!==e.length){if(null==this)throw TypeError('"this" is null or not defined');if("function"!=typeof t)throw TypeError("predicate must be a function");if(t.call(r,e[0]))return e[0];if(1!==e.length)return e.reduce((e,n,u)=>1===u?t.call(r,n)?n:void 0:!e&&t.call(r,n)?n:e)}},findIndex:function(e,t,r){if(0===e.length)return-1;if(null==this)throw TypeError('"this" is null or not defined');if("function"!=typeof t)throw TypeError("predicate must be a function");return e.reduce((e,n,u)=>e<0&&t.call(r,n)?u:e,-1)},findLastIndex:function(e,t,r){if(0===e.length)return-1;if(null==this)throw TypeError('"this" is null or not defined');if("function"!=typeof t)throw TypeError("predicate must be a function");return t.call(r,e[e.length-1])?e.length-1:1===e.length?-1:e.reduceRight((n,u,c)=>c===e.length-2?t.call(r,u)?c:-1:n<0&&t.call(r,u)?c:n)},flat:function e(t,r=1){return t.reduce((t,n)=>(Array.isArray(n)&&r>0?t.push(...e(n,r-1)):t.push(n),t),[])},frequency:function(e){return e.reduce((e,t)=>(e[t]=e[t]?++e[t]:1,e),{})},intersection:function(...e){return[...new Set(arguments[0])].reduce((t,r,n)=>(e.slice(1).reduce((e,t,n)=>!(e&&!new Set(t).has(r))&&e,!0)&&t.push(r),t),[])},map:function(e,t){return e.reduce((e,r)=>(e.push(t(r)),e),[])},pull:function(e,...t){const r=new Set(t);return e.reduce((e,t)=>(r.has(t)||e.push(t),e),[])},some:function(e,t,r){if(0===e.length)return!1;if(null==this)throw TypeError('"this" is null or not defined');if("function"!=typeof t)throw TypeError("predicate must be a function");return!!t.call(r,e[0])||(1===e.length||e.slice(0).reduce((e,n,u,c)=>!0===e?(c.splice(0),!0):1===u?t.call(r,n):!!t.call(r,n)))},takeRight:function(e,t=1){const r=e.length-1-t;return e.reduce((e,t,n)=>(n>r&&e.push(t),e),[])},take:function(e,t=1){return e.reduce((e,r,n)=>(n<t&&e.push(r),e),[])},union:function(...e){return Array.from([...e].reduce((e,t,r)=>(Array.isArray(t)&&t.reduce((t,r)=>(e.add(r),t),""),e),new Set))},unique:function(e){return[...e.reduce((e,t,r,n)=>(e.add(t),e),new Set)]},unzip:function(e){const t=new Array(e.reduce((e,t)=>t.length>e?t.length:e,0)).fill(void 0);return e.reduce((r,n,u)=>(t.reduce((t,n,c)=>(r[c]=r[c]||[],r[c].push(e[u][c]),t),!0),r),[])},without:function(e,...t){const r=new Set(t);return e.reduce((e,t)=>(r.has(t)||e.push(t),e),[])},xor:function(...e){if(e.length<2)return 0===e.length?[]:e[0];const t=new Set,r=e.reduce((e,r)=>(r.reduce((t,r)=>(e.has(r)&&t.push(r),t),[]).forEach(e=>t.add(e)),r.forEach(t=>e.add(t)),e),new Set);return t.forEach(e=>r.delete(e)),[...r]},zip:function(e,t,r=((e,t)=>[e,t])){if(r&&"function"!=typeof r)throw TypeError("predicate must be a function");return e.length<=t.length?e.reduce((e,n,u)=>(e[u]=r(n,t[u]),e),[]):t.reduce((t,n,u)=>(t[u]=r(e[u],n),t),[])}});const t=/[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff\u1ab0-\u1aff\u1dc0-\u1dff]/g,r="ÀÁÂÃÄÅàáâãäåÇçÐðÈÉÊËèéêëÌÍÎÏìíîïÑñÒÓÔÕÖØòóôõöøÙÚÛÜùúûüÝýÿÆæÞþßĀĂĄāăąĆĈĊČćĉċčĎĐďđĒĔĖĘĚēĕėęěĜĞĠĢĝğġģĤĦĥħĨĪĬĮİĩīĭįıĴĵĶķĸĹĻĽĿŁĺļľŀłŃŅŇŊńņňŋŌŎŐōŏőŔŖŘŕŗřŚŜŞŠśŝşšŢŤŦţťŧŨŪŬŮŰŲũūŭůűųŴŵŶŷŸŹŻŽźżžIJijŒœʼnſ",n=new RegExp("["+r+"]|[^"+r+"]+","g"),u={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"};const c="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",i=`[${c}]`,o="[\\u2700-\\u27bf]",f="[a-z\\xdf-\\xf6\\xf8-\\xff]",l=`[^\\ud800-\\udfff${c+"\\d\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde"}]`,s="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",a="[A-Z\\xc0-\\xd6\\xd8-\\xde]",p=`(?:${f}|${l})`,h=`(?:${a}|${l})`,y="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff]|\\ud83c[\\udffb-\\udfff])?",g="[\\ufe0e\\ufe0f]?"+y+`(?:\\u200d(?:${["[^\\ud800-\\udfff]",s,d].join("|")})${"[\\ufe0e\\ufe0f]?"+y})*`,b=`(?:${[o,s,d].join("|")})${g}`,O=RegExp([`${a}?${f}+(?:['’](?:d|ll|m|re|s|t|ve))?(?=${[i,a,"$"].join("|")})`,`${h}+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=${[i,a+p,"$"].join("|")})`,`${a}?${p}+(?:['’](?:d|ll|m|re|s|t|ve))?`,`${a}+(?:['’](?:D|LL|M|RE|S|T|VE))?`,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",b].join("|"),"g");var j=Object.freeze({__proto__:null,camelCase:function(e=""){let t=!0;return e.replace(/[\u2019']/,"").split(/[\u002D\u2014\-_\s]+/).reduce((e,r)=>(t&&r.length>0?(r=r.toLowerCase(),t=!1):r=r.charAt(0).toUpperCase()+r.slice(1).toLowerCase(),e+r),"")},chomp:function(e,t){const r=e.split("");let n=!1;if(void 0===t)return r.reduceRight((e,t,u)=>{if(u===r.length-1){if("\n"===t)return n=!0,e;if("\r"===t)return e}else if(n&&u===r.length-2&&"\r"===t)return e;return t+e},"");if(""===t){let e=!0;return r.reduceRight((t,r,u)=>{if(e&&n&&"\r"===r)return n=!1,t;if(e){if("\n"===r)return n=!0,t;if("\r"===r)return e=!1,r+t}return r+t},"")}{const e=r.length-t.length;let n=!0,u="";return r.reduce((c,i,o)=>o>=e?(u+=i,i!==t[o-e]&&(n=!1),o===r.length-1?n?c:c+u:c):c+i,"")}},deburr:function(e){let r="";const c=e.match(n);return r=c?c.reduce((e,t)=>1===t.length&&Object.prototype.hasOwnProperty.call(u,t)?e+u[t]:e+t,""):e,r.replace(t,"")},endsWith:function(e,t=""){return e.split("").reduce((e,r,n,u)=>u[u.length-n-1]!==t[t.length-n-1]?(u=u.splice(0),!1):n===t.length-1?(u=u.splice(0),!0):e,null)},includes:function(e,t,r=0){if(0===e.length)return!1;const n=t.length,u=t.charAt(0);return 0===r&&e.substring(0,n)===t||e.split("").reduce((c,i,o)=>{if(o>=r){if(c)return c;if(i===u)return e.substring(o,o+n)===t}return!1},!1)},kebabCase:function(e=""){let t=!0;return e.replace(/[\u2019']/,"").split(/[\u002D\u2014\-_\s]+/).reduce((e,r)=>r.length>0?t?(t=!1,r.toLowerCase()):e+"-"+r.toLowerCase():e,"")},pad:function(e,t,r=" "){const n=e.length,u=t-n>0?Math.ceil((t-n)/2):0;return e.padStart(t-u,r).padEnd(t,r)},padEnd:function(e,t,r=" "){let n=e.length;const u=t-e.length>0?t-e.length:0;let c=0;return[...e,...Array(u)].reduce((e,t,u,i)=>0!==n?(e.push(t),n--,e):(e.push(r[c]),c=c+1<r.length?c+1:0,e),[]).join("")},padStart:function(e,t,r=" "){let n=t-e.length>0?t-e.length:0,u=0;return[...Array(n),...e].reduce((e,t,c,i)=>0!==n?(e.push(r[u]),u=u+1<r.length?u+1:0,n--,e):(e.push(t),e),[]).join("")},pascalCase:function(e=""){return e.replace(/[\u2019']/,"").split(/[\u002D\u2014\-_\s]+/).reduce((e,t)=>e+t.charAt(0).toUpperCase()+t.slice(1).toLowerCase(),"")},repeat:function(e,t){return 0===e.length||t<0?"":new Array(t).fill("").reduce(t=>t+e,"")},reverse:function(e){return e.split("").reduce((e,t)=>t+e,"")},snakeCase:function(e=""){let t=!0;return e.replace(/[\u2019']/,"").split(/[\u002D\u2014\-_\s]+/).reduce((e,r)=>r.length>0?t?(t=!1,r.toLowerCase()):e+"_"+r.toLowerCase():e,"")},startsWith:function(e,t){let r=e.split("");return r.reduce((e,n,u,c)=>n!==t[u]?(r=c.splice(0),!1):u===t.length-1?(r=c.splice(0),!0):e,null)},trimStart:function(e="",t=" "){const r=new Set([...t]);let n=!0;return[...e].reduce((e,t)=>n?r.has(t)?e:(n=!1,e+t):e+t,"")},trimEnd:function(e="",t=" "){const r=new Set([...t]);let n=!0;return[...e].reduceRight((e,t)=>n?r.has(t)?e:(n=!1,t+e):t+e,"")},truncate:function(e="",t){let r,n=30,u="...";if(t&&(void 0!==t.length&&(n=t.length),void 0!==t.omission&&(u=t.omission),void 0!==t.separator&&(r=t.separator)),n>=e.length)return e;const c=n-u.length;if(c<1)return u;let i,o,f=e.slice(0,c);if(void 0===r)return f+u;if("string"==typeof r?i=r:o=r,o){if(e.slice(c).search(o)){let e,t;const r=f;for(o.global||(o=RegExp(o.source,o.flags+"g")),o.lastIndex=0,e=o.exec(r);e;)t=e.index,e=o.exec(r);f=f.slice(0,void 0===t?c:t)}}else if(e.indexOf(i,c)!==c){const e=f.lastIndexOf(i);e>-1&&(f=f.slice(0,e))}return f+u},words:function(e,t){return void 0===t?e.match(O)||[]:"string"==typeof t?e.match(new RegExp("[^"+t+"]+","g"))||[]:e.match(t)||[]}});const w=(e,t)=>Array.isArray(t)?Array.isArray(e)?v(e,t):e:A(e,t),v=(e,t)=>{const r=[...e];return t.reduce((t,n,u)=>(void 0===e[u]?r[u]=n:"object"==typeof n&&(r[u]=w(e[u],n)),null),null),r},A=(e,t)=>{const r={};return"object"!=typeof e?e:(Object.entries(e).reduce((e,[t,n])=>(void 0===r[t]&&(r[t]=n),null),null),Object.entries(t).reduce((t,[n,u])=>("object"==typeof u&&e[n]?r[n]=w(e[n],u):void 0===r[n]&&(r[n]=u),null),null),r)};const x=(e,t)=>typeof e==typeof t&&("object"!=typeof e?e===t:Object.keys(t).reduce((r,n)=>{if(r)return r;if(Object.prototype.hasOwnProperty.call(e,n)!==Object.prototype.hasOwnProperty.call(t,n))return!1;if("object"==typeof e[n]){if(!x(e[n],t[n]))return!1}else if("function"==typeof e[n]){if(void 0===t[n]||String(e[n])!==String(t[n]))return!1}else if(e[n]!==t[n])return!1;return!0},!1));const E=(e,t)=>typeof e==typeof t&&("object"!=typeof e?e===t:Object.keys(t).reduceRight((r,n)=>{if(r)return r;if(Object.prototype.hasOwnProperty.call(e,n)!==Object.prototype.hasOwnProperty.call(t,n))return!1;if("object"==typeof e[n]){if(!E(e[n],t[n]))return!1}else if("function"==typeof e[n]){if(void 0===t[n]||String(e[n])!==String(t[n]))return!1}else if(e[n]!==t[n])return!1;return!0},!1));const S=(e,t)=>Array.isArray(t)?Array.isArray(e)?m(e,t):t:$(e,t),m=(e,t)=>{const r=e.slice();return t.reduce((t,n,u)=>{void 0===r[u]?r[u]=n:"object"==typeof n?r[u]=S(e[u],n):-1===e.indexOf(n)&&r.push(n)},!0),r},$=(e,t)=>{const r={};return"object"==typeof e&&Object.entries(e).reduce((e,t)=>(r[t[0]]=t[1],null),null),Object.entries(t).reduce((t,n)=>("object"==typeof n[1]&&e[n[0]]?r[n[0]]=S(e[n[0]],n[1]):r[n[0]]=n[1],null),null),r};var R=Object.freeze({__proto__:null,assign:function(e,...t){if(arguments.length<2)return 1===arguments.length?e:{};const r=[e,...t];return r.reduce((e,t)=>(Object.keys(t).reduce((r,n)=>(e[n]=t[n],null),null),e),{})},at:function(e,...t){if(0===t.length)return[];const r=[],n=e=>{e.reduce((e,t,n)=>{r[n]=String(t).replace(/\[(\w+)\]/g,".$1").split(".")},!0)};return Array.isArray(t[0])?n(t[0]):n(t),r.reduce((t,r)=>{const n=r.reduce((e,t)=>{if(void 0!==e)return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0},e);return t.push(n),t},[])},defaults:function(e,...t){if(arguments.length<2)return 1===arguments.length?e:{};const r=[e,...t];return r.reduce((e,t)=>(Object.keys(t).reduce((r,n)=>(void 0===e[n]&&(e[n]=t[n]),null),null),e),{})},defaultsDeep:function(e,...t){if(arguments.length<2)return 1===arguments.length?e:{};const r=[e,...t];return r.reduce((e,t)=>w(e,t))},entries:function(e){return Object.keys(e).reduce((t,r)=>(t.push([r,e[r]]),t),[])},filter:function(e,t){return"function"!=typeof t?e:Object.keys(e).reduce((r,n)=>(!0===t(e[n],n,e)&&(r[n]=e[n]),r),{})},findKey:function(e,t=(e=>e),r){const n=Object.keys(e);return"function"==typeof t?n.reduce((n,u)=>n||(t.call(r,e[u])?u:n),void 0):Array.isArray(t)?n.reduce((r,n)=>r||(e[n][t[0]]===t[1]?n:r),void 0):"object"==typeof t?n.reduce((r,n)=>r||(x(e[n],t)?n:r),void 0):n.reduce((r,n)=>r||(e[n][t]?n:r),void 0)},findLastKey:function(e,t=(e=>e),r){const n=Object.keys(e);return"function"==typeof t?n.reduceRight((n,u)=>n||(t.call(r,e[u])?u:n),void 0):Array.isArray(t)?n.reduceRight((r,n)=>r||(e[n][t[0]]===t[1]?n:r),void 0):"object"==typeof t?n.reduceRight((r,n)=>r||(E(e[n],t)?n:r),void 0):n.reduceRight((r,n)=>r||(e[n][t]?n:r),void 0)},forIn:function(e,t){const r=Object.entries(e),n=Object.getPrototypeOf(e),u=n?Object.entries(n):[];return[...new Set([...r,...u])].reduce((r,[n,u])=>(t(u,n,e),null),null),e},fromEntries:function(e){return e.reduce((e,t)=>(e[t[0]]=t[1],e),{})},has:function(e,t){if(void 0===t)return!1;let r;return r=Array.isArray(t)?t:String(t).replace(/\[(\w+)\]/g,".$1").split("."),void 0!==r.reduce((e,t)=>{if(void 0!==e)return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0},e)},get:function(e,t,r){if(void 0===t)return;let n;n=Array.isArray(t)?t:String(t).replace(/\[(\w+)\]/g,".$1").split(".");const u=n.reduce((e,t)=>{if(void 0!==e)return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0},e);return void 0!==u?u:r},invert:function(e){return Object.entries(e).reduce((e,t)=>(e[t[1]]=t[0],e),{})},mapKeys:function(e,t){return"function"!=typeof t?e:Object.entries(e).reduce((r,[n,u])=>({...r,[t(u,n,e)]:u}),{})},mapValues:function(e,t){return"function"!=typeof t?e:Object.entries(e).reduce((r,[n,u])=>({...r,[n]:t(u,n,e)}),{})},merge:function(e,...t){if(arguments.length<2)return 1===arguments.length?e:{};const r=[e,...t];return r.reduce((e,t)=>S(e,t))},pick:function(e,...t){if(0===t.length)return{};const r=new Set;return Array.isArray(t[0])?t[0].forEach(e=>r.add(String(e))):t.forEach(e=>r.add(String(e))),Object.keys(e).reduce((t,n)=>(r.has(n)&&(t[n]=e[n]),t),{})},result:function(e,t,r){if(void 0===t)return;let n;n=Array.isArray(t)?t:String(t).replace(/\[(\w+)\]/g,".$1").split(".");const u=n.reduce((e,t)=>{if(void 0!==e)return Object.prototype.hasOwnProperty.call(e,t)?"function"==typeof e[t]?e[t]():e[t]:void 0},e);return void 0!==u?u:"function"==typeof r?r():r},transform:function(e,t,r={}){return void 0===t?e:Object.entries(e).reduce((r,[n,u])=>(t(r,u,n,e),r),r)},values:function(e){return Object.values(e)}});export{e as arrays,R as objects,j as strings};
var e=Object.freeze({__proto__:null,chunk:function(e,t=1){let r=[];return e.reduce((e,n,u,c)=>(r.push(n),r.length===t&&(e.push(r),r=[]),r.length>0&&u===c.length-1&&e.push(r),e),[])},compact:function(e){return e.reduce((e,t)=>(t&&e.push(t),e),[])},difference:function(e,t){const r=new Set(t);return e.reduce((e,t)=>(r.has(t)||e.push(t),e),[])},drop:function(e,t=1){return e.reduce((e,r)=>t>0?(t--,e):(e.push(r),e),[])},dropRight:function(e,t=1){return e.reduce((e,r,n,u)=>t>0?(t--,e):(e.unshift(u[u.length-n-1]),e),[])},every:function(e,t,r){if(0===e.length)return!1;if(null==this)throw TypeError('"this" is null or not defined');if("function"!=typeof t)throw TypeError("predicate must be a function");return!!t.call(r,e[0])&&(1===e.length||e.reduce((e,n,u)=>1===u?t.call(r,n):!(!e||!t.call(r,n))))},fill:function(e,t,r=0,n=null){return null===n&&(n=e.length-1),e.reduce((e,u,c,i)=>(c>=r&&c<=n?e.push(t):e.push(u),e),[])},filter:function(e,t){return e.reduce((e,r)=>(t(r)&&e.push(r),e),[])},find:function(e,t,r){if(0!==e.length){if(null==this)throw TypeError('"this" is null or not defined');if("function"!=typeof t)throw TypeError("predicate must be a function");if(t.call(r,e[0]))return e[0];if(1!==e.length)return e.reduce((e,n,u)=>1===u?t.call(r,n)?n:void 0:!e&&t.call(r,n)?n:e)}},findIndex:function(e,t,r){if(0===e.length)return-1;if(null==this)throw TypeError('"this" is null or not defined');if("function"!=typeof t)throw TypeError("predicate must be a function");return e.reduce((e,n,u)=>e<0&&t.call(r,n)?u:e,-1)},findLastIndex:function(e,t,r){if(0===e.length)return-1;if(null==this)throw TypeError('"this" is null or not defined');if("function"!=typeof t)throw TypeError("predicate must be a function");return t.call(r,e[e.length-1])?e.length-1:1===e.length?-1:e.reduceRight((n,u,c)=>c===e.length-2?t.call(r,u)?c:-1:n<0&&t.call(r,u)?c:n)},flat:function e(t,r=1){return t.reduce((t,n)=>(Array.isArray(n)&&r>0?t.push(...e(n,r-1)):t.push(n),t),[])},frequency:function(e){return e.reduce((e,t)=>(e[t]=e[t]?++e[t]:1,e),{})},intersection:function(...e){return[...new Set(arguments[0])].reduce((t,r,n)=>(e.slice(1).reduce((e,t,n)=>!(e&&!new Set(t).has(r))&&e,!0)&&t.push(r),t),[])},map:function(e,t){return e.reduce((e,r)=>(e.push(t(r)),e),[])},pull:function(e,...t){const r=new Set(t);return e.reduce((e,t)=>(r.has(t)||e.push(t),e),[])},takeRight:function(e,t=1){const r=e.length-1-t;return e.reduce((e,t,n)=>(n>r&&e.push(t),e),[])},take:function(e,t=1){return e.reduce((e,r,n)=>(n<t&&e.push(r),e),[])},union:function(...e){return Array.from([...e].reduce((e,t,r)=>(Array.isArray(t)&&t.reduce((t,r)=>(e.add(r),t),""),e),new Set))},unique:function(e){return[...e.reduce((e,t,r,n)=>(e.add(t),e),new Set)]},unzip:function(e){const t=new Array(e.reduce((e,t)=>t.length>e?t.length:e,0)).fill(void 0);return e.reduce((r,n,u)=>(t.reduce((t,n,c)=>(r[c]=r[c]||[],r[c].push(e[u][c]),t),!0),r),[])},without:function(e,...t){const r=new Set(t);return e.reduce((e,t)=>(r.has(t)||e.push(t),e),[])},xor:function(...e){if(e.length<2)return 0===e.length?[]:e[0];const t=new Set,r=e.reduce((e,r)=>(r.reduce((t,r)=>(e.has(r)&&t.push(r),t),[]).forEach(e=>t.add(e)),r.forEach(t=>e.add(t)),e),new Set);return t.forEach(e=>r.delete(e)),[...r]},zip:function(e,t,r=((e,t)=>[e,t])){if(r&&"function"!=typeof r)throw TypeError("predicate must be a function");return e.length<=t.length?e.reduce((e,n,u)=>(e[u]=r(n,t[u]),e),[]):t.reduce((t,n,u)=>(t[u]=r(e[u],n),t),[])}});const t=/[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff\u1ab0-\u1aff\u1dc0-\u1dff]/g,r="ÀÁÂÃÄÅàáâãäåÇçÐðÈÉÊËèéêëÌÍÎÏìíîïÑñÒÓÔÕÖØòóôõöøÙÚÛÜùúûüÝýÿÆæÞþßĀĂĄāăąĆĈĊČćĉċčĎĐďđĒĔĖĘĚēĕėęěĜĞĠĢĝğġģĤĦĥħĨĪĬĮİĩīĭįıĴĵĶķĸĹĻĽĿŁĺļľŀłŃŅŇŊńņňŋŌŎŐōŏőŔŖŘŕŗřŚŜŞŠśŝşšŢŤŦţťŧŨŪŬŮŰŲũūŭůűųŴŵŶŷŸŹŻŽźżžIJijŒœʼnſ",n=new RegExp("["+r+"]|[^"+r+"]+","g"),u={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"};const c="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",i=`[${c}]`,o="[\\u2700-\\u27bf]",f="[a-z\\xdf-\\xf6\\xf8-\\xff]",l=`[^\\ud800-\\udfff${c+"\\d\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde"}]`,s="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",a="[A-Z\\xc0-\\xd6\\xd8-\\xde]",p=`(?:${f}|${l})`,h=`(?:${a}|${l})`,g="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff]|\\ud83c[\\udffb-\\udfff])?",y="[\\ufe0e\\ufe0f]?"+g+`(?:\\u200d(?:${["[^\\ud800-\\udfff]",s,d].join("|")})${"[\\ufe0e\\ufe0f]?"+g})*`,b=`(?:${[o,s,d].join("|")})${y}`,O=RegExp([`${a}?${f}+(?:['’](?:d|ll|m|re|s|t|ve))?(?=${[i,a,"$"].join("|")})`,`${h}+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=${[i,a+p,"$"].join("|")})`,`${a}?${p}+(?:['’](?:d|ll|m|re|s|t|ve))?`,`${a}+(?:['’](?:D|LL|M|RE|S|T|VE))?`,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",b].join("|"),"g");var j=Object.freeze({__proto__:null,camelCase:function(e=""){let t=!0;return e.replace(/[\u2019']/,"").split(/[\u002D\u2014\-_\s]+/).reduce((e,r)=>(t&&r.length>0?(r=r.toLowerCase(),t=!1):r=r.charAt(0).toUpperCase()+r.slice(1).toLowerCase(),e+r),"")},chomp:function(e,t){const r=e.split("");let n=!1;if(void 0===t)return r.reduceRight((e,t,u)=>{if(u===r.length-1){if("\n"===t)return n=!0,e;if("\r"===t)return e}else if(n&&u===r.length-2&&"\r"===t)return e;return t+e},"");if(""===t){let e=!0;return r.reduceRight((t,r,u)=>{if(e&&n&&"\r"===r)return n=!1,t;if(e){if("\n"===r)return n=!0,t;if("\r"===r)return e=!1,r+t}return r+t},"")}{const e=r.length-t.length;let n=!0,u="";return r.reduce((c,i,o)=>o>=e?(u+=i,i!==t[o-e]&&(n=!1),o===r.length-1?n?c:c+u:c):c+i,"")}},deburr:function(e){let r="";const c=e.match(n);return r=c?c.reduce((e,t)=>1===t.length&&Object.prototype.hasOwnProperty.call(u,t)?e+u[t]:e+t,""):e,r.replace(t,"")},endsWith:function(e,t=""){return e.split("").reduce((e,r,n,u)=>u[u.length-n-1]!==t[t.length-n-1]?(u=u.splice(0),!1):n===t.length-1?(u=u.splice(0),!0):e,null)},includes:function(e,t,r=0){if(0===e.length)return!1;const n=t.length,u=t.charAt(0);return 0===r&&e.substring(0,n)===t||e.split("").reduce((c,i,o)=>{if(o>=r){if(c)return c;if(i===u)return e.substring(o,o+n)===t}return!1},!1)},kebabCase:function(e=""){let t=!0;return e.replace(/[\u2019']/,"").split(/[\u002D\u2014\-_\s]+/).reduce((e,r)=>r.length>0?t?(t=!1,r.toLowerCase()):e+"-"+r.toLowerCase():e,"")},pad:function(e,t,r=" "){const n=e.length,u=t-n>0?Math.ceil((t-n)/2):0;return e.padStart(t-u,r).padEnd(t,r)},padEnd:function(e,t,r=" "){let n=e.length;const u=t-e.length>0?t-e.length:0;let c=0;return[...e,...Array(u)].reduce((e,t,u,i)=>0!==n?(e.push(t),n--,e):(e.push(r[c]),c=c+1<r.length?c+1:0,e),[]).join("")},padStart:function(e,t,r=" "){let n=t-e.length>0?t-e.length:0,u=0;return[...Array(n),...e].reduce((e,t,c,i)=>0!==n?(e.push(r[u]),u=u+1<r.length?u+1:0,n--,e):(e.push(t),e),[]).join("")},pascalCase:function(e=""){return e.replace(/[\u2019']/,"").split(/[\u002D\u2014\-_\s]+/).reduce((e,t)=>e+t.charAt(0).toUpperCase()+t.slice(1).toLowerCase(),"")},repeat:function(e,t){return 0===e.length||t<0?"":new Array(t).fill("").reduce(t=>t+e,"")},reverse:function(e){return e.split("").reduce((e,t)=>t+e,"")},snakeCase:function(e=""){let t=!0;return e.replace(/[\u2019']/,"").split(/[\u002D\u2014\-_\s]+/).reduce((e,r)=>r.length>0?t?(t=!1,r.toLowerCase()):e+"_"+r.toLowerCase():e,"")},startsWith:function(e,t){let r=e.split("");return r.reduce((e,n,u,c)=>n!==t[u]?(r=c.splice(0),!1):u===t.length-1?(r=c.splice(0),!0):e,null)},trimStart:function(e="",t=" "){const r=new Set([...t]);let n=!0;return[...e].reduce((e,t)=>n?r.has(t)?e:(n=!1,e+t):e+t,"")},trimEnd:function(e="",t=" "){const r=new Set([...t]);let n=!0;return[...e].reduceRight((e,t)=>n?r.has(t)?e:(n=!1,t+e):t+e,"")},truncate:function(e="",t){let r,n=30,u="...";if(t&&(void 0!==t.length&&(n=t.length),void 0!==t.omission&&(u=t.omission),void 0!==t.separator&&(r=t.separator)),n>=e.length)return e;const c=n-u.length;if(c<1)return u;let i,o,f=e.slice(0,c);if(void 0===r)return f+u;if("string"==typeof r?i=r:o=r,o){if(e.slice(c).search(o)){let e,t;const r=f;for(o.global||(o=RegExp(o.source,o.flags+"g")),o.lastIndex=0,e=o.exec(r);e;)t=e.index,e=o.exec(r);f=f.slice(0,void 0===t?c:t)}}else if(e.indexOf(i,c)!==c){const e=f.lastIndexOf(i);e>-1&&(f=f.slice(0,e))}return f+u},words:function(e,t){return void 0===t?e.match(O)||[]:"string"==typeof t?e.match(new RegExp("[^"+t+"]+","g"))||[]:e.match(t)||[]}});const v=(e,t)=>Array.isArray(t)?Array.isArray(e)?w(e,t):e:A(e,t),w=(e,t)=>{const r=[...e];return t.reduce((t,n,u)=>(void 0===e[u]?r[u]=n:"object"==typeof n&&(r[u]=v(e[u],n)),null),null),r},A=(e,t)=>{const r={};return"object"!=typeof e?e:(Object.entries(e).reduce((e,[t,n])=>(void 0===r[t]&&(r[t]=n),null),null),Object.entries(t).reduce((t,[n,u])=>("object"==typeof u&&e[n]?r[n]=v(e[n],u):void 0===r[n]&&(r[n]=u),null),null),r)};const x=(e,t)=>typeof e==typeof t&&("object"!=typeof e?e===t:Object.keys(t).reduce((r,n)=>{if(r)return r;if(Object.prototype.hasOwnProperty.call(e,n)!==Object.prototype.hasOwnProperty.call(t,n))return!1;if("object"==typeof e[n]){if(!x(e[n],t[n]))return!1}else if("function"==typeof e[n]){if(void 0===t[n]||String(e[n])!==String(t[n]))return!1}else if(e[n]!==t[n])return!1;return!0},!1));const E=(e,t)=>typeof e==typeof t&&("object"!=typeof e?e===t:Object.keys(t).reduceRight((r,n)=>{if(r)return r;if(Object.prototype.hasOwnProperty.call(e,n)!==Object.prototype.hasOwnProperty.call(t,n))return!1;if("object"==typeof e[n]){if(!E(e[n],t[n]))return!1}else if("function"==typeof e[n]){if(void 0===t[n]||String(e[n])!==String(t[n]))return!1}else if(e[n]!==t[n])return!1;return!0},!1));const S=(e,t)=>Array.isArray(t)?Array.isArray(e)?m(e,t):t:$(e,t),m=(e,t)=>{const r=e.slice();return t.reduce((t,n,u)=>{void 0===r[u]?r[u]=n:"object"==typeof n?r[u]=S(e[u],n):-1===e.indexOf(n)&&r.push(n)},!0),r},$=(e,t)=>{const r={};return"object"==typeof e&&Object.entries(e).reduce((e,t)=>(r[t[0]]=t[1],null),null),Object.entries(t).reduce((t,n)=>("object"==typeof n[1]&&e[n[0]]?r[n[0]]=S(e[n[0]],n[1]):r[n[0]]=n[1],null),null),r};var R=Object.freeze({__proto__:null,assign:function(e,...t){if(arguments.length<2)return 1===arguments.length?e:{};const r=[e,...t];return r.reduce((e,t)=>(Object.keys(t).reduce((r,n)=>(e[n]=t[n],null),null),e),{})},at:function(e,...t){if(0===t.length)return[];const r=[],n=e=>{e.reduce((e,t,n)=>{r[n]=String(t).replace(/\[(\w+)\]/g,".$1").split(".")},!0)};return Array.isArray(t[0])?n(t[0]):n(t),r.reduce((t,r)=>{const n=r.reduce((e,t)=>{if(void 0!==e)return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0},e);return t.push(n),t},[])},defaults:function(e,...t){if(arguments.length<2)return 1===arguments.length?e:{};const r=[e,...t];return r.reduce((e,t)=>(Object.keys(t).reduce((r,n)=>(void 0===e[n]&&(e[n]=t[n]),null),null),e),{})},defaultsDeep:function(e,...t){if(arguments.length<2)return 1===arguments.length?e:{};const r=[e,...t];return r.reduce((e,t)=>v(e,t))},entries:function(e){return Object.keys(e).reduce((t,r)=>(t.push([r,e[r]]),t),[])},filter:function(e,t){return"function"!=typeof t?e:Object.keys(e).reduce((r,n)=>(!0===t(e[n],n,e)&&(r[n]=e[n]),r),{})},findKey:function(e,t=(e=>e),r){const n=Object.keys(e);return"function"==typeof t?n.reduce((n,u)=>n||(t.call(r,e[u])?u:n),void 0):Array.isArray(t)?n.reduce((r,n)=>r||(e[n][t[0]]===t[1]?n:r),void 0):"object"==typeof t?n.reduce((r,n)=>r||(x(e[n],t)?n:r),void 0):n.reduce((r,n)=>r||(e[n][t]?n:r),void 0)},findLastKey:function(e,t=(e=>e),r){const n=Object.keys(e);return"function"==typeof t?n.reduceRight((n,u)=>n||(t.call(r,e[u])?u:n),void 0):Array.isArray(t)?n.reduceRight((r,n)=>r||(e[n][t[0]]===t[1]?n:r),void 0):"object"==typeof t?n.reduceRight((r,n)=>r||(E(e[n],t)?n:r),void 0):n.reduceRight((r,n)=>r||(e[n][t]?n:r),void 0)},forIn:function(e,t){const r=Object.entries(e),n=Object.getPrototypeOf(e),u=n?Object.entries(n):[];return[...new Set([...r,...u])].reduce((r,[n,u])=>(t(u,n,e),null),null),e},fromEntries:function(e){return e.reduce((e,t)=>(e[t[0]]=t[1],e),{})},has:function(e,t){if(void 0===t)return!1;let r;return r=Array.isArray(t)?t:String(t).replace(/\[(\w+)\]/g,".$1").split("."),void 0!==r.reduce((e,t)=>{if(void 0!==e)return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0},e)},get:function(e,t,r){if(void 0===t)return;let n;n=Array.isArray(t)?t:String(t).replace(/\[(\w+)\]/g,".$1").split(".");const u=n.reduce((e,t)=>{if(void 0!==e)return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0},e);return void 0!==u?u:r},invert:function(e){return Object.entries(e).reduce((e,t)=>(e[t[1]]=t[0],e),{})},mapKeys:function(e,t){return"function"!=typeof t?e:Object.entries(e).reduce((r,[n,u])=>({...r,[t(u,n,e)]:u}),{})},mapValues:function(e,t){return"function"!=typeof t?e:Object.entries(e).reduce((r,[n,u])=>({...r,[n]:t(u,n,e)}),{})},merge:function(e,...t){if(arguments.length<2)return 1===arguments.length?e:{};const r=[e,...t];return r.reduce((e,t)=>S(e,t))},pick:function(e,...t){if(0===t.length)return{};const r=new Set;return Array.isArray(t[0])?t[0].forEach(e=>r.add(String(e))):t.forEach(e=>r.add(String(e))),Object.keys(e).reduce((t,n)=>(r.has(n)&&(t[n]=e[n]),t),{})},result:function(e,t,r){if(void 0===t)return;let n;n=Array.isArray(t)?t:String(t).replace(/\[(\w+)\]/g,".$1").split(".");const u=n.reduce((e,t)=>{if(void 0!==e)return Object.prototype.hasOwnProperty.call(e,t)?"function"==typeof e[t]?e[t]():e[t]:void 0},e);return void 0!==u?u:"function"==typeof r?r():r},transform:function(e,t,r={}){return void 0===t?e:Object.entries(e).reduce((r,[n,u])=>(t(r,u,n,e),r),r)},values:function(e){return Object.values(e)}});export{e as arrays,R as objects,j as strings};
{
"name": "absurdum",
"version": "0.81.6",
"version": "0.81.7",
"description": "Reductio Ad Absurdum - The Ridiculous Application of Reduce",

@@ -5,0 +5,0 @@ "keywords": [

@@ -73,3 +73,2 @@ [![GitHub Releases](https://img.shields.io/github/release/vanillaes/absurdum.svg)](https://github.com/vanillaes/absurdum/releases)

- [pull][arrays.pull]
- [some][arrays.some]
- [take][arrays.take]

@@ -100,3 +99,2 @@ - [takeRight][arrays.takeRight]

[arrays.pull]: ./docs/arrays/pull.md
[arrays.some]: ./docs/arrays/some.md
[arrays.take]: ./docs/arrays/take.md

@@ -103,0 +101,0 @@ [arrays.takeRight]: ./docs/arrays/takeRight.md

@@ -17,3 +17,2 @@ export { chunk } from "./chunk.js";

export { pull } from "./pull.js";
export { some } from "./some.js";
export { takeRight } from "./takeRight.js";

@@ -20,0 +19,0 @@ export { take } from "./take.js";

@@ -17,3 +17,2 @@ export { chunk } from './chunk.js';

export { pull } from './pull.js';
export { some } from './some.js';
export { takeRight } from './takeRight.js';

@@ -20,0 +19,0 @@ export { take } from './take.js';

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