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.17 to 0.81.18

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),[])},fill:function(e,t,r=0,n=null){return null===n&&(n=e.length-1),e.reduce((e,u,c,o)=>(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",o=`[${c}]`,i="[\\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=`(?:${[i,s,d].join("|")})${g}`,O=RegExp([`${a}?${f}+(?:['’](?:d|ll|m|re|s|t|ve))?(?=${[o,a,"$"].join("|")})`,`${h}+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=${[o,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,o,i)=>i>=e?(u+=o,o!==t[i-e]&&(n=!1),i===r.length-1?n?c:c+u:c):c+o,"")}},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,o,i)=>{if(i>=r){if(c)return c;if(o===u)return e.substring(i,i+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,o)=>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,o)=>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 o,i,f=e.slice(0,c);if(void 0===r)return f+u;if("string"==typeof r?o=r:i=r,i){if(e.slice(c).search(i)){let e,t;const r=f;for(i.global||(i=RegExp(i.source,i.flags+"g")),i.lastIndex=0,e=i.exec(r);e;)t=e.index,e=i.exec(r);f=f.slice(0,void 0===t?c:t)}}else if(e.indexOf(o,c)!==c){const e=f.lastIndexOf(o);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)?A(e,t):e:w(e,t),A=(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},w=(e,t)=>{const r={};return"object"!=typeof e?e:(Object.keys(e).reduce((t,n)=>(void 0===r[n]&&(r[n]=e[n]),null),null),Object.keys(t).reduce((n,u)=>("object"==typeof t[u]&&e[u]?r[u]=v(e[u],t[u]):void 0===r[u]&&(r[u]=t[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)?k(e,t):t:m(e,t),k=(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},m=(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 $=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.getPrototypeOf(e),n=r?Object.keys(r):[];return Object.keys(e).reduce((r,n)=>(t(e[n],n,e),null),null),n.reduce((n,u)=>(t(r[u],u,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.keys(e).reduce((t,r)=>(t[e[r]]=r,t),{})},mapKeys:function(e,t){return"function"!=typeof t?e:Object.keys(e).reduce((r,n)=>({...r,[t(e[n],n,e)]:e[n]}),{})},mapValues:function(e,t){return"function"!=typeof t?e:Object.keys(e).reduce((r,n)=>({...r,[n]:t(e[n],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.keys(e).reduce((r,n)=>(t(r,e[n],n,e),r),r)},values:function(e){return Object.values(e)}});export{e as arrays,$ 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),[])},fill:function(e,t,r=0,n=null){return null===n&&(n=e.length-1),e.reduce((e,u,c,o)=>(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",o=`[${c}]`,i="[\\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=`(?:${[i,s,d].join("|")})${g}`,O=RegExp([`${a}?${f}+(?:['’](?:d|ll|m|re|s|t|ve))?(?=${[o,a,"$"].join("|")})`,`${h}+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=${[o,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,o,i)=>i>=e?(u+=o,o!==t[i-e]&&(n=!1),i===r.length-1?n?c:c+u:c):c+o,"")}},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,o,i)=>{if(i>=r){if(c)return c;if(o===u)return e.substring(i,i+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,o)=>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,o)=>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 o,i,f=e.slice(0,c);if(void 0===r)return f+u;if("string"==typeof r?o=r:i=r,i){if(e.slice(c).search(i)){let e,t;const r=f;for(i.global||(i=RegExp(i.source,i.flags+"g")),i.lastIndex=0,e=i.exec(r);e;)t=e.index,e=i.exec(r);f=f.slice(0,void 0===t?c:t)}}else if(e.indexOf(o,c)!==c){const e=f.lastIndexOf(o);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)?A(e,t):e:w(e,t),A=(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},w=(e,t)=>{const r={};return"object"!=typeof e?e:(Object.keys(e).reduce((t,n)=>(void 0===r[n]&&(r[n]=e[n]),null),null),Object.keys(t).reduce((n,u)=>("object"==typeof t[u]&&e[u]?r[u]=v(e[u],t[u]):void 0===r[u]&&(r[u]=t[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)?k(e,t):t:m(e,t),k=(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},m=(e,t)=>{const r={};return"object"==typeof e&&Object.keys(e).reduce((t,n)=>(r[n]=e[n],null),null),Object.keys(t).reduce((n,u)=>("object"==typeof t[u]&&e[u]?r[u]=S(e[u],t[u]):r[u]=t[u],null),null),r};var $=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.getPrototypeOf(e),n=r?Object.keys(r):[];return Object.keys(e).reduce((r,n)=>(t(e[n],n,e),null),null),n.reduce((n,u)=>(t(r[u],u,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.keys(e).reduce((t,r)=>(t[e[r]]=r,t),{})},mapKeys:function(e,t){return"function"!=typeof t?e:Object.keys(e).reduce((r,n)=>({...r,[t(e[n],n,e)]:e[n]}),{})},mapValues:function(e,t){return"function"!=typeof t?e:Object.keys(e).reduce((r,n)=>({...r,[n]:t(e[n],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.keys(e).reduce((r,n)=>(t(r,e[n],n,e),r),r)},values:function(e){return Object.values(e)}});export{e as arrays,$ as objects,j as strings};
{
"name": "absurdum",
"version": "0.81.17",
"version": "0.81.18",
"description": "Reductio Ad Absurdum - The Ridiculous Application of Reduce",

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

@@ -48,12 +48,12 @@ /**

if (typeof current === 'object') {
Object.entries(current).reduce((_, entry) => {
res[entry[0]] = entry[1];
Object.keys(current).reduce((_, key) => {
res[key] = current[key];
return null;
}, null);
}
Object.entries(source).reduce((_, entry) => {
if (typeof entry[1] !== 'object' || !current[entry[0]]) {
res[entry[0]] = entry[1];
Object.keys(source).reduce((_, key) => {
if (typeof source[key] !== 'object' || !current[key]) {
res[key] = source[key];
} else {
res[entry[0]] = deepMerge(current[entry[0]], entry[1]);
res[key] = deepMerge(current[key], source[key]);
}

@@ -60,0 +60,0 @@ return null;

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