mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-23 00:45:16 +00:00
1 line
3.3 KiB
JSON
1 line
3.3 KiB
JSON
|
{"ast":null,"code":"/**\n * Safe chained function\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n *\n * @param {function} functions to chain\n * @returns {function|null}\n */\nexport default function createChainedFunction() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n return funcs.reduce(function (acc, func) {\n if (func == null) {\n return acc;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof func !== 'function') {\n console.error('Material-UI: Invalid Argument Type, must only provide functions, undefined, or null.');\n }\n }\n\n return function chainedFunction() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n acc.apply(this, args);\n func.apply(this, args);\n };\n }, function () {});\n}","map":{"version":3,"sources":["/app/node_modules/@material-ui/core/esm/utils/createChainedFunction.js"],"names":["createChainedFunction","_len","arguments","length","funcs","Array","_key","reduce","acc","func","process","env","NODE_ENV","console","error","chainedFunction","_len2","args","_key2","apply"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,qBAAT,GAAiC;AAC9C,OAAK,IAAIC,IAAI,GAAGC,SAAS,CAACC,MAArB,EAA6BC,KAAK,GAAG,IAAIC,KAAJ,CAAUJ,IAAV,CAArC,EAAsDK,IAAI,GAAG,CAAlE,EAAqEA,IAAI,GAAGL,IAA5E,EAAkFK,IAAI,EAAtF,EAA0F;AACxFF,IAAAA,KAAK,CAACE,IAAD,CAAL,GAAcJ,SAAS,CAACI,IAAD,CAAvB;AACD;;AAED,SAAOF,KAAK,CAACG,MAAN,CAAa,UAAUC,GAAV,EAAeC,IAAf,EAAqB;AACvC,QAAIA,IAAI,IAAI,IAAZ,EAAkB;AAChB,aAAOD,GAAP;AACD;;AAED,QAAIE,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAA7B,EAA2C;AACzC,UAAI,OAAOH,IAAP,KAAgB,UAApB,EAAgC;AAC9BI,QAAAA,OAAO,CAACC,KAAR,CAAc,sFAAd;AACD;AACF;;AAED,WAAO,SAASC,eAAT,GAA2B;AAChC,WAAK,IAAIC,KAAK,GAAGd,SAAS,CAACC,MAAtB,EAA8Bc,IAAI,GAAG,IAAIZ,KAAJ,CAAUW,KAAV,CAArC,EAAuDE,KAAK,GAAG,CAApE,EAAuEA,KAAK,GAAGF,KAA/E,EAAsFE,KAAK,EAA3F,EAA+F;AAC7FD,QAAAA,IAAI,CAACC,KAAD,CAAJ,GAAchB,SAAS,CAACgB,KAAD,CAAvB;AACD;;AAEDV,MAAAA,GAAG,CAACW,KAAJ,CAAU,IAAV,EAAgBF,IAAhB;AACAR,MAAAA,IAAI,CAACU,KAAL,CAAW,IAAX,EAAiBF,IAAjB;AACD,KAPD;AAQD,GAnBM,EAmBJ,YAAY,CAAE,CAnBV,CAAP;AAoBD","sourcesContent":["/**\n * Safe chained function\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n *\n * @param {function} functions to chain\n * @returns {function|null}\n */\nexport default function createChainedFunction() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n return funcs.reduce(function (acc, func) {\n if (func == null) {\n return acc;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof func !== 'function') {\n console.error('Material-UI: Invalid Argument Type, must only provide functions, undefined, or null.');\n }\n }\n\n return function chainedFunction() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n acc.apply(this, args);\n func.apply(this, args);\n };\n }, function () {});\n}"]},"metadata":{},"sourceType":"module"}
|