mofun
Version:
100s of standalone low-level helpers, higher-order functions, sorts, and utilities
1 lines • 22.6 kB
JavaScript
var F={$:function(css,root){if(typeof document==="undefined")return[];root=root||document.documentElement;return Array.apply(0,root.querySelectorAll(css))},$w:function(s){return(""+s).trim().split(/\s+/)},$c:function(s){return(""+s).trim().split(",")},EE:function(){var E={};return function(k,v,del){var r=E[k]||(E[k]=[]);return typeof v!="function"?r.some(function(f,_,__){return f.call(r,v,k)===false}):del===true?(_=r.indexOf(v))!==-1&&r.splice(_,1):r.unshift(v)}},If:function(f,v,v2){return function(){var c=f.apply(this,arguments)?v:v2;if(typeof c==="function"){return c.apply(this,arguments)}return c}},_:Function.call.bind([].slice),a:function(a,b,c){return a},abs:Math.abs,add:function(v,_,__){"use strict";return v+this},addProperty:function(o,_,__){o[this[0]]=this[1];return o},addProperties:function(o,_,__){Object.keys(this).forEach(function(k,_,__){o[k]=this[k]},this);return o},addNumber:function(n,_,__){"use strict";return+n+ +this},all:Function.call.bind([].every),allProps:function(v){var r=Object.getOwnPropertyNames(v);for(var i in v){if(r.indexOf(i)===-1)r.push(i)}return r},any:Function.call.bind([].some),appendProperty:function(o,_,__){o[this[0]]+=this[1];return o},append:function(v,_,__){"use strict";var t=this;if(typeof t==="function"){t=t(v,_,__)}return v.concat?v.concat(t):v+t},arg:function(f,n,v,call){"use strict";return function(_,__,___){var r=Array.apply(null,arguments);r[n]=v;return call===true?f.apply(r[0],r.slice(1)):f.apply(this,r)}},argument:function(){"use strict";return arguments[this]},arguments:function(){"use strict";return Array.apply(null,arguments)},assert:function(v,s){if(!v)return s||false;if(v===true)return v;try{return(0||eval)(v)||s||v||false}catch(y){return y+": "+(s||v)}},assign:function(o,s){return function(v){return o[s]=v}},avg:function(v,n,c,r){return r.length-1===c?(v+n)/r.length:v+n},b:function(a,b,c){return b},bind:Function.call.bind(Function.bind),blank:Function.call.bind(/^\S*$/.test),c:function(a,b,c){return c},call:function(f){return Function.call.bind(f)},camelize:function(s,_,__){return"".replace.call(s,/\-([a-z])?/g,function(j,x,_,__){return x.toUpperCase()})},"catch":function(f){try{return f.apply(this,arguments)}catch(y){return y}},capture:function(){return Array.apply(null,arguments)},ceil:Math.ceil,censor:function(o,_,__){for(var i=0,m=this.length;i<m;i++)delete o[this[i]];return o},changed:function(v,i,r){return r[i-1]!==v},chars:function(s){return"".split.call(s,"")},"char":function(s){return(""+s).charCodeAt(0)},clean:function(s){return"".replace.call(s,/\s+/g," ").trim()},clone:function(o,bInherit){var o2={};for(var k in o)if(bInherit||[].hasOwnProperty.call(o,k))o2[k]=o[k];return o2},compact:function(v,_,__){return v!=null},compose:function(f){var that=this;return function(){return that.call(this,f.apply(this,arguments))}},concat:function(sr1,sr2,_,__){return sr1.concat(sr2)},constant:function(v){return v.valueOf.bind(v)},count:function(o,v,i,_){if(i===1)o={};o[v]=o[v]?o[v]+1:1;return o},create:Object.create||function(o){function f(){}f.prototype=p;return new f},dasherize:function(s){return(s+"").replace(/([a-z\d])([A-Z])/g,"$1-$2").toLowerCase()},dataURL:function(s){"use strict";return"data:"+(this==""+this?this:"text/plain")+","+encodeURIComponent(""+s)},date:function(v){if(!v)return new Date;if(v.join){return new Date(+v[0]||0,+v[1]||0,+v[2]||0,+v[3]||0,+v[4]||0,+v[5]||0)}return new Date(v)},dateParts:function(s){return new Date(new Date(s)-(new Date).getTimezoneOffset()*6e4).toUTCString().split(/\W+/)},delProperty:function(o,_,__){delete o[this];return o},delMatch:function(o,_,__){Object.keys(o).filter(/./.test,this).forEach(function(k,_,__){delete o[k]});return o},deBounce:function(f,n){var ok;return function(){if(ok)return;ok=true;f.apply(this,arguments);setTimeout(function(){ok=false},n||100)}},dec:function(n,_,__){"use strict";n-=+this||1;return n},defaults:function(o,_,__){Object.keys(this).forEach(function(k,_,__){var u;if(u===o[k])o[k]=this[k]},this);return o},defer:setTimeout.bind(this),define:function(s,v){this[s]=v;return this},def:function(o,s,v){if(!v||!v.set&&!v.get&&v.value===void 0){d={value:v}}Object.defineProperty(o,s,d)},delta:function(v,n,r){return n?r[n-1]-v:0},divide:function(n,_,__){return n/this},each:Function.call.bind([].forEach),endsWith:"".endsWith?Function.call.bind("".endsWith):function(s,_,__){"use strict";return s.lastIndexOf(this)+this.length===s.length},equal:function(v,_,__){"use strict";return v===this},equiv:function(v,_,__){"use strict";return v==this},encode:encodeURIComponent.bind(this),escapeHTML:function(s){return(""+s).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},escapeRX:function(s){return(""+(s||"")).replace(/([.+?^\-*=!:${(})\|[\]\/\\])/g,"\\$1")},even:function(n,_,__){return n%2===0},every:Function.call.bind([].every),exec:function(f){return f.apply(this,[].slice.call(arguments,1))},extend:function extend(o,o2){for(var k in o2)if([].hasOwnProperty.call(o2,k))o[k]=o2[k];if(arguments.length>2)extend.apply(this,[o].concat([].slice.call(arguments,2)));return o},extract:function(o,_,__){return o[""+this]},extractThis:function(k,_,__){return this[k]},extractList:function(o,_,__){return this.map(function(t,_,__){return o[t]})},extractObject:function(o,_,__){var o2={};this.forEach(function(t,_,__){return o2[t]=o[t]});return o2},f:function f(s,n){"use strict";if(typeof s==="function")return s;return f["CACHE_"+s+n]||(f["CACHE_"+s+n]=Function("a,b,c,d,e,f,g,h,i".split(",").slice(0,typeof n==="number"?n:3),(s.indexOf("return")>-1?"":"return ")+s+";"))},fill:function(v){"use strict";return this.apply?this.apply(v,arguments):this},filter:function filter(r,f,v){"use strict";var m=r.length,o=[],i=0;if(f.split)f=filter[0+f]||(filter[0+f]=Function("a,b,c",'"use strict";return '+f+";"));if(v==null){for(;i<m;i++)if(f(r[i],i,r))o.push(r[i])}else{for(;i<m;i++)if(f.call(v,r[i],i,r))o.push(r[i])}return o},find:[].find?Function.call.bind([].find):function(r,f,o){var i=0;r.some(function(){i++;return f.apply(this,arguments)},o||this);return r[i]},findIndex:[].findIndex?Function.call.bind([].findIndex):function(r,f,o){var i=0;r.some(function(){i++;return f.apply(this,arguments)},o||this);return i},findIndices:function(r,f,o){var c=[],u;o=o===u?this:o;r.forEach(function(a,b,_){var x=f.apply(o,arguments);if(x)c.push(b)});return c},finnally:function(f,v){if(typeof v==="function"){return function(a,b,c){return v.call(this,f.apply(this,arguments))}}return function(a,b,c){return v[f.apply(this,arguments)]}},first:function(sr){return sr.slice(0,1)[0]},floor:Math.floor,forEach:function forEach(r,f,v){"use strict";if(!r||!f){return}var m=r.length,i=0;if(f.split)f=forEach[0+f]||(forEach[0+f]=Function("a,b,c",'"use strict"; return '+f));if(v==null){for(;i<m;i++)f(r[i],i,r)}else{for(;i<m;i++)f.call(v,r[i],i,r)}},formatNumber:function(n){n=(""+n).split(".");return n[0].replace(/(\d)(?=(?:\d{3})+$)/g,"$1,")+(n[1]?"."+n[1].slice(0,+this||35):"")},getComments:function(s){return((s+"").match(/\/\*([\w\W]+?)\*\//g)||[]).map(function(a,_,__){return a.slice(2,-2)}).join("\n")},getKey:function(s){var i=-1,t=this,ks=Object.keys(this);ks.some(function(a,b){if(t[a]===s){i=b;return true}});return ks[i]},gt:function(v,_,__){"use strict";return v>this},gte:function(v,_,__){"use strict";return v>=this},groupBy:function(r,s){var ret={};r.forEach(function(a,_,__){var k=a[s],b=ret[k]||(ret[k]=[]);b.push(a)});return ret},group:function(r,n){var o=[],i=0,m=r.length;n||(n=2);for(;i<m;i+=n)o.push(r.slice(i,i+n));return o},guard:function(v,n){return function(){return v.apply(this,[].slice.call(arguments,0,+n||99))}},has:function(o){return o[this]!==undefined},hasOwn:function(o){return[].hasOwnProperty.call(o,this)},hasOwnThis:function(s){return[].hasOwnProperty.call(this,s)},head:function(sr,_,__){return sr.slice(0,+this||1)},inc:function(n,_,__){n+=+this||1;return n},initial:function(sr,_,__){return sr.slice(-1*this||-1)[0]},intersect:function(v,_,__){return this.indexOf(v)!=-1},invoke:function(v,_,__){return v[this]()},invokeSelf:function(v,_,__){"use strict";return v[this](v)},is:function is(v,v2){return v===v2||isNaN(v)&&isNaN(v2)},isBoolean:function(v){return v===true||v===false},isArray:Array.isArray.bind(Array),isDate:function(v){return v&&v.constructor===Date},isDefined:function(v){return v!=null},isFalse:function(v){return!v},isTrue:Boolean,isType:function(v){"use strict";return typeof v==this},isConstructor:function(v){"use strict";return v.constructor==this},isElement:function(v){return v instanceof Element},isNode:function(v){return v instanceof Node},isEmail:RegExp.prototype.test.bind(/\S+@\S+\.\S+/),isEmpty:function(v){if(!v)return!0;for(var i in v)if([].hasOwnProperty.call(v,i))return!1;return!0},isInt:function(v){return Math.floor(v)==v},isNaN:isNaN,isNative:function(f){return typeof f==="function"&&Function.toString.call(f).indexOf("[nat"+"ive code]")>-1},isNeg:function(n){return n<0},isNull:function(v){return v===null},isNumber:function(v){return(+v||v===0)&&typeof v==="number"},isNumerical:function(v){return!!+v||v===0},isObject:function(v){return Object(v)===v},isPlainObject:function(v){return typeof v==="object"&&v.constructor===Object},isOwn:Function.call.bind([].hasOwnProperty),isPos:function(n){return n>=0},isRegExp:function(v){return v&&v.constructor===RegExp},isSet:function(v){return v!=null},isUndefined:function(v){var u;return v===u},isURL:RegExp.prototype.test.bind(/https?:\/\/(www.)?[-a-zA-Z0-9@:%._+~#=]{2,256}.[a-z]{2,6}([-a-zA-Z0-9@:%_+.~#?&\/=]*)/),k:function(v){return v},keys:Object.keys,largest:function(v,v2,_,__){return v>v2?v:v2},last:function(sr){return sr.slice(-1)[0]},later:function(){return new Promise(setTimeout)},lcase:Function.call.bind(String.prototype.toLowerCase),left:function(sr,_,__){"use strict";return sr.slice(0,+this)},less:function(n,n2){return Math.min(n,n2)},locale:function(v){return v==null?String(v):v.toLocaleString?v.toLocaleString():String(v)},log:function(v){if(typeof console!=="undefined")console.log(v);return v},lt:function(v,_,__){"use strict";return v<this},lte:function(v,_,__){"use strict";return v<=this},lut:function(r){var o={},i=-1,m=r.length;for(;++i<m;)o[r[i]]=i;return o},lutKey:function(r,s,many){var o={},i=-1,m=r.length;if(many){for(;++i<m;)(o[r[i][s]]=o[r[i][s]]||[]).push(r[i])}else{for(;++i<m;)o[r[i][s]]=r[i]}return o},map:function map(r,f,v){"use strict";var m=r.length,o=[],i=0;if(f.split)f=map[0+f]||(map[0+f]=Function("a,b,c",'"use strict";return '+f));if(v==null){for(;i<m;i++)o[i]=f(r[i],i,r)}else{for(;i<m;i++)o[i]=f.call(v,r[i],i,r)}return o},matches:function(sr,_,__){"use strict";if(typeof sr==="string")return sr.search(this)!==-1;return sr.indexOf(this)!==-1},max:Function.apply.bind(Math.max,Math),median:function(sr){var i=sr.length/2,x;if(!sr.join){sr=sr.split("")}sr=sr.slice().sort(function(v,v2){return v>v2?1:(v==v2)-1});x=i in sr?(sr[~~i]+sr[~~i-1])/2:sr[~~i];return isNaN(x)?sr[~~i-1]:x},memoize:function(f){var cache={},has=cache.hasOwnProperty.bind(cache);return function(x){return has(x)?cache[x]:cache[x]=f.apply(this.arguments)}},method:function(v,i,r){return v[this[0]].apply(v,this.slice(1))},methods:function(e,t,n){var k=this.shift();return this.pop().map(function(a,_,__){return e[k].call(e,a)})},min:Function.apply.bind(Math.min,Math),mod:function(n,_,__){"use strict";return n%this},mode:function(r){var c=[],u=[],m=0;[].forEach.call(r,function(a){var n=u.indexOf(a);if(n==-1){u.push(a);c[n=u.length-1]=0}c[n]++;if(c[n]>m){m=c[n]}});return u[c.indexOf(m)]},modifyProperty:function(o,_,__){var f=this[1],k=this[0];o[k]=f.call(o,o[k]);return o},more:function(v,v2){return Math.max(v,v2)},multiply:function(n,_,__){"use strict";return n*this},negate:function(f){"use strict";return function(){return!f.apply(this,arguments)}},noop:function(){},not:function(v,_,__){"use strict";return v!=this},now:Date.now,notNull:function(v){return v!=null},once:function(f){var spent=false;return function(){if(spent)return f;spent=true;return f=f.apply(this,arguments)}},obKeysx:function(o){var t=[],n=0;for(var r in o)t[n++]=r;return t},obMap:function(o){var t=[],n=0;for(var r in o)o.hasOwnProperty(r)&&(t[n++]=[r,o[r]]);return t},obMapx:function(o){var t=[],n=0;for(var r in o)t[n++]=[r,o[r]];return t},obVals:function(o){var t=[],n=0;for(var r in o)o.hasOwnProperty(r)&&(t[n++]=o[r]);return t},obValsx:function(o){var t=[],n=0;for(var r in o)t[n++]=o[r];return t},odd:function(n,_,__){return n%2!==0},ok:function(v){return v!=null},or:function(o,_,__){"use strict";var u,k;return[].some.call(this,function(a){k=a;return typeof a==="function"?k=a(o):o===a})?k:u},ord:function(s){return(""+s).charCodeAt(0)},pad:function(s,n,s2){s2||(s2=" ");return n>s.length?Array(1+n-s.length).join(s2)+s:s.slice(0,n)},pairs2object:function(r,o){o=Object(o||{});r.forEach(function(a,b,c){o[a[0]]=a[1]});return o},partial:function(fn){"use strict";var args=[].slice.call(arguments,1);return function(){return fn.apply(this,args.concat(Array.apply(null,arguments)))}},partition:function(arr,fnDecide){var oks=arr.filter(fnDecide),bads=arr.filter(function(e,_,__){return oks.indexOf(e)===-1});return[oks,bads]},percent:function(n,_,__){"use strict";return n/this},pick:function(o,_,__){"use strict";var temp={};for(var i=0,m=this.length;i<m;i++)if(o[this[i]]!==undefined)temp[this[i]]=o[this[i]];return temp},pluck:function(o,_,__){"use strict";return o[""+this]},populate:function(r){"use strict";for(var i=0,m=r.length;i<m;i++){r[i]=this.apply?this.apply(v,arguments):this}return r},prependProperty:function(o,_,__){o[this[0]]=this[1]+o[this[0]];return o},prepend:function(v,_,__){"use strict";var t=this;if(typeof t==="function"){t=t(v,_,__)}return t.concat?t.concat(v):t+v},pretty:function(v){return JSON.stringify(v,null," ")},property:function(k){"use strict";return function(o,_,__){return o[k]}},properties:Object.getOwnPropertyNames,propIsEquiv:function(o,_,__){"use strict";return o[this[0]]==this[1]},propIs:function(o,_,__){return o[this[0]]===this[1]},propIsIn:function(o,_,__){return this[1].indexOf(o[this[0]])>-1},propIsNot:function(o,_,__){return o[this[0]]!==this[1]},propIsNotEquiv:function(o,_,__){return o[this[0]]!=this[1]},propIsLess:function(o,_,__){return o[this[0]]<this[1]},propIsMore:function(o,_,__){return o[this[0]]>this[1]},quote:function(s){return JSON.stringify(""+s).replace(/\\t/g," ")},range:function(n){for(var r=[],i=0;i<n;i+=1)r.push(i);return r},random:Math.random,randomString:function(n){var s="",m=+n||16;while(s.length<m)s+=(1/Math.random()).toString(36).slice(3,-1).replace(/\W+/g,"").replace(/^\d+/,"");return s.slice(0,m)},reduce:function reduce(r,f,v){"use strict";var m=r.length,i=0,u;if(v===u){v=r[i++]}if(f.split)f=reduce[0+f]||(reduce[0+f]=Function("a,b,c,d",'"use strict"; return '+f));for(;i<m;i++){v=f(v,r[i],i,r)}return v},regexp:RegExp.prototype.test,reject:function(r,f,v){function o(a,b,c){return!f.apply(this,arguments)}return v!=null?r.filter(o,v):r.filter(o)},redact:function(s){"use strict";return"".replace.call(s,/(\w)/g,this&&this.charAt?this:"#")},repeat:function(s,n){return Array((+n||0)+2).join(s||"")},repeated:function(v,i,r){return r[i-1]===v},replaceAll:function(s,v,s2){"use strict";return"".split.call(s,v).join(s2)},replaceFirst:function(s,rx,s2){"use strict";var r2;if(typeof rx==="object"){r2=(rx+"").split("/");rx.compile(r2.slice(1,-1).join("/"),r2.pop().replace("g",""))}return"".replace.call(s,rx)},replaceThis:function(s){"use strict";var o=this;Object.keys(o).forEach(function(k){var rx=o[k];s=s.replace(rx,k)});return s},replace:function(s,_,__){return(""+s).replace(this[0],this[1].call?this[1].bind(s):this[1])},rest:function(e){return e.slice(-1*this)},resolve:function(o){return this.reduce(function(o,k,_,__){var v=o&&o[k];return typeof v==="function"?v.call(o):v},o)},result:function(o,s){"use strict";if(!s){s=o;o=this}return typeof o[s]==="function"?o[s].call(o):o[s]},reverse:function(s){return[].slice.call(s).reverse()[typeof s==="string"?"join":"valueOf"]("")},right:function(sr,_,__){"use strict";return sr.slice(-1*this)},round:Math.round,rPad:function(s,n,s2){s2||(s2=" ");return n>s.length?s+Array(1+n-s.length).join(s2):s.slice(0,n)},rPartial:function(f){"use strict";var args=[].slice.call(arguments,1);return function(){return f.apply(this,Array.apply(0,arguments).concat(args))}},run:function(v,_,__){"use strict";return this(v)},same:function(v,_,__){"use strict";return v==this},sameAs:function(v,_,__){return function(a){return v==a}},sample:function(v,i,r){if(undefined===r._out){r._out=Math.floor(Math.random()*r.length)}return i===r._out},selMatch:function(o,_,__){var o2=o.constructor===Array?[]:{};Object.keys(o).filter(/./.test,this).forEach(function(k,_,__){o2[k]=o[k]});return o2},selMatchValue:function(o,_,__){var o2={},t=this;Object.keys(o).forEach(function(k,_,__){if(t.test(o[k]))o2[k]=o[k]});return o2},shuffle:function(v,i,r){var out=i?r.r:r.r=r.slice(),ol=out.length;return ol===1&&delete r.r,out.splice(Math.floor(Math.random()*ol),1)[0]},size:function(sr){if(!sr||sr===true)return 0;if(sr.length-.1)return sr.length;return Object.keys(sr).length},skipWhile:function(r,f,o){var i=0,u;o=o===u?this:o;r.every(function(_,__,___){i++;return f.apply(o,arguments)});return r.slice(Math.max(0,i-1))},slice:function(n,_,__){return[].slice.call(n,0,+this||9e9)},smallest:function(v,v2,_,__){return v<v2?v:v2},some:Function.call.bind([].some),sortBy:function sortBy(r,s){"use strict";var s=/^[\w().]+$/.test(s)?"."+s:"["+JSON.stringify(s)+"]",fn=sortBy[0+s]||(sortBy[0+s]=Function("a, b",'"use strict";return (a'+s+" > b"+s+" ? 1 : ( (a"+s+" === b"+s+") ? 0 : -1 ));"));return r.sort(fn)},sortDate:function(d,d2){return d-d2},sortInt:function(n,n2){return parseInt(n,10)-parseInt(n2,10)},sortNoCase:function(s,s1){s=(s+"").toLowerCase();s1=(s1+"").toLowerCase();return s===s1?0:s>s1?1:-1},sortNumber:function(n,n1){return n-n1},sortProperty:function(o,o2){"use strict";o=o[this];o2=o2[this];return o>o2?1:(o==o2)-1},sortObjectKeys:function(o){Object.keys(o).sort().forEach(function(k){var v=o[k];delete o[k];o[k]=v});return o},sorter:function(v,v2){return v>v2?1:(v==v2)-1},split:function(s,_,__){"use strict";return"".split.call(s,this)},sqrt:Math.sqrt,square:function(n,_,__){return n*n},startsWith:"".startsWith?Function.call.bind("".startsWith):function(s,_,__){"use strict";return s.indexOf(this)===0},stripComments:function(s){return(s+"").replace(/\/\*([\w\W]+?)\*\/{1}/g,"")},stripTags:function(s){return(s+"").split(/<\/?[^>]+?>/).join("")},substr:function(sr,_,__){return sr.slice(+this[0]||+this||0,this[1]||9e9)},subtract:function(n,_,__){"use strict";return n-this},subMethod:function(f,s){return function(v,_,__){return f.call(this,v[s],_,__)}},succ:function(s){return s.slice(0,-1)+String.fromCharCode(s.slice(-1).charCodeAt(0)+1)},sum:function(a,b,_,__){return a+b},sumNumber:function(n,n2,_,__){return+n+ +n2},surround:function(s,_,__){"use strict";return this+s+this},tag:function(s,_,__){"use strict";return"<"+this+">"+s+"</"+this+">"},tail:function(sr){"use strict";return sr.slice(-1*(+this||9e9))},takeWhile:function(r,f,o){var i=0,u;o=o===u?this:o;r.every(function(){i++;return f.apply(o,arguments)});return r.slice(0,Math.max(0,i-1))},template:function(o,_,__){"use strict";var r=(""+this).split("{{"),s="";for(var i=0,m=r.length;i<m;i++){var p=r[i].split("}}");s+=i?o[p[0]]+p[1]:r[i]}return s},that:function(_,__,___){"use strict";return this},this2a:function(v,_,__){"use strict";return this.call(v)},flip:function(f){"use strict";return function(v){return f.call(v,this)}},tee:function(a,_,__){"use strict";this(a);return a},thisAt:function(s,_,__){"use strict";return this[s]},thisOverA:function(n,_,__){"use strict";return this/n},time:function(v){return new Date(v||+new Date).toLocaleTimeString()},timer:typeof performance!=="undefined"?performance.now.bind(performance):Date.now,times:function(n,_,__){"use strict";return n*this},toArray:Function.call.bind([].slice),to$:function(f){"use strict";return function(a,b,c){return f.call(this,b,a,c)}},toFixed:function(n,_,__){"use strict";return(1*n||0).toFixed(+this||2)},trim:function(s){return(""+s).trim()},trimLeft:function(s){return(""+s).replace(/^\s+/,"")},trimRight:function(s){return(""+s).replace(/\s+$/,"")},trunc:Math.trunc||function(n){return+(""+n).split(".")[0]},typeOf:function(v){return typeof v},ucase:Function.call.bind(String.prototype.toUpperCase),unequal:function(v,_,__){"use strict";return v!==this},unequiv:function(v,_,__){"use strict";return v!=this},unique:function(v,i,r){return r.indexOf(v)===i},uniqueId:function uniqueId(s){uniqueId.id=uniqueId.id||0;return(s||"")+uniqueId.id++},union:function(r,_,__){"use strict";return this.concat(r).filter(function(a,b,c){return c.indexOf(a)===b})},unmethod:function(o,s){return o[s].bind(o)},uuid:function(){return[8,4,4,4,12].map(function(a,_,__){return("abcde"+(1/Math.random()).toString(16)).slice(-1*a)}).join("-").replace(/(.{14})./,"$14")},values:function(o){return Object.keys(o).map(function(k,_,__){return o[k]})},visit:function(o,f,c){var r={},x;c=c===undefined?o:c;for(var it in o)if((x=f.call(c,o[it],it,o))!=null)r[it]=x;return r},where:function(o,_,__){var t=this;return Object.keys(t).every(function(k,_,__){return o[k]===t[k]})},without:function(v,_,__){"use strict";return this.indexOf(v)===-1},words:function(s,_,__){return"".match.call(s,/\b\w+\b/g)||[]},xAND:function(a,b){return a&&b&&true},xCOUNTA:function(r){var a=arguments;if(a.length>1)r=Array.apply(null,a);if(!r||!r.length)return 0;return[].filter.call(String).length},xCOUNT:function(r){var a=arguments;if(a.length>1)r=Array.apply(null,a);if(!r||!r.length)return 0;return[].filter.call(r,isFinite).length},xCONCATENATE:Function.call.bind("".concat),xIF:function(v,v1,v2){return v?v1:v2},xLEN:function(sr){return sr&&sr.length||0},xNOT:function(a,b){return!(a||b)},xOR:function(a,b){return!!(a||b)},xSUM:function(r){var a=arguments;if(a.length>1)r=Array.apply(null,a);if(!r||!r.length)return 0;return[].filter.call(r,Number).reduce(function(a,b){return a+b})},xTRIM:Function.call.bind("".trim),xVLOOKUP:function(v,r,s,s2){var v2=-1;r.some(function(a,b,c){if(a[s]==v){v2=b;return true}});v=r[v2];return v&&s2?v[s2]:v},xor:function xor(r1,r2){function no(a,b,c){return this.indexOf(a)===-1}return r1.filter(no,r2).concat(r2.filter(no,r1))},zip:function(v,i,_){return[v,this[i]]},_throw:function(){throw"STOPPED BY F.THROW"}};if(typeof define==="function"&&define.amd){define(["exports"],function(){return F})}else{if(typeof module==="object"&&module&&module.exports){module.exports=F}}