This repository has been archived by the owner on Nov 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
datatype-fu.min.js
9 lines (9 loc) · 2.33 KB
/
datatype-fu.min.js
1
2
3
4
5
6
7
8
9
/**
* DataType-FU
* Create JavaScript functions with built-in argument type detection.
*
* Copyright 2014-2016, Marc S. Brooks (https://mbrooks.info)
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(4(Q){8 2={};Q.1b=4(m,l){5(!(m 13 p)){k h g(\'11 G 1d p R P 1c m\');}5(!(l 13 y)){k h g(\'11 G a y 1p 1r 1a m q\');}8 u=l;l=4(){B(8 i=0;i<6.q;i++){8 9=6[i],r=m[i];5(c r!==\'F\'){k h g(\'1f 3 \'+r+\' 1j G a w\');}8 z=r.x(/\\|/),o=A;B(8 j=0;j<z.q;j++){8 3=z[j];5(!/^1e|O|4|T|v|F|d|\\*$/i.1y(3)){k h g(\'16 17 3 \'+3);}8 e;5(3==\'d\'){e=\'C\'}D 5(3==\'*\'){e=\'V\'}D{e=\'12\'+2.14(3)}5(2[e](9)!==M){o=3}D{o=A;1h}}5(o){k h g(\'1i "\'+2.N(u)[i]+\'" 1o R 3 \'+2.E(9)+\' 12 1q P.\\n\\n\'+o+\' 1w 1x:\\n\'+2.15(u));}}7 u.18(19,6)};7 l};2.S=4(){7(f.H.I.J(6[0])===\'[v p]\')};2.W=4(){7(c 6[0]===\'O\')};2.X=4(){7(f.H.I.J(6[0])===\'[v y]\')};2.Y=4(){7(c 6[0]===\'T\')};2.Z=4(){7(f.H.I.J(6[0])===\'[v f]\')};2.10=4(){7(c 6[0]===\'F\')};2.C=4(){7(c 6[0]===\'d\')};2.V=4(){7(2.E(6[0]))?M:1k};2.E=4(){8 9=6[0],3=A;5(2.S(9)){3=\'p\'}5(2.W(9)){3=\'1l\'}5(2.X(9)){3=\'y\'}5(2.Y(9)){3=\'1m\'}5(2.Z(9)){3=\'f\'}5(2.10(9)){3=\'w\'}5(2.C(9)){3=\'d\'}7 3};2.N=4(){7 w(6[0]).x(\'\\n\')[0].1n(/4\\s\\((.+)\\)\\s{/,\'$1\').x(/\\s?,\\s?/)};2.15=4(){8 K=w(6[0]).x(\'\\n\'),b="";B(8 i=0;i<K.q;i++){b+=\'\\t\'+K[i]+\'\\n\'}7 b};2.14=4(b){7 b.1s().1t(0).1u()+b.1v(1)}})((c L!==\'d\'&&L.U)?L.U:1g);',62,97,'||_self|type|function|if|arguments|return|var|argv||str|typeof|undefined|method|Object|Error|new|||throw|func|types||error|Array|length|val|||_func|object|String|split|Function|conds|null|for|isUndef|else|getDataType|string|be|prototype|toString|call|lines|module|true|parseFuncArgs|boolean|valid|uck|of|isArray|number|exports|isWildcard|isBoolean|isFunction|isNumber|isObject|isString|Must|is|instanceof|ucFirst|parseFuncReformat|Invalid|data|apply|this|the|fu|JavaScript|an|array|Data|window|break|Argument|must|false|Boolean|Number|replace|value|equal|not|to|toLowerCase|charAt|toUpperCase|slice|expected|in|test'.split('|'),0,{}))