3decae00416c108e2730acfce2a7515d.json
1.83 KB
{"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 * @returns {function|null}\n */\nexport default function createChainedFunction() {\n var args = [].slice.call(arguments, 0);\n\n if (args.length === 1) {\n return args[0];\n }\n\n return function chainedFunction() {\n for (var i = 0; i < args.length; i++) {\n if (args[i] && args[i].apply) {\n args[i].apply(this, arguments);\n }\n }\n };\n}","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/rc-util/es/createChainedFunction.js"],"names":["createChainedFunction","args","slice","call","arguments","length","chainedFunction","i","apply"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,qBAAT,GAAiC;AAC9C,MAAIC,IAAI,GAAG,GAAGC,KAAH,CAASC,IAAT,CAAcC,SAAd,EAAyB,CAAzB,CAAX;;AAEA,MAAIH,IAAI,CAACI,MAAL,KAAgB,CAApB,EAAuB;AACrB,WAAOJ,IAAI,CAAC,CAAD,CAAX;AACD;;AAED,SAAO,SAASK,eAAT,GAA2B;AAChC,SAAK,IAAIC,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGN,IAAI,CAACI,MAAzB,EAAiCE,CAAC,EAAlC,EAAsC;AACpC,UAAIN,IAAI,CAACM,CAAD,CAAJ,IAAWN,IAAI,CAACM,CAAD,CAAJ,CAAQC,KAAvB,EAA8B;AAC5BP,QAAAA,IAAI,CAACM,CAAD,CAAJ,CAAQC,KAAR,CAAc,IAAd,EAAoBJ,SAApB;AACD;AACF;AACF,GAND;AAOD","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 * @returns {function|null}\n */\nexport default function createChainedFunction() {\n var args = [].slice.call(arguments, 0);\n\n if (args.length === 1) {\n return args[0];\n }\n\n return function chainedFunction() {\n for (var i = 0; i < args.length; i++) {\n if (args[i] && args[i].apply) {\n args[i].apply(this, arguments);\n }\n }\n };\n}"]},"metadata":{},"sourceType":"module"}