You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 lines
2.8 KiB

{"ast":null,"code":"import isArrayLike from './isArrayLike.js';\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function (collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n while (fromRight ? index-- : ++index < length) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\nexport default createBaseEach;","map":{"version":3,"names":["isArrayLike","createBaseEach","eachFunc","fromRight","collection","iteratee","length","index","iterable","Object"],"sources":["D:/language/VScode/Front-end logistics/node_modules/lodash-es/_createBaseEach.js"],"sourcesContent":["import isArrayLike from './isArrayLike.js';\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nexport default createBaseEach;\n"],"mappings":"AAAA,OAAOA,WAAW,MAAM,kBAAkB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,cAAcA,CAACC,QAAQ,EAAEC,SAAS,EAAE;EAC3C,OAAO,UAASC,UAAU,EAAEC,QAAQ,EAAE;IACpC,IAAID,UAAU,IAAI,IAAI,EAAE;MACtB,OAAOA,UAAU;IACnB;IACA,IAAI,CAACJ,WAAW,CAACI,UAAU,CAAC,EAAE;MAC5B,OAAOF,QAAQ,CAACE,UAAU,EAAEC,QAAQ,CAAC;IACvC;IACA,IAAIC,MAAM,GAAGF,UAAU,CAACE,MAAM;MAC1BC,KAAK,GAAGJ,SAAS,GAAGG,MAAM,GAAG,CAAC,CAAC;MAC/BE,QAAQ,GAAGC,MAAM,CAACL,UAAU,CAAC;IAEjC,OAAQD,SAAS,GAAGI,KAAK,EAAE,GAAG,EAAEA,KAAK,GAAGD,MAAM,EAAG;MAC/C,IAAID,QAAQ,CAACG,QAAQ,CAACD,KAAK,CAAC,EAAEA,KAAK,EAAEC,QAAQ,CAAC,KAAK,KAAK,EAAE;QACxD;MACF;IACF;IACA,OAAOJ,UAAU;EACnB,CAAC;AACH;AAEA,eAAeH,cAAc","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}