From bbd78fee4d19447c25d4fa61e4e57ac0bf741024 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 26 Jan 2016 01:49:35 -0800 Subject: [PATCH] Bump to v4.1.0. --- README.md | 22 +- internal/Hash.js => _Hash.js | 2 +- internal/LazyWrapper.js => _LazyWrapper.js | 4 +- .../LodashWrapper.js => _LodashWrapper.js | 4 +- internal/Map.js => _Map.js | 2 +- internal/MapCache.js => _MapCache.js | 10 +- internal/Reflect.js => _Reflect.js | 0 internal/Set.js => _Set.js | 2 +- internal/SetCache.js => _SetCache.js | 4 +- internal/Stack.js => _Stack.js | 10 +- internal/Symbol.js => _Symbol.js | 0 internal/Uint8Array.js => _Uint8Array.js | 0 internal/WeakMap.js => _WeakMap.js | 2 +- internal/addMapEntry.js => _addMapEntry.js | 0 internal/addSetEntry.js => _addSetEntry.js | 0 internal/apply.js => _apply.js | 0 _arrayAggregator.js | 22 + internal/arrayConcat.js => _arrayConcat.js | 0 internal/arrayEach.js => _arrayEach.js | 0 .../arrayEachRight.js => _arrayEachRight.js | 0 internal/arrayEvery.js => _arrayEvery.js | 0 internal/arrayFilter.js => _arrayFilter.js | 0 .../arrayIncludes.js => _arrayIncludes.js | 2 +- ...ayIncludesWith.js => _arrayIncludesWith.js | 0 internal/arrayMap.js => _arrayMap.js | 0 internal/arrayPush.js => _arrayPush.js | 0 internal/arrayReduce.js => _arrayReduce.js | 0 ...rrayReduceRight.js => _arrayReduceRight.js | 0 internal/arraySome.js => _arraySome.js | 0 ...ssignInDefaults.js => _assignInDefaults.js | 2 +- ...ssignMergeValue.js => _assignMergeValue.js | 2 +- internal/assignValue.js => _assignValue.js | 2 +- internal/assocDelete.js => _assocDelete.js | 2 +- internal/assocGet.js => _assocGet.js | 2 +- internal/assocHas.js => _assocHas.js | 2 +- internal/assocIndexOf.js => _assocIndexOf.js | 2 +- internal/assocSet.js => _assocSet.js | 2 +- _baseAggregator.js | 21 + internal/baseAssign.js => _baseAssign.js | 4 +- internal/baseAt.js => _baseAt.js | 2 +- internal/baseClamp.js => _baseClamp.js | 0 internal/baseClone.js => _baseClone.js | 28 +- internal/baseConforms.js => _baseConforms.js | 2 +- internal/baseCreate.js => _baseCreate.js | 2 +- internal/baseDelay.js => _baseDelay.js | 0 .../baseDifference.js => _baseDifference.js | 12 +- internal/baseEach.js => _baseEach.js | 4 +- .../baseEachRight.js => _baseEachRight.js | 4 +- internal/baseEvery.js => _baseEvery.js | 2 +- internal/baseExtremum.js => _baseExtremum.js | 0 internal/baseFill.js => _baseFill.js | 4 +- internal/baseFilter.js => _baseFilter.js | 2 +- internal/baseFind.js => _baseFind.js | 0 .../baseFindIndex.js => _baseFindIndex.js | 0 internal/baseFlatten.js => _baseFlatten.js | 8 +- internal/baseFor.js => _baseFor.js | 2 +- internal/baseForIn.js => _baseForIn.js | 4 +- internal/baseForOwn.js => _baseForOwn.js | 4 +- .../baseForOwnRight.js => _baseForOwnRight.js | 4 +- internal/baseForRight.js => _baseForRight.js | 2 +- .../baseFunctions.js => _baseFunctions.js | 4 +- internal/baseGet.js => _baseGet.js | 4 +- internal/baseHas.js => _baseHas.js | 0 internal/baseHasIn.js => _baseHasIn.js | 0 internal/baseInRange.js => _baseInRange.js | 0 internal/baseIndexOf.js => _baseIndexOf.js | 2 +- ...aseIntersection.js => _baseIntersection.js | 12 +- _baseInverter.js | 21 + internal/baseInvoke.js => _baseInvoke.js | 10 +- internal/baseIsEqual.js => _baseIsEqual.js | 6 +- .../baseIsEqualDeep.js => _baseIsEqualDeep.js | 16 +- internal/baseIsMatch.js => _baseIsMatch.js | 4 +- internal/baseIteratee.js => _baseIteratee.js | 10 +- internal/baseKeys.js => _baseKeys.js | 0 internal/baseKeysIn.js => _baseKeysIn.js | 4 +- internal/baseLodash.js => _baseLodash.js | 0 internal/baseMap.js => _baseMap.js | 4 +- internal/baseMatches.js => _baseMatches.js | 4 +- ...chesProperty.js => _baseMatchesProperty.js | 6 +- internal/baseMerge.js => _baseMerge.js | 16 +- .../baseMergeDeep.js => _baseMergeDeep.js | 26 +- internal/baseOrderBy.js => _baseOrderBy.js | 10 +- internal/basePick.js => _basePick.js | 2 +- internal/basePickBy.js => _basePickBy.js | 2 +- internal/baseProperty.js => _baseProperty.js | 0 ...asePropertyDeep.js => _basePropertyDeep.js | 2 +- internal/basePullAll.js => _basePullAll.js | 2 +- .../basePullAllBy.js => _basePullAllBy.js | 4 +- internal/basePullAt.js => _basePullAt.js | 10 +- internal/baseRandom.js => _baseRandom.js | 0 internal/baseRange.js => _baseRange.js | 0 internal/baseReduce.js => _baseReduce.js | 0 internal/baseSet.js => _baseSet.js | 10 +- internal/baseSetData.js => _baseSetData.js | 4 +- internal/baseSlice.js => _baseSlice.js | 0 internal/baseSome.js => _baseSome.js | 2 +- internal/baseSortBy.js => _baseSortBy.js | 0 .../baseSortedIndex.js => _baseSortedIndex.js | 4 +- ...eSortedIndexBy.js => _baseSortedIndexBy.js | 0 .../baseSortedUniq.js => _baseSortedUniq.js | 2 +- ...aseSortedUniqBy.js => _baseSortedUniqBy.js | 2 +- internal/baseSum.js => _baseSum.js | 2 +- internal/baseTimes.js => _baseTimes.js | 0 internal/baseToPairs.js => _baseToPairs.js | 2 +- internal/baseToPath.js => _baseToPath.js | 4 +- internal/baseUnary.js => _baseUnary.js | 0 internal/baseUniq.js => _baseUniq.js | 12 +- internal/baseUnset.js => _baseUnset.js | 10 +- internal/baseValues.js => _baseValues.js | 2 +- internal/baseWhile.js => _baseWhile.js | 2 +- ...aseWrapperValue.js => _baseWrapperValue.js | 6 +- internal/baseXor.js => _baseXor.js | 6 +- _baseZipObject.js | 22 + internal/cacheHas.js => _cacheHas.js | 2 +- internal/cachePush.js => _cachePush.js | 2 +- .../charsEndIndex.js => _charsEndIndex.js | 2 +- .../charsStartIndex.js => _charsStartIndex.js | 2 +- internal/cloneBuffer.js => _cloneBuffer.js | 2 +- internal/cloneMap.js => _cloneMap.js | 6 +- internal/cloneRegExp.js => _cloneRegExp.js | 0 internal/cloneSet.js => _cloneSet.js | 6 +- internal/cloneSymbol.js => _cloneSymbol.js | 2 +- .../cloneTypedArray.js => _cloneTypedArray.js | 2 +- ...ompareAscending.js => _compareAscending.js | 0 .../compareMultiple.js => _compareMultiple.js | 2 +- internal/composeArgs.js => _composeArgs.js | 0 ...omposeArgsRight.js => _composeArgsRight.js | 0 internal/copyArray.js => _copyArray.js | 0 internal/copyObject.js => _copyObject.js | 2 +- .../copyObjectWith.js => _copyObjectWith.js | 2 +- internal/copySymbols.js => _copySymbols.js | 4 +- _createAggregator.js | 23 + .../createAssigner.js => _createAssigner.js | 4 +- .../createBaseEach.js => _createBaseEach.js | 2 +- .../createBaseFor.js => _createBaseFor.js | 0 ...ateBaseWrapper.js => _createBaseWrapper.js | 2 +- .../createCaseFirst.js => _createCaseFirst.js | 4 +- ...reateCompounder.js => _createCompounder.js | 6 +- ...ateCtorWrapper.js => _createCtorWrapper.js | 4 +- ...eCurryWrapper.js => _createCurryWrapper.js | 10 +- internal/createFlow.js => _createFlow.js | 14 +- ...ybridWrapper.js => _createHybridWrapper.js | 12 +- _createInverter.js | 17 + internal/createOver.js => _createOver.js | 10 +- .../createPadding.js => _createPadding.js | 8 +- ...tialWrapper.js => _createPartialWrapper.js | 4 +- internal/createRange.js => _createRange.js | 6 +- ...urryWrapper.js => _createRecurryWrapper.js | 6 +- internal/createRound.js => _createRound.js | 6 +- internal/createSet.js => _createSet.js | 4 +- .../createWrapper.js => _createWrapper.js | 18 +- internal/deburrLetter.js => _deburrLetter.js | 0 internal/equalArrays.js => _equalArrays.js | 2 +- internal/equalByTag.js => _equalByTag.js | 8 +- internal/equalObjects.js => _equalObjects.js | 4 +- .../escapeHtmlChar.js => _escapeHtmlChar.js | 0 ...scapeStringChar.js => _escapeStringChar.js | 0 internal/getData.js => _getData.js | 4 +- internal/getFuncName.js => _getFuncName.js | 2 +- internal/getLength.js => _getLength.js | 2 +- internal/getMatchData.js => _getMatchData.js | 4 +- internal/getNative.js => _getNative.js | 2 +- internal/getSymbols.js => _getSymbols.js | 0 internal/getTag.js => _getTag.js | 4 +- internal/getView.js => _getView.js | 0 internal/hasPath.js => _hasPath.js | 25 +- internal/hashDelete.js => _hashDelete.js | 2 +- internal/hashGet.js => _hashGet.js | 2 +- internal/hashHas.js => _hashHas.js | 2 +- internal/hashSet.js => _hashSet.js | 2 +- internal/indexKeys.js => _indexKeys.js | 18 +- internal/indexOfNaN.js => _indexOfNaN.js | 0 .../initCloneArray.js => _initCloneArray.js | 0 .../initCloneByTag.js => _initCloneByTag.js | 12 +- .../initCloneObject.js => _initCloneObject.js | 8 +- internal/isHostObject.js => _isHostObject.js | 0 internal/isIndex.js => _isIndex.js | 0 .../isIterateeCall.js => _isIterateeCall.js | 8 +- internal/isKey.js => _isKey.js | 2 +- internal/isKeyable.js => _isKeyable.js | 0 internal/isLaziable.js => _isLaziable.js | 8 +- internal/isPrototype.js => _isPrototype.js | 0 ...ictComparable.js => _isStrictComparable.js | 2 +- .../iteratorToArray.js => _iteratorToArray.js | 0 internal/lazyClone.js => _lazyClone.js | 4 +- internal/lazyReverse.js => _lazyReverse.js | 2 +- internal/lazyValue.js => _lazyValue.js | 6 +- internal/mapClear.js => _mapClear.js | 4 +- internal/mapDelete.js => _mapDelete.js | 8 +- internal/mapGet.js => _mapGet.js | 8 +- internal/mapHas.js => _mapHas.js | 8 +- internal/mapSet.js => _mapSet.js | 8 +- internal/mapToArray.js => _mapToArray.js | 0 internal/mergeData.js => _mergeData.js | 8 +- .../mergeDefaults.js => _mergeDefaults.js | 4 +- internal/metaMap.js => _metaMap.js | 2 +- internal/nativeCreate.js => _nativeCreate.js | 2 +- internal/parent.js => _parent.js | 4 +- internal/reEscape.js => _reEscape.js | 0 internal/reEvaluate.js => _reEvaluate.js | 0 .../reInterpolate.js => _reInterpolate.js | 0 internal/realNames.js => _realNames.js | 0 internal/reorder.js => _reorder.js | 4 +- .../replaceHolders.js => _replaceHolders.js | 0 internal/setData.js => _setData.js | 4 +- internal/setToArray.js => _setToArray.js | 0 internal/stackClear.js => _stackClear.js | 0 internal/stackDelete.js => _stackDelete.js | 2 +- internal/stackGet.js => _stackGet.js | 2 +- internal/stackHas.js => _stackHas.js | 2 +- internal/stackSet.js => _stackSet.js | 4 +- internal/stringSize.js => _stringSize.js | 0 .../stringToArray.js => _stringToArray.js | 0 internal/stringToPath.js => _stringToPath.js | 2 +- ...rrayLikeObject.js => _toArrayLikeObject.js | 2 +- internal/toFunction.js => _toFunction.js | 2 +- ...nescapeHtmlChar.js => _unescapeHtmlChar.js | 0 internal/wrapperClone.js => _wrapperClone.js | 6 +- array.js | 1 + ary.js | 2 +- assign.js | 4 +- assignIn.js | 4 +- assignInWith.js | 4 +- assignWith.js | 4 +- at.js | 4 +- attempt.js | 2 +- bind.js | 4 +- bindAll.js | 4 +- bindKey.js | 4 +- camelCase.js | 2 +- ceil.js | 2 +- chunk.js | 2 +- clamp.js | 2 +- clone.js | 2 +- cloneDeep.js | 2 +- cloneDeepWith.js | 2 +- cloneWith.js | 2 +- commit.js | 2 +- concat.js | 4 +- cond.js | 6 +- conforms.js | 4 +- core.js | 110 ++--- countBy.js | 2 +- create.js | 4 +- curry.js | 2 +- curryRight.js | 2 +- deburr.js | 2 +- defaults.js | 4 +- defaultsDeep.js | 4 +- defer.js | 2 +- delay.js | 2 +- difference.js | 4 +- differenceBy.js | 6 +- differenceWith.js | 4 +- drop.js | 2 +- dropRight.js | 2 +- dropRightWhile.js | 4 +- dropWhile.js | 4 +- endsWith.js | 2 +- escape.js | 2 +- every.js | 8 +- fill.js | 4 +- filter.js | 6 +- find.js | 8 +- findIndex.js | 4 +- findKey.js | 6 +- findLast.js | 8 +- findLastIndex.js | 4 +- findLastKey.js | 6 +- flatMap.js | 6 +- flatten.js | 2 +- flattenDeep.js | 2 +- flip.js | 2 +- floor.js | 2 +- flow.js | 2 +- flowRight.js | 2 +- forEach.js | 6 +- forEachRight.js | 6 +- forIn.js | 4 +- forInRight.js | 4 +- forOwn.js | 4 +- forOwnRight.js | 4 +- fp/_baseConvert.js | 3 +- fp/_mapping.js | 404 +++++++++--------- fp/_util.js | 4 +- fp/add.js | 2 + fp/after.js | 2 + fp/all.js | 1 + fp/allPass.js | 1 + fp/apply.js | 1 + fp/array.js | 2 + fp/ary.js | 2 + fp/assign.js | 2 + fp/assignIn.js | 2 + fp/assignInWith.js | 2 + fp/assignWith.js | 2 + fp/at.js | 2 + fp/attempt.js | 2 + fp/before.js | 2 + fp/bind.js | 2 + fp/bindAll.js | 1 + fp/bindKey.js | 2 + fp/camelCase.js | 1 + fp/capitalize.js | 1 + fp/ceil.js | 2 + fp/chain.js | 1 + fp/chunk.js | 2 + fp/clamp.js | 2 + fp/clone.js | 1 + fp/cloneDeep.js | 1 + fp/cloneDeepWith.js | 2 + fp/cloneWith.js | 2 + fp/collection.js | 2 + fp/commit.js | 1 + fp/compact.js | 1 + fp/compose.js | 1 + fp/concat.js | 2 + fp/cond.js | 1 + fp/conforms.js | 1 + fp/constant.js | 1 + fp/contains.js | 1 + fp/countBy.js | 2 + fp/create.js | 2 + fp/curry.js | 2 + fp/curryN.js | 2 + fp/curryRight.js | 2 + fp/curryRightN.js | 2 + fp/date.js | 2 + fp/debounce.js | 2 + fp/deburr.js | 1 + fp/defaults.js | 2 + fp/defaultsDeep.js | 2 + fp/defer.js | 1 + fp/delay.js | 2 + fp/difference.js | 2 + fp/differenceBy.js | 2 + fp/differenceWith.js | 2 + fp/dissoc.js | 1 + fp/drop.js | 2 + fp/dropRight.js | 2 + fp/dropRightWhile.js | 2 + fp/dropWhile.js | 2 + fp/each.js | 1 + fp/eachRight.js | 1 + fp/endsWith.js | 2 + fp/eq.js | 2 + fp/equals.js | 1 + fp/escape.js | 1 + fp/escapeRegExp.js | 1 + fp/every.js | 2 + fp/extend.js | 1 + fp/extendWith.js | 1 + fp/fill.js | 2 + fp/filter.js | 2 + fp/find.js | 2 + fp/findIndex.js | 2 + fp/findKey.js | 2 + fp/findLast.js | 2 + fp/findLastIndex.js | 2 + fp/findLastKey.js | 2 + fp/first.js | 1 + fp/flatMap.js | 2 + fp/flatten.js | 1 + fp/flattenDeep.js | 1 + fp/flip.js | 1 + fp/floor.js | 2 + fp/flow.js | 1 + fp/flowRight.js | 1 + fp/forEach.js | 2 + fp/forEachRight.js | 2 + fp/forIn.js | 2 + fp/forInRight.js | 2 + fp/forOwn.js | 2 + fp/forOwnRight.js | 2 + fp/fromPairs.js | 2 + fp/function.js | 2 + fp/functions.js | 1 + fp/functionsIn.js | 1 + fp/get.js | 2 + fp/getOr.js | 2 + fp/groupBy.js | 2 + fp/gt.js | 2 + fp/gte.js | 2 + fp/has.js | 2 + fp/hasIn.js | 2 + fp/head.js | 1 + fp/identity.js | 1 + fp/inRange.js | 2 + fp/includes.js | 2 + fp/indexOf.js | 2 + fp/init.js | 1 + fp/initial.js | 1 + fp/intersection.js | 2 + fp/intersectionBy.js | 2 + fp/intersectionWith.js | 2 + fp/invert.js | 2 + fp/invertBy.js | 2 + fp/invoke.js | 2 + fp/invokeMap.js | 2 + fp/isArguments.js | 1 + fp/isArray.js | 1 + fp/isArrayLike.js | 1 + fp/isArrayLikeObject.js | 1 + fp/isBoolean.js | 1 + fp/isDate.js | 1 + fp/isElement.js | 1 + fp/isEmpty.js | 1 + fp/isEqual.js | 2 + fp/isEqualWith.js | 2 + fp/isError.js | 1 + fp/isFinite.js | 1 + fp/isFunction.js | 1 + fp/isInteger.js | 1 + fp/isLength.js | 1 + fp/isMatch.js | 2 + fp/isMatchWith.js | 2 + fp/isNaN.js | 1 + fp/isNative.js | 1 + fp/isNil.js | 1 + fp/isNull.js | 1 + fp/isNumber.js | 1 + fp/isObject.js | 1 + fp/isObjectLike.js | 1 + fp/isPlainObject.js | 1 + fp/isRegExp.js | 1 + fp/isSafeInteger.js | 1 + fp/isString.js | 1 + fp/isSymbol.js | 1 + fp/isTypedArray.js | 1 + fp/isUndefined.js | 1 + fp/iteratee.js | 2 + fp/join.js | 2 + fp/kebabCase.js | 1 + fp/keyBy.js | 2 + fp/keys.js | 1 + fp/keysIn.js | 1 + fp/lang.js | 2 + fp/last.js | 1 + fp/lastIndexOf.js | 2 + fp/lowerCase.js | 1 + fp/lowerFirst.js | 1 + fp/lt.js | 2 + fp/lte.js | 2 + fp/map.js | 2 + fp/mapKeys.js | 2 + fp/mapObj.js | 1 + fp/mapValues.js | 2 + fp/matches.js | 1 + fp/matchesProperty.js | 2 + fp/math.js | 2 + fp/max.js | 1 + fp/maxBy.js | 2 + fp/mean.js | 1 + fp/memoize.js | 2 + fp/merge.js | 2 + fp/mergeWith.js | 2 + fp/method.js | 2 + fp/methodOf.js | 2 + fp/min.js | 1 + fp/minBy.js | 2 + fp/mixin.js | 2 + fp/nAry.js | 1 + fp/negate.js | 1 + fp/next.js | 1 + fp/noop.js | 1 + fp/now.js | 1 + fp/nthArg.js | 1 + fp/number.js | 2 + fp/object.js | 2 + fp/omit.js | 2 + fp/omitAll.js | 1 + fp/omitBy.js | 2 + fp/once.js | 1 + fp/orderBy.js | 2 + fp/over.js | 2 + fp/overArgs.js | 2 + fp/overEvery.js | 2 + fp/overSome.js | 2 + fp/pad.js | 2 + fp/padEnd.js | 2 + fp/padStart.js | 2 + fp/parseInt.js | 2 + fp/partial.js | 1 + fp/partialRight.js | 1 + fp/partition.js | 2 + fp/path.js | 1 + fp/pathEq.js | 1 + fp/pathOr.js | 1 + fp/pick.js | 2 + fp/pickAll.js | 1 + fp/pickBy.js | 2 + fp/pipe.js | 1 + fp/plant.js | 1 + fp/prop.js | 1 + fp/propOf.js | 1 + fp/propOr.js | 1 + fp/property.js | 1 + fp/propertyOf.js | 1 + fp/pull.js | 2 + fp/pullAll.js | 2 + fp/pullAllBy.js | 2 + fp/pullAt.js | 2 + fp/random.js | 2 + fp/range.js | 2 + fp/rangeRight.js | 2 + fp/rearg.js | 2 + fp/reduce.js | 2 + fp/reduceRight.js | 2 + fp/reject.js | 2 + fp/remove.js | 2 + fp/repeat.js | 2 + fp/replace.js | 2 + fp/rest.js | 2 + fp/result.js | 2 + fp/reverse.js | 2 + fp/round.js | 2 + fp/sample.js | 1 + fp/sampleSize.js | 2 + fp/seq.js | 2 + fp/set.js | 2 + fp/setWith.js | 2 + fp/shuffle.js | 1 + fp/size.js | 1 + fp/slice.js | 2 + fp/snakeCase.js | 1 + fp/some.js | 2 + fp/somePass.js | 1 + fp/sortBy.js | 2 + fp/sortedIndex.js | 2 + fp/sortedIndexBy.js | 2 + fp/sortedIndexOf.js | 2 + fp/sortedLastIndex.js | 2 + fp/sortedLastIndexBy.js | 2 + fp/sortedLastIndexOf.js | 2 + fp/sortedUniq.js | 1 + fp/sortedUniqBy.js | 2 + fp/split.js | 2 + fp/spread.js | 1 + fp/startCase.js | 1 + fp/startsWith.js | 2 + fp/string.js | 2 + fp/subtract.js | 2 + fp/sum.js | 1 + fp/sumBy.js | 2 + fp/tail.js | 1 + fp/take.js | 2 + fp/takeRight.js | 2 + fp/takeRightWhile.js | 2 + fp/takeWhile.js | 2 + fp/tap.js | 2 + fp/template.js | 2 + fp/templateSettings.js | 1 + fp/throttle.js | 2 + fp/thru.js | 2 + fp/times.js | 2 + fp/toArray.js | 1 + fp/toInteger.js | 1 + fp/toIterator.js | 1 + fp/toJSON.js | 1 + fp/toLength.js | 1 + fp/toLower.js | 1 + fp/toNumber.js | 1 + fp/toPairs.js | 1 + fp/toPairsIn.js | 1 + fp/toPath.js | 1 + fp/toPlainObject.js | 1 + fp/toSafeInteger.js | 1 + fp/toString.js | 1 + fp/toUpper.js | 1 + fp/transform.js | 2 + fp/trim.js | 2 + fp/trimEnd.js | 2 + fp/trimStart.js | 2 + fp/truncate.js | 2 + fp/unapply.js | 1 + fp/unary.js | 1 + fp/unescape.js | 1 + fp/union.js | 2 + fp/unionBy.js | 2 + fp/unionWith.js | 2 + fp/uniq.js | 1 + fp/uniqBy.js | 2 + fp/uniqWith.js | 2 + fp/uniqueId.js | 2 + fp/unnest.js | 1 + fp/unset.js | 2 + fp/unzip.js | 1 + fp/unzipWith.js | 2 + fp/upperCase.js | 1 + fp/upperFirst.js | 1 + fp/useWith.js | 1 + fp/util.js | 2 + fp/value.js | 1 + fp/valueOf.js | 1 + fp/values.js | 1 + fp/valuesIn.js | 1 + fp/whereEq.js | 1 + fp/without.js | 2 + fp/words.js | 2 + fp/wrap.js | 2 + fp/wrapperAt.js | 1 + fp/wrapperChain.js | 1 + fp/wrapperFlatMap.js | 1 + fp/wrapperLodash.js | 1 + fp/wrapperReverse.js | 1 + fp/wrapperValue.js | 1 + fp/xor.js | 2 + fp/xorBy.js | 2 + fp/xorWith.js | 2 + fp/zip.js | 2 + fp/zipObj.js | 1 + fp/zipObject.js | 2 + fp/zipObjectDeep.js | 2 + fp/zipWith.js | 2 + functions.js | 2 +- functionsIn.js | 2 +- get.js | 2 +- groupBy.js | 2 +- has.js | 4 +- hasIn.js | 4 +- inRange.js | 2 +- includes.js | 2 +- index.js | 2 +- indexOf.js | 2 +- internal/createAggregator.js | 35 -- intersection.js | 6 +- intersectionBy.js | 8 +- intersectionWith.js | 6 +- invert.js | 38 +- invertBy.js | 43 ++ invoke.js | 2 +- invokeMap.js | 8 +- isArrayLike.js | 2 +- isEmpty.js | 28 +- isEqual.js | 2 +- isEqualWith.js | 2 +- isMatch.js | 4 +- isMatchWith.js | 4 +- isNative.js | 2 +- isObject.js | 2 - isPlainObject.js | 2 +- iteratee.js | 2 +- kebabCase.js | 2 +- keyBy.js | 8 +- keys.js | 10 +- keysIn.js | 8 +- lastIndexOf.js | 2 +- lodash.js | 297 +++++++++---- lowerCase.js | 2 +- lowerFirst.js | 2 +- map.js | 6 +- mapKeys.js | 4 +- mapValues.js | 4 +- matches.js | 4 +- matchesProperty.js | 4 +- max.js | 2 +- maxBy.js | 4 +- memoize.js | 2 +- merge.js | 4 +- mergeWith.js | 4 +- method.js | 2 +- methodOf.js | 2 +- min.js | 2 +- minBy.js | 4 +- mixin.js | 8 +- object.js | 1 + omit.js | 8 +- omitBy.js | 4 +- orderBy.js | 2 +- over.js | 4 +- overArgs.js | 8 +- overEvery.js | 4 +- overSome.js | 4 +- package.json | 2 +- pad.js | 4 +- padEnd.js | 2 +- padStart.js | 2 +- partial.js | 4 +- partialRight.js | 4 +- partition.js | 2 +- pick.js | 4 +- pickBy.js | 4 +- plant.js | 4 +- property.js | 6 +- propertyOf.js | 2 +- pullAll.js | 2 +- pullAllBy.js | 4 +- pullAt.js | 10 +- random.js | 4 +- range.js | 2 +- rangeRight.js | 2 +- rearg.js | 4 +- reduce.js | 10 +- reduceRight.js | 8 +- reject.js | 6 +- remove.js | 4 +- rest.js | 2 +- result.js | 6 +- round.js | 2 +- sample.js | 2 +- sampleSize.js | 4 +- set.js | 2 +- setWith.js | 2 +- size.js | 2 +- slice.js | 4 +- snakeCase.js | 2 +- some.js | 8 +- sortBy.js | 6 +- sortedIndex.js | 2 +- sortedIndexBy.js | 4 +- sortedIndexOf.js | 2 +- sortedLastIndex.js | 2 +- sortedLastIndexBy.js | 4 +- sortedLastIndexOf.js | 2 +- sortedUniq.js | 2 +- sortedUniqBy.js | 4 +- spread.js | 2 +- startCase.js | 2 +- startsWith.js | 2 +- sum.js | 4 +- sumBy.js | 6 +- take.js | 2 +- takeRight.js | 2 +- takeRightWhile.js | 4 +- takeWhile.js | 4 +- template.js | 10 +- templateSettings.js | 6 +- times.js | 4 +- toArray.js | 14 +- toLength.js | 2 +- toPairs.js | 2 +- toPairsIn.js | 2 +- toPath.js | 4 +- toPlainObject.js | 2 +- toSafeInteger.js | 2 +- toString.js | 2 +- transform.js | 12 +- trim.js | 6 +- trimEnd.js | 4 +- trimStart.js | 4 +- truncate.js | 4 +- unescape.js | 2 +- union.js | 4 +- unionBy.js | 6 +- unionWith.js | 4 +- uniq.js | 2 +- uniqBy.js | 4 +- uniqWith.js | 2 +- unset.js | 2 +- unzip.js | 8 +- unzipWith.js | 4 +- upperCase.js | 2 +- upperFirst.js | 2 +- values.js | 2 +- valuesIn.js | 2 +- without.js | 2 +- wrapperAt.js | 10 +- wrapperLodash.js | 37 +- wrapperReverse.js | 4 +- wrapperValue.js | 2 +- xor.js | 4 +- xorBy.js | 6 +- xorWith.js | 4 +- zipObject.js | 17 +- zipObjectDeep.js | 22 + 765 files changed, 1993 insertions(+), 1233 deletions(-) rename internal/Hash.js => _Hash.js (88%) rename internal/LazyWrapper.js => _LazyWrapper.js (87%) rename internal/LodashWrapper.js => _LodashWrapper.js (85%) rename internal/Map.js => _Map.js (75%) rename internal/MapCache.js => _MapCache.js (75%) rename internal/Reflect.js => _Reflect.js (100%) rename internal/Set.js => _Set.js (75%) rename internal/SetCache.js => _SetCache.js (83%) rename internal/Stack.js => _Stack.js (73%) rename internal/Symbol.js => _Symbol.js (100%) rename internal/Uint8Array.js => _Uint8Array.js (100%) rename internal/WeakMap.js => _WeakMap.js (76%) rename internal/addMapEntry.js => _addMapEntry.js (100%) rename internal/addSetEntry.js => _addSetEntry.js (100%) rename internal/apply.js => _apply.js (100%) create mode 100644 _arrayAggregator.js rename internal/arrayConcat.js => _arrayConcat.js (100%) rename internal/arrayEach.js => _arrayEach.js (100%) rename internal/arrayEachRight.js => _arrayEachRight.js (100%) rename internal/arrayEvery.js => _arrayEvery.js (100%) rename internal/arrayFilter.js => _arrayFilter.js (100%) rename internal/arrayIncludes.js => _arrayIncludes.js (90%) rename internal/arrayIncludesWith.js => _arrayIncludesWith.js (100%) rename internal/arrayMap.js => _arrayMap.js (100%) rename internal/arrayPush.js => _arrayPush.js (100%) rename internal/arrayReduce.js => _arrayReduce.js (100%) rename internal/arrayReduceRight.js => _arrayReduceRight.js (100%) rename internal/arraySome.js => _arraySome.js (100%) rename internal/assignInDefaults.js => _assignInDefaults.js (96%) rename internal/assignMergeValue.js => _assignMergeValue.js (94%) rename internal/assignValue.js => _assignValue.js (96%) rename internal/assocDelete.js => _assocDelete.js (93%) rename internal/assocGet.js => _assocGet.js (88%) rename internal/assocHas.js => _assocHas.js (88%) rename internal/assocIndexOf.js => _assocIndexOf.js (94%) rename internal/assocSet.js => _assocSet.js (89%) create mode 100644 _baseAggregator.js rename internal/baseAssign.js => _baseAssign.js (84%) rename internal/baseAt.js => _baseAt.js (95%) rename internal/baseClamp.js => _baseClamp.js (100%) rename internal/baseClone.js => _baseClone.js (85%) rename internal/baseConforms.js => _baseConforms.js (95%) rename internal/baseCreate.js => _baseCreate.js (93%) rename internal/baseDelay.js => _baseDelay.js (100%) rename internal/baseDifference.js => _baseDifference.js (85%) rename internal/baseEach.js => _baseEach.js (79%) rename internal/baseEachRight.js => _baseEachRight.js (78%) rename internal/baseEvery.js => _baseEvery.js (93%) rename internal/baseExtremum.js => _baseExtremum.js (100%) rename internal/baseFill.js => _baseFill.js (90%) rename internal/baseFilter.js => _baseFilter.js (93%) rename internal/baseFind.js => _baseFind.js (100%) rename internal/baseFindIndex.js => _baseFindIndex.js (100%) rename internal/baseFlatten.js => _baseFlatten.js (84%) rename internal/baseFor.js => _baseFor.js (91%) rename internal/baseForIn.js => _baseForIn.js (85%) rename internal/baseForOwn.js => _baseForOwn.js (85%) rename internal/baseForOwnRight.js => _baseForOwnRight.js (84%) rename internal/baseForRight.js => _baseForRight.js (89%) rename internal/baseFunctions.js => _baseFunctions.js (85%) rename internal/baseGet.js => _baseGet.js (88%) rename internal/baseHas.js => _baseHas.js (100%) rename internal/baseHasIn.js => _baseHasIn.js (100%) rename internal/baseInRange.js => _baseInRange.js (100%) rename internal/baseIndexOf.js => _baseIndexOf.js (93%) rename internal/baseIntersection.js => _baseIntersection.js (86%) create mode 100644 _baseInverter.js rename internal/baseInvoke.js => _baseInvoke.js (79%) rename internal/baseIsEqual.js => _baseIsEqual.js (87%) rename internal/baseIsEqualDeep.js => _baseIsEqualDeep.js (88%) rename internal/baseIsMatch.js => _baseIsMatch.js (95%) rename internal/baseIteratee.js => _baseIteratee.js (70%) rename internal/baseKeys.js => _baseKeys.js (100%) rename internal/baseKeysIn.js => _baseKeysIn.js (91%) rename internal/baseLodash.js => _baseLodash.js (100%) rename internal/baseMap.js => _baseMap.js (87%) rename internal/baseMatches.js => _baseMatches.js (88%) rename internal/baseMatchesProperty.js => _baseMatchesProperty.js (87%) rename internal/baseMerge.js => _baseMerge.js (78%) rename internal/baseMergeDeep.js => _baseMergeDeep.js (77%) rename internal/baseOrderBy.js => _baseOrderBy.js (81%) rename internal/basePick.js => _basePick.js (91%) rename internal/basePickBy.js => _basePickBy.js (92%) rename internal/baseProperty.js => _baseProperty.js (100%) rename internal/basePropertyDeep.js => _basePropertyDeep.js (90%) rename internal/basePullAll.js => _basePullAll.js (86%) rename internal/basePullAllBy.js => _basePullAllBy.js (92%) rename internal/basePullAt.js => _basePullAt.js (85%) rename internal/baseRandom.js => _baseRandom.js (100%) rename internal/baseRange.js => _baseRange.js (100%) rename internal/baseReduce.js => _baseReduce.js (100%) rename internal/baseSet.js => _baseSet.js (84%) rename internal/baseSetData.js => _baseSetData.js (83%) rename internal/baseSlice.js => _baseSlice.js (100%) rename internal/baseSome.js => _baseSome.js (93%) rename internal/baseSortBy.js => _baseSortBy.js (100%) rename internal/baseSortedIndex.js => _baseSortedIndex.js (92%) rename internal/baseSortedIndexBy.js => _baseSortedIndexBy.js (100%) rename internal/baseSortedUniq.js => _baseSortedUniq.js (83%) rename internal/baseSortedUniqBy.js => _baseSortedUniqBy.js (96%) rename internal/baseSum.js => _baseSum.js (94%) rename internal/baseTimes.js => _baseTimes.js (100%) rename internal/baseToPairs.js => _baseToPairs.js (92%) rename internal/baseToPath.js => _baseToPath.js (80%) rename internal/baseUnary.js => _baseUnary.js (100%) rename internal/baseUniq.js => _baseUniq.js (85%) rename internal/baseUnset.js => _baseUnset.js (75%) rename internal/baseValues.js => _baseValues.js (92%) rename internal/baseWhile.js => _baseWhile.js (95%) rename internal/baseWrapperValue.js => _baseWrapperValue.js (84%) rename internal/baseXor.js => _baseXor.js (86%) create mode 100644 _baseZipObject.js rename internal/cacheHas.js => _cacheHas.js (93%) rename internal/cachePush.js => _cachePush.js (92%) rename internal/charsEndIndex.js => _charsEndIndex.js (92%) rename internal/charsStartIndex.js => _charsStartIndex.js (92%) rename internal/cloneBuffer.js => _cloneBuffer.js (90%) rename internal/cloneMap.js => _cloneMap.js (68%) rename internal/cloneRegExp.js => _cloneRegExp.js (100%) rename internal/cloneSet.js => _cloneSet.js (68%) rename internal/cloneSymbol.js => _cloneSymbol.js (93%) rename internal/cloneTypedArray.js => _cloneTypedArray.js (91%) rename internal/compareAscending.js => _compareAscending.js (100%) rename internal/compareMultiple.js => _compareMultiple.js (96%) rename internal/composeArgs.js => _composeArgs.js (100%) rename internal/composeArgsRight.js => _composeArgsRight.js (100%) rename internal/copyArray.js => _copyArray.js (100%) rename internal/copyObject.js => _copyObject.js (89%) rename internal/copyObjectWith.js => _copyObjectWith.js (94%) rename internal/copySymbols.js => _copySymbols.js (81%) create mode 100644 _createAggregator.js rename internal/createAssigner.js => _createAssigner.js (91%) rename internal/createBaseEach.js => _createBaseEach.js (94%) rename internal/createBaseFor.js => _createBaseFor.js (100%) rename internal/createBaseWrapper.js => _createBaseWrapper.js (93%) rename internal/createCaseFirst.js => _createCaseFirst.js (93%) rename internal/createCompounder.js => _createCompounder.js (76%) rename internal/createCtorWrapper.js => _createCtorWrapper.js (94%) rename internal/createCurryWrapper.js => _createCurryWrapper.js (81%) rename internal/createFlow.js => _createFlow.js (88%) rename internal/createHybridWrapper.js => _createHybridWrapper.js (89%) create mode 100644 _createInverter.js rename internal/createOver.js => _createOver.js (73%) rename internal/createPadding.js => _createPadding.js (90%) rename internal/createPartialWrapper.js => _createPartialWrapper.js (93%) rename internal/createRange.js => _createRange.js (85%) rename internal/createRecurryWrapper.js => _createRecurryWrapper.js (94%) rename internal/createRound.js => _createRound.js (87%) rename internal/createSet.js => _createSet.js (83%) rename internal/createWrapper.js => _createWrapper.js (88%) rename internal/deburrLetter.js => _deburrLetter.js (100%) rename internal/equalArrays.js => _equalArrays.js (98%) rename internal/equalByTag.js => _equalByTag.js (94%) rename internal/equalObjects.js => _equalObjects.js (97%) rename internal/escapeHtmlChar.js => _escapeHtmlChar.js (100%) rename internal/escapeStringChar.js => _escapeStringChar.js (100%) rename internal/getData.js => _getData.js (79%) rename internal/getFuncName.js => _getFuncName.js (94%) rename internal/getLength.js => _getLength.js (89%) rename internal/getMatchData.js => _getMatchData.js (81%) rename internal/getNative.js => _getNative.js (91%) rename internal/getSymbols.js => _getSymbols.js (100%) rename internal/getTag.js => _getTag.js (96%) rename internal/getView.js => _getView.js (100%) rename internal/hasPath.js => _hasPath.js (59%) rename internal/hashDelete.js => _hashDelete.js (90%) rename internal/hashGet.js => _hashGet.js (93%) rename internal/hashHas.js => _hashHas.js (92%) rename internal/hashSet.js => _hashSet.js (90%) rename internal/indexKeys.js => _indexKeys.js (51%) rename internal/indexOfNaN.js => _indexOfNaN.js (100%) rename internal/initCloneArray.js => _initCloneArray.js (100%) rename internal/initCloneByTag.js => _initCloneByTag.js (87%) rename internal/initCloneObject.js => _initCloneObject.js (64%) rename internal/isHostObject.js => _isHostObject.js (100%) rename internal/isIndex.js => _isIndex.js (100%) rename internal/isIterateeCall.js => _isIterateeCall.js (83%) rename internal/isKey.js => _isKey.js (94%) rename internal/isKeyable.js => _isKeyable.js (100%) rename internal/isLaziable.js => _isLaziable.js (76%) rename internal/isPrototype.js => _isPrototype.js (100%) rename internal/isStrictComparable.js => _isStrictComparable.js (90%) rename internal/iteratorToArray.js => _iteratorToArray.js (100%) rename internal/lazyClone.js => _lazyClone.js (86%) rename internal/lazyReverse.js => _lazyReverse.js (90%) rename internal/lazyValue.js => _lazyValue.js (93%) rename internal/mapClear.js => _mapClear.js (80%) rename internal/mapDelete.js => _mapDelete.js (75%) rename internal/mapGet.js => _mapGet.js (74%) rename internal/mapHas.js => _mapHas.js (76%) rename internal/mapSet.js => _mapSet.js (78%) rename internal/mapToArray.js => _mapToArray.js (100%) rename internal/mergeData.js => _mergeData.js (93%) rename internal/mergeDefaults.js => _mergeDefaults.js (90%) rename internal/metaMap.js => _metaMap.js (74%) rename internal/nativeCreate.js => _nativeCreate.js (78%) rename internal/parent.js => _parent.js (83%) rename internal/reEscape.js => _reEscape.js (100%) rename internal/reEvaluate.js => _reEvaluate.js (100%) rename internal/reInterpolate.js => _reInterpolate.js (100%) rename internal/realNames.js => _realNames.js (100%) rename internal/reorder.js => _reorder.js (91%) rename internal/replaceHolders.js => _replaceHolders.js (100%) rename internal/setData.js => _setData.js (93%) rename internal/setToArray.js => _setToArray.js (100%) rename internal/stackClear.js => _stackClear.js (100%) rename internal/stackDelete.js => _stackDelete.js (90%) rename internal/stackGet.js => _stackGet.js (90%) rename internal/stackHas.js => _stackHas.js (91%) rename internal/stackSet.js => _stackSet.js (90%) rename internal/stringSize.js => _stringSize.js (100%) rename internal/stringToArray.js => _stringToArray.js (100%) rename internal/stringToPath.js => _stringToPath.js (94%) rename internal/toArrayLikeObject.js => _toArrayLikeObject.js (84%) rename internal/toFunction.js => _toFunction.js (87%) rename internal/unescapeHtmlChar.js => _unescapeHtmlChar.js (100%) rename internal/wrapperClone.js => _wrapperClone.js (79%) create mode 100644 fp/add.js create mode 100644 fp/after.js create mode 100644 fp/all.js create mode 100644 fp/allPass.js create mode 100644 fp/apply.js create mode 100644 fp/array.js create mode 100644 fp/ary.js create mode 100644 fp/assign.js create mode 100644 fp/assignIn.js create mode 100644 fp/assignInWith.js create mode 100644 fp/assignWith.js create mode 100644 fp/at.js create mode 100644 fp/attempt.js create mode 100644 fp/before.js create mode 100644 fp/bind.js create mode 100644 fp/bindAll.js create mode 100644 fp/bindKey.js create mode 100644 fp/camelCase.js create mode 100644 fp/capitalize.js create mode 100644 fp/ceil.js create mode 100644 fp/chain.js create mode 100644 fp/chunk.js create mode 100644 fp/clamp.js create mode 100644 fp/clone.js create mode 100644 fp/cloneDeep.js create mode 100644 fp/cloneDeepWith.js create mode 100644 fp/cloneWith.js create mode 100644 fp/collection.js create mode 100644 fp/commit.js create mode 100644 fp/compact.js create mode 100644 fp/compose.js create mode 100644 fp/concat.js create mode 100644 fp/cond.js create mode 100644 fp/conforms.js create mode 100644 fp/constant.js create mode 100644 fp/contains.js create mode 100644 fp/countBy.js create mode 100644 fp/create.js create mode 100644 fp/curry.js create mode 100644 fp/curryN.js create mode 100644 fp/curryRight.js create mode 100644 fp/curryRightN.js create mode 100644 fp/date.js create mode 100644 fp/debounce.js create mode 100644 fp/deburr.js create mode 100644 fp/defaults.js create mode 100644 fp/defaultsDeep.js create mode 100644 fp/defer.js create mode 100644 fp/delay.js create mode 100644 fp/difference.js create mode 100644 fp/differenceBy.js create mode 100644 fp/differenceWith.js create mode 100644 fp/dissoc.js create mode 100644 fp/drop.js create mode 100644 fp/dropRight.js create mode 100644 fp/dropRightWhile.js create mode 100644 fp/dropWhile.js create mode 100644 fp/each.js create mode 100644 fp/eachRight.js create mode 100644 fp/endsWith.js create mode 100644 fp/eq.js create mode 100644 fp/equals.js create mode 100644 fp/escape.js create mode 100644 fp/escapeRegExp.js create mode 100644 fp/every.js create mode 100644 fp/extend.js create mode 100644 fp/extendWith.js create mode 100644 fp/fill.js create mode 100644 fp/filter.js create mode 100644 fp/find.js create mode 100644 fp/findIndex.js create mode 100644 fp/findKey.js create mode 100644 fp/findLast.js create mode 100644 fp/findLastIndex.js create mode 100644 fp/findLastKey.js create mode 100644 fp/first.js create mode 100644 fp/flatMap.js create mode 100644 fp/flatten.js create mode 100644 fp/flattenDeep.js create mode 100644 fp/flip.js create mode 100644 fp/floor.js create mode 100644 fp/flow.js create mode 100644 fp/flowRight.js create mode 100644 fp/forEach.js create mode 100644 fp/forEachRight.js create mode 100644 fp/forIn.js create mode 100644 fp/forInRight.js create mode 100644 fp/forOwn.js create mode 100644 fp/forOwnRight.js create mode 100644 fp/fromPairs.js create mode 100644 fp/function.js create mode 100644 fp/functions.js create mode 100644 fp/functionsIn.js create mode 100644 fp/get.js create mode 100644 fp/getOr.js create mode 100644 fp/groupBy.js create mode 100644 fp/gt.js create mode 100644 fp/gte.js create mode 100644 fp/has.js create mode 100644 fp/hasIn.js create mode 100644 fp/head.js create mode 100644 fp/identity.js create mode 100644 fp/inRange.js create mode 100644 fp/includes.js create mode 100644 fp/indexOf.js create mode 100644 fp/init.js create mode 100644 fp/initial.js create mode 100644 fp/intersection.js create mode 100644 fp/intersectionBy.js create mode 100644 fp/intersectionWith.js create mode 100644 fp/invert.js create mode 100644 fp/invertBy.js create mode 100644 fp/invoke.js create mode 100644 fp/invokeMap.js create mode 100644 fp/isArguments.js create mode 100644 fp/isArray.js create mode 100644 fp/isArrayLike.js create mode 100644 fp/isArrayLikeObject.js create mode 100644 fp/isBoolean.js create mode 100644 fp/isDate.js create mode 100644 fp/isElement.js create mode 100644 fp/isEmpty.js create mode 100644 fp/isEqual.js create mode 100644 fp/isEqualWith.js create mode 100644 fp/isError.js create mode 100644 fp/isFinite.js create mode 100644 fp/isFunction.js create mode 100644 fp/isInteger.js create mode 100644 fp/isLength.js create mode 100644 fp/isMatch.js create mode 100644 fp/isMatchWith.js create mode 100644 fp/isNaN.js create mode 100644 fp/isNative.js create mode 100644 fp/isNil.js create mode 100644 fp/isNull.js create mode 100644 fp/isNumber.js create mode 100644 fp/isObject.js create mode 100644 fp/isObjectLike.js create mode 100644 fp/isPlainObject.js create mode 100644 fp/isRegExp.js create mode 100644 fp/isSafeInteger.js create mode 100644 fp/isString.js create mode 100644 fp/isSymbol.js create mode 100644 fp/isTypedArray.js create mode 100644 fp/isUndefined.js create mode 100644 fp/iteratee.js create mode 100644 fp/join.js create mode 100644 fp/kebabCase.js create mode 100644 fp/keyBy.js create mode 100644 fp/keys.js create mode 100644 fp/keysIn.js create mode 100644 fp/lang.js create mode 100644 fp/last.js create mode 100644 fp/lastIndexOf.js create mode 100644 fp/lowerCase.js create mode 100644 fp/lowerFirst.js create mode 100644 fp/lt.js create mode 100644 fp/lte.js create mode 100644 fp/map.js create mode 100644 fp/mapKeys.js create mode 100644 fp/mapObj.js create mode 100644 fp/mapValues.js create mode 100644 fp/matches.js create mode 100644 fp/matchesProperty.js create mode 100644 fp/math.js create mode 100644 fp/max.js create mode 100644 fp/maxBy.js create mode 100644 fp/mean.js create mode 100644 fp/memoize.js create mode 100644 fp/merge.js create mode 100644 fp/mergeWith.js create mode 100644 fp/method.js create mode 100644 fp/methodOf.js create mode 100644 fp/min.js create mode 100644 fp/minBy.js create mode 100644 fp/mixin.js create mode 100644 fp/nAry.js create mode 100644 fp/negate.js create mode 100644 fp/next.js create mode 100644 fp/noop.js create mode 100644 fp/now.js create mode 100644 fp/nthArg.js create mode 100644 fp/number.js create mode 100644 fp/object.js create mode 100644 fp/omit.js create mode 100644 fp/omitAll.js create mode 100644 fp/omitBy.js create mode 100644 fp/once.js create mode 100644 fp/orderBy.js create mode 100644 fp/over.js create mode 100644 fp/overArgs.js create mode 100644 fp/overEvery.js create mode 100644 fp/overSome.js create mode 100644 fp/pad.js create mode 100644 fp/padEnd.js create mode 100644 fp/padStart.js create mode 100644 fp/parseInt.js create mode 100644 fp/partial.js create mode 100644 fp/partialRight.js create mode 100644 fp/partition.js create mode 100644 fp/path.js create mode 100644 fp/pathEq.js create mode 100644 fp/pathOr.js create mode 100644 fp/pick.js create mode 100644 fp/pickAll.js create mode 100644 fp/pickBy.js create mode 100644 fp/pipe.js create mode 100644 fp/plant.js create mode 100644 fp/prop.js create mode 100644 fp/propOf.js create mode 100644 fp/propOr.js create mode 100644 fp/property.js create mode 100644 fp/propertyOf.js create mode 100644 fp/pull.js create mode 100644 fp/pullAll.js create mode 100644 fp/pullAllBy.js create mode 100644 fp/pullAt.js create mode 100644 fp/random.js create mode 100644 fp/range.js create mode 100644 fp/rangeRight.js create mode 100644 fp/rearg.js create mode 100644 fp/reduce.js create mode 100644 fp/reduceRight.js create mode 100644 fp/reject.js create mode 100644 fp/remove.js create mode 100644 fp/repeat.js create mode 100644 fp/replace.js create mode 100644 fp/rest.js create mode 100644 fp/result.js create mode 100644 fp/reverse.js create mode 100644 fp/round.js create mode 100644 fp/sample.js create mode 100644 fp/sampleSize.js create mode 100644 fp/seq.js create mode 100644 fp/set.js create mode 100644 fp/setWith.js create mode 100644 fp/shuffle.js create mode 100644 fp/size.js create mode 100644 fp/slice.js create mode 100644 fp/snakeCase.js create mode 100644 fp/some.js create mode 100644 fp/somePass.js create mode 100644 fp/sortBy.js create mode 100644 fp/sortedIndex.js create mode 100644 fp/sortedIndexBy.js create mode 100644 fp/sortedIndexOf.js create mode 100644 fp/sortedLastIndex.js create mode 100644 fp/sortedLastIndexBy.js create mode 100644 fp/sortedLastIndexOf.js create mode 100644 fp/sortedUniq.js create mode 100644 fp/sortedUniqBy.js create mode 100644 fp/split.js create mode 100644 fp/spread.js create mode 100644 fp/startCase.js create mode 100644 fp/startsWith.js create mode 100644 fp/string.js create mode 100644 fp/subtract.js create mode 100644 fp/sum.js create mode 100644 fp/sumBy.js create mode 100644 fp/tail.js create mode 100644 fp/take.js create mode 100644 fp/takeRight.js create mode 100644 fp/takeRightWhile.js create mode 100644 fp/takeWhile.js create mode 100644 fp/tap.js create mode 100644 fp/template.js create mode 100644 fp/templateSettings.js create mode 100644 fp/throttle.js create mode 100644 fp/thru.js create mode 100644 fp/times.js create mode 100644 fp/toArray.js create mode 100644 fp/toInteger.js create mode 100644 fp/toIterator.js create mode 100644 fp/toJSON.js create mode 100644 fp/toLength.js create mode 100644 fp/toLower.js create mode 100644 fp/toNumber.js create mode 100644 fp/toPairs.js create mode 100644 fp/toPairsIn.js create mode 100644 fp/toPath.js create mode 100644 fp/toPlainObject.js create mode 100644 fp/toSafeInteger.js create mode 100644 fp/toString.js create mode 100644 fp/toUpper.js create mode 100644 fp/transform.js create mode 100644 fp/trim.js create mode 100644 fp/trimEnd.js create mode 100644 fp/trimStart.js create mode 100644 fp/truncate.js create mode 100644 fp/unapply.js create mode 100644 fp/unary.js create mode 100644 fp/unescape.js create mode 100644 fp/union.js create mode 100644 fp/unionBy.js create mode 100644 fp/unionWith.js create mode 100644 fp/uniq.js create mode 100644 fp/uniqBy.js create mode 100644 fp/uniqWith.js create mode 100644 fp/uniqueId.js create mode 100644 fp/unnest.js create mode 100644 fp/unset.js create mode 100644 fp/unzip.js create mode 100644 fp/unzipWith.js create mode 100644 fp/upperCase.js create mode 100644 fp/upperFirst.js create mode 100644 fp/useWith.js create mode 100644 fp/util.js create mode 100644 fp/value.js create mode 100644 fp/valueOf.js create mode 100644 fp/values.js create mode 100644 fp/valuesIn.js create mode 100644 fp/whereEq.js create mode 100644 fp/without.js create mode 100644 fp/words.js create mode 100644 fp/wrap.js create mode 100644 fp/wrapperAt.js create mode 100644 fp/wrapperChain.js create mode 100644 fp/wrapperFlatMap.js create mode 100644 fp/wrapperLodash.js create mode 100644 fp/wrapperReverse.js create mode 100644 fp/wrapperValue.js create mode 100644 fp/xor.js create mode 100644 fp/xorBy.js create mode 100644 fp/xorWith.js create mode 100644 fp/zip.js create mode 100644 fp/zipObj.js create mode 100644 fp/zipObject.js create mode 100644 fp/zipObjectDeep.js create mode 100644 fp/zipWith.js delete mode 100644 internal/createAggregator.js create mode 100644 invertBy.js create mode 100644 zipObjectDeep.js diff --git a/README.md b/README.md index 38ee8c6af..d87bd2c48 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,7 @@ -# lodash v4.0.1 +# lodash v4.1.0 The [lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules. -Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli): -```bash -$ lodash modularize exports=node -o ./ -$ lodash -d -o ./lodash.js -``` - ## Installation Using npm: @@ -22,15 +16,19 @@ In Node.js: var _ = require('lodash'); // load the core build var _ = require('lodash/core'); -// load the fp build +// load the fp build for immutable auto-curried iteratee-first data-last methods var _ = require('lodash/fp'); + // or a method category var array = require('lodash/array'); -// or a method (great for smaller builds with browserify/webpack) +var object = require('lodash/fp/object'); + +// or method for smaller builds with browserify/rollup/webpack var chunk = require('lodash/chunk'); +var extend = require('lodash/fp/extend'); ``` -See the [package source](https://github.com/lodash/lodash/tree/4.0.1-npm) for more details. +See the [package source](https://github.com/lodash/lodash/tree/4.1.0-npm) for more details. **Note:**
Don’t assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL.
@@ -42,7 +40,7 @@ Lodash is also available in a variety of other builds & module formats. * [lodash](https://www.npmjs.com/package/lodash) & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) packages * [lodash-amd](https://www.npmjs.com/package/lodash-amd) - * [lodash-es](https://www.npmjs.com/package/lodash-es) + * [lodash-es](https://www.npmjs.com/package/lodash-es) & [babel-plugin-lodash](https://www.npmjs.com/package/babel-plugin-lodash) ## Further Reading @@ -54,5 +52,5 @@ Lodash is also available in a variety of other builds & module formats. ## Support -Tested in Chrome 46-47, Firefox 42-43, IE 9-11, Edge 13, Safari 8-9, Node.js 0.10.x, 0.12.x, 4.x, & 5.x, & PhantomJS 1.9.8. +Tested in Chrome 46-47, Firefox 42-43, IE 9-11, Edge 13, Safari 8-9, Node.js 0.10, 0.12, 4, & 5, & PhantomJS 1.9.8. Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing. diff --git a/internal/Hash.js b/_Hash.js similarity index 88% rename from internal/Hash.js rename to _Hash.js index d97721969..e7792aafb 100644 --- a/internal/Hash.js +++ b/_Hash.js @@ -1,4 +1,4 @@ -var nativeCreate = require('./nativeCreate'); +var nativeCreate = require('./_nativeCreate'); /** Used for built-in method references. */ var objectProto = global.Object.prototype; diff --git a/internal/LazyWrapper.js b/_LazyWrapper.js similarity index 87% rename from internal/LazyWrapper.js rename to _LazyWrapper.js index 2528d1b8b..3c14d805c 100644 --- a/internal/LazyWrapper.js +++ b/_LazyWrapper.js @@ -1,5 +1,5 @@ -var baseCreate = require('./baseCreate'), - baseLodash = require('./baseLodash'); +var baseCreate = require('./_baseCreate'), + baseLodash = require('./_baseLodash'); /** Used as references for the maximum length and index of an array. */ var MAX_ARRAY_LENGTH = 4294967295; diff --git a/internal/LodashWrapper.js b/_LodashWrapper.js similarity index 85% rename from internal/LodashWrapper.js rename to _LodashWrapper.js index e1e918823..7c255b2dd 100644 --- a/internal/LodashWrapper.js +++ b/_LodashWrapper.js @@ -1,5 +1,5 @@ -var baseCreate = require('./baseCreate'), - baseLodash = require('./baseLodash'); +var baseCreate = require('./_baseCreate'), + baseLodash = require('./_baseLodash'); /** * The base constructor for creating `lodash` wrapper objects. diff --git a/internal/Map.js b/_Map.js similarity index 75% rename from internal/Map.js rename to _Map.js index 24f01afea..dc7e604e5 100644 --- a/internal/Map.js +++ b/_Map.js @@ -1,4 +1,4 @@ -var getNative = require('./getNative'); +var getNative = require('./_getNative'); /* Built-in method references that are verified to be native. */ var Map = getNative(global, 'Map'); diff --git a/internal/MapCache.js b/_MapCache.js similarity index 75% rename from internal/MapCache.js rename to _MapCache.js index bd1db5dfb..734324be5 100644 --- a/internal/MapCache.js +++ b/_MapCache.js @@ -1,8 +1,8 @@ -var mapClear = require('./mapClear'), - mapDelete = require('./mapDelete'), - mapGet = require('./mapGet'), - mapHas = require('./mapHas'), - mapSet = require('./mapSet'); +var mapClear = require('./_mapClear'), + mapDelete = require('./_mapDelete'), + mapGet = require('./_mapGet'), + mapHas = require('./_mapHas'), + mapSet = require('./_mapSet'); /** * Creates a map cache object to store key-value pairs. diff --git a/internal/Reflect.js b/_Reflect.js similarity index 100% rename from internal/Reflect.js rename to _Reflect.js diff --git a/internal/Set.js b/_Set.js similarity index 75% rename from internal/Set.js rename to _Set.js index 63bfd055e..a57920070 100644 --- a/internal/Set.js +++ b/_Set.js @@ -1,4 +1,4 @@ -var getNative = require('./getNative'); +var getNative = require('./_getNative'); /* Built-in method references that are verified to be native. */ var Set = getNative(global, 'Set'); diff --git a/internal/SetCache.js b/_SetCache.js similarity index 83% rename from internal/SetCache.js rename to _SetCache.js index d4884336b..66b8b614b 100644 --- a/internal/SetCache.js +++ b/_SetCache.js @@ -1,5 +1,5 @@ -var MapCache = require('./MapCache'), - cachePush = require('./cachePush'); +var MapCache = require('./_MapCache'), + cachePush = require('./_cachePush'); /** * diff --git a/internal/Stack.js b/_Stack.js similarity index 73% rename from internal/Stack.js rename to _Stack.js index 25ced97b7..7c3c2f318 100644 --- a/internal/Stack.js +++ b/_Stack.js @@ -1,8 +1,8 @@ -var stackClear = require('./stackClear'), - stackDelete = require('./stackDelete'), - stackGet = require('./stackGet'), - stackHas = require('./stackHas'), - stackSet = require('./stackSet'); +var stackClear = require('./_stackClear'), + stackDelete = require('./_stackDelete'), + stackGet = require('./_stackGet'), + stackHas = require('./_stackHas'), + stackSet = require('./_stackSet'); /** * Creates a stack cache object to store key-value pairs. diff --git a/internal/Symbol.js b/_Symbol.js similarity index 100% rename from internal/Symbol.js rename to _Symbol.js diff --git a/internal/Uint8Array.js b/_Uint8Array.js similarity index 100% rename from internal/Uint8Array.js rename to _Uint8Array.js diff --git a/internal/WeakMap.js b/_WeakMap.js similarity index 76% rename from internal/WeakMap.js rename to _WeakMap.js index c880f2df8..fd917f8f3 100644 --- a/internal/WeakMap.js +++ b/_WeakMap.js @@ -1,4 +1,4 @@ -var getNative = require('./getNative'); +var getNative = require('./_getNative'); /* Built-in method references that are verified to be native. */ var WeakMap = getNative(global, 'WeakMap'); diff --git a/internal/addMapEntry.js b/_addMapEntry.js similarity index 100% rename from internal/addMapEntry.js rename to _addMapEntry.js diff --git a/internal/addSetEntry.js b/_addSetEntry.js similarity index 100% rename from internal/addSetEntry.js rename to _addSetEntry.js diff --git a/internal/apply.js b/_apply.js similarity index 100% rename from internal/apply.js rename to _apply.js diff --git a/_arrayAggregator.js b/_arrayAggregator.js new file mode 100644 index 000000000..562eeb392 --- /dev/null +++ b/_arrayAggregator.js @@ -0,0 +1,22 @@ +/** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ +function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; +} + +module.exports = arrayAggregator; diff --git a/internal/arrayConcat.js b/_arrayConcat.js similarity index 100% rename from internal/arrayConcat.js rename to _arrayConcat.js diff --git a/internal/arrayEach.js b/_arrayEach.js similarity index 100% rename from internal/arrayEach.js rename to _arrayEach.js diff --git a/internal/arrayEachRight.js b/_arrayEachRight.js similarity index 100% rename from internal/arrayEachRight.js rename to _arrayEachRight.js diff --git a/internal/arrayEvery.js b/_arrayEvery.js similarity index 100% rename from internal/arrayEvery.js rename to _arrayEvery.js diff --git a/internal/arrayFilter.js b/_arrayFilter.js similarity index 100% rename from internal/arrayFilter.js rename to _arrayFilter.js diff --git a/internal/arrayIncludes.js b/_arrayIncludes.js similarity index 90% rename from internal/arrayIncludes.js rename to _arrayIncludes.js index d83be9bce..9574f5d1b 100644 --- a/internal/arrayIncludes.js +++ b/_arrayIncludes.js @@ -1,4 +1,4 @@ -var baseIndexOf = require('./baseIndexOf'); +var baseIndexOf = require('./_baseIndexOf'); /** * A specialized version of `_.includes` for arrays without support for diff --git a/internal/arrayIncludesWith.js b/_arrayIncludesWith.js similarity index 100% rename from internal/arrayIncludesWith.js rename to _arrayIncludesWith.js diff --git a/internal/arrayMap.js b/_arrayMap.js similarity index 100% rename from internal/arrayMap.js rename to _arrayMap.js diff --git a/internal/arrayPush.js b/_arrayPush.js similarity index 100% rename from internal/arrayPush.js rename to _arrayPush.js diff --git a/internal/arrayReduce.js b/_arrayReduce.js similarity index 100% rename from internal/arrayReduce.js rename to _arrayReduce.js diff --git a/internal/arrayReduceRight.js b/_arrayReduceRight.js similarity index 100% rename from internal/arrayReduceRight.js rename to _arrayReduceRight.js diff --git a/internal/arraySome.js b/_arraySome.js similarity index 100% rename from internal/arraySome.js rename to _arraySome.js diff --git a/internal/assignInDefaults.js b/_assignInDefaults.js similarity index 96% rename from internal/assignInDefaults.js rename to _assignInDefaults.js index dd351c0e8..6608d42fc 100644 --- a/internal/assignInDefaults.js +++ b/_assignInDefaults.js @@ -1,4 +1,4 @@ -var eq = require('../eq'); +var eq = require('./eq'); /** Used for built-in method references. */ var objectProto = global.Object.prototype; diff --git a/internal/assignMergeValue.js b/_assignMergeValue.js similarity index 94% rename from internal/assignMergeValue.js rename to _assignMergeValue.js index 03661b8a0..1c493b065 100644 --- a/internal/assignMergeValue.js +++ b/_assignMergeValue.js @@ -1,4 +1,4 @@ -var eq = require('../eq'); +var eq = require('./eq'); /** * This function is like `assignValue` except that it doesn't assign `undefined` values. diff --git a/internal/assignValue.js b/_assignValue.js similarity index 96% rename from internal/assignValue.js rename to _assignValue.js index 081f4327a..70e89b9b7 100644 --- a/internal/assignValue.js +++ b/_assignValue.js @@ -1,4 +1,4 @@ -var eq = require('../eq'); +var eq = require('./eq'); /** Used for built-in method references. */ var objectProto = global.Object.prototype; diff --git a/internal/assocDelete.js b/_assocDelete.js similarity index 93% rename from internal/assocDelete.js rename to _assocDelete.js index 23e17e4cb..7c6bff62d 100644 --- a/internal/assocDelete.js +++ b/_assocDelete.js @@ -1,4 +1,4 @@ -var assocIndexOf = require('./assocIndexOf'); +var assocIndexOf = require('./_assocIndexOf'); /** Used for built-in method references. */ var arrayProto = global.Array.prototype; diff --git a/internal/assocGet.js b/_assocGet.js similarity index 88% rename from internal/assocGet.js rename to _assocGet.js index da4f6ed37..e53d332e8 100644 --- a/internal/assocGet.js +++ b/_assocGet.js @@ -1,4 +1,4 @@ -var assocIndexOf = require('./assocIndexOf'); +var assocIndexOf = require('./_assocIndexOf'); /** * Gets the associative array value for `key`. diff --git a/internal/assocHas.js b/_assocHas.js similarity index 88% rename from internal/assocHas.js rename to _assocHas.js index fe9091137..a74bd3997 100644 --- a/internal/assocHas.js +++ b/_assocHas.js @@ -1,4 +1,4 @@ -var assocIndexOf = require('./assocIndexOf'); +var assocIndexOf = require('./_assocIndexOf'); /** * Checks if an associative array value for `key` exists. diff --git a/internal/assocIndexOf.js b/_assocIndexOf.js similarity index 94% rename from internal/assocIndexOf.js rename to _assocIndexOf.js index 84862c1d8..958c8d8f5 100644 --- a/internal/assocIndexOf.js +++ b/_assocIndexOf.js @@ -1,4 +1,4 @@ -var eq = require('../eq'); +var eq = require('./eq'); /** * Gets the index at which the first occurrence of `key` is found in `array` diff --git a/internal/assocSet.js b/_assocSet.js similarity index 89% rename from internal/assocSet.js rename to _assocSet.js index 3b7badecf..524f3418d 100644 --- a/internal/assocSet.js +++ b/_assocSet.js @@ -1,4 +1,4 @@ -var assocIndexOf = require('./assocIndexOf'); +var assocIndexOf = require('./_assocIndexOf'); /** * Sets the associative array `key` to `value`. diff --git a/_baseAggregator.js b/_baseAggregator.js new file mode 100644 index 000000000..4bc9e91f4 --- /dev/null +++ b/_baseAggregator.js @@ -0,0 +1,21 @@ +var baseEach = require('./_baseEach'); + +/** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ +function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; +} + +module.exports = baseAggregator; diff --git a/internal/baseAssign.js b/_baseAssign.js similarity index 84% rename from internal/baseAssign.js rename to _baseAssign.js index de6105a99..e5c4a1a5b 100644 --- a/internal/baseAssign.js +++ b/_baseAssign.js @@ -1,5 +1,5 @@ -var copyObject = require('./copyObject'), - keys = require('../keys'); +var copyObject = require('./_copyObject'), + keys = require('./keys'); /** * The base implementation of `_.assign` without support for multiple sources diff --git a/internal/baseAt.js b/_baseAt.js similarity index 95% rename from internal/baseAt.js rename to _baseAt.js index 3edf507a2..a077cb937 100644 --- a/internal/baseAt.js +++ b/_baseAt.js @@ -1,4 +1,4 @@ -var get = require('../get'); +var get = require('./get'); /** * The base implementation of `_.at` without support for individual paths. diff --git a/internal/baseClamp.js b/_baseClamp.js similarity index 100% rename from internal/baseClamp.js rename to _baseClamp.js diff --git a/internal/baseClone.js b/_baseClone.js similarity index 85% rename from internal/baseClone.js rename to _baseClone.js index 223344be6..d57870f92 100644 --- a/internal/baseClone.js +++ b/_baseClone.js @@ -1,17 +1,17 @@ -var Stack = require('./Stack'), - arrayEach = require('./arrayEach'), - assignValue = require('./assignValue'), - baseAssign = require('./baseAssign'), - baseForOwn = require('./baseForOwn'), - copyArray = require('./copyArray'), - copySymbols = require('./copySymbols'), - getTag = require('./getTag'), - initCloneArray = require('./initCloneArray'), - initCloneByTag = require('./initCloneByTag'), - initCloneObject = require('./initCloneObject'), - isArray = require('../isArray'), - isHostObject = require('./isHostObject'), - isObject = require('../isObject'); +var Stack = require('./_Stack'), + arrayEach = require('./_arrayEach'), + assignValue = require('./_assignValue'), + baseAssign = require('./_baseAssign'), + baseForOwn = require('./_baseForOwn'), + copyArray = require('./_copyArray'), + copySymbols = require('./_copySymbols'), + getTag = require('./_getTag'), + initCloneArray = require('./_initCloneArray'), + initCloneByTag = require('./_initCloneByTag'), + initCloneObject = require('./_initCloneObject'), + isArray = require('./isArray'), + isHostObject = require('./_isHostObject'), + isObject = require('./isObject'); /** `Object#toString` result references. */ var argsTag = '[object Arguments]', diff --git a/internal/baseConforms.js b/_baseConforms.js similarity index 95% rename from internal/baseConforms.js rename to _baseConforms.js index d9f5f618a..888434d62 100644 --- a/internal/baseConforms.js +++ b/_baseConforms.js @@ -1,4 +1,4 @@ -var keys = require('../keys'); +var keys = require('./keys'); /** * The base implementation of `_.conforms` which doesn't clone `source`. diff --git a/internal/baseCreate.js b/_baseCreate.js similarity index 93% rename from internal/baseCreate.js rename to _baseCreate.js index 92e9a4ab0..64d53eccc 100644 --- a/internal/baseCreate.js +++ b/_baseCreate.js @@ -1,4 +1,4 @@ -var isObject = require('../isObject'); +var isObject = require('./isObject'); /** * The base implementation of `_.create` without support for assigning diff --git a/internal/baseDelay.js b/_baseDelay.js similarity index 100% rename from internal/baseDelay.js rename to _baseDelay.js diff --git a/internal/baseDifference.js b/_baseDifference.js similarity index 85% rename from internal/baseDifference.js rename to _baseDifference.js index 0d0cb403a..b266d7e3b 100644 --- a/internal/baseDifference.js +++ b/_baseDifference.js @@ -1,9 +1,9 @@ -var SetCache = require('./SetCache'), - arrayIncludes = require('./arrayIncludes'), - arrayIncludesWith = require('./arrayIncludesWith'), - arrayMap = require('./arrayMap'), - baseUnary = require('./baseUnary'), - cacheHas = require('./cacheHas'); +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + arrayMap = require('./_arrayMap'), + baseUnary = require('./_baseUnary'), + cacheHas = require('./_cacheHas'); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; diff --git a/internal/baseEach.js b/_baseEach.js similarity index 79% rename from internal/baseEach.js rename to _baseEach.js index cb549b5e2..512c06768 100644 --- a/internal/baseEach.js +++ b/_baseEach.js @@ -1,5 +1,5 @@ -var baseForOwn = require('./baseForOwn'), - createBaseEach = require('./createBaseEach'); +var baseForOwn = require('./_baseForOwn'), + createBaseEach = require('./_createBaseEach'); /** * The base implementation of `_.forEach` without support for iteratee shorthands. diff --git a/internal/baseEachRight.js b/_baseEachRight.js similarity index 78% rename from internal/baseEachRight.js rename to _baseEachRight.js index e8cb9a3e0..0a8feeca4 100644 --- a/internal/baseEachRight.js +++ b/_baseEachRight.js @@ -1,5 +1,5 @@ -var baseForOwnRight = require('./baseForOwnRight'), - createBaseEach = require('./createBaseEach'); +var baseForOwnRight = require('./_baseForOwnRight'), + createBaseEach = require('./_createBaseEach'); /** * The base implementation of `_.forEachRight` without support for iteratee shorthands. diff --git a/internal/baseEvery.js b/_baseEvery.js similarity index 93% rename from internal/baseEvery.js rename to _baseEvery.js index e85ecebb5..aafa00dad 100644 --- a/internal/baseEvery.js +++ b/_baseEvery.js @@ -1,4 +1,4 @@ -var baseEach = require('./baseEach'); +var baseEach = require('./_baseEach'); /** * The base implementation of `_.every` without support for iteratee shorthands. diff --git a/internal/baseExtremum.js b/_baseExtremum.js similarity index 100% rename from internal/baseExtremum.js rename to _baseExtremum.js diff --git a/internal/baseFill.js b/_baseFill.js similarity index 90% rename from internal/baseFill.js rename to _baseFill.js index c08362ec0..46ef9c761 100644 --- a/internal/baseFill.js +++ b/_baseFill.js @@ -1,5 +1,5 @@ -var toInteger = require('../toInteger'), - toLength = require('../toLength'); +var toInteger = require('./toInteger'), + toLength = require('./toLength'); /** * The base implementation of `_.fill` without an iteratee call guard. diff --git a/internal/baseFilter.js b/_baseFilter.js similarity index 93% rename from internal/baseFilter.js rename to _baseFilter.js index 50ea04f13..467847736 100644 --- a/internal/baseFilter.js +++ b/_baseFilter.js @@ -1,4 +1,4 @@ -var baseEach = require('./baseEach'); +var baseEach = require('./_baseEach'); /** * The base implementation of `_.filter` without support for iteratee shorthands. diff --git a/internal/baseFind.js b/_baseFind.js similarity index 100% rename from internal/baseFind.js rename to _baseFind.js diff --git a/internal/baseFindIndex.js b/_baseFindIndex.js similarity index 100% rename from internal/baseFindIndex.js rename to _baseFindIndex.js diff --git a/internal/baseFlatten.js b/_baseFlatten.js similarity index 84% rename from internal/baseFlatten.js rename to _baseFlatten.js index b3143ff32..8a4cb460d 100644 --- a/internal/baseFlatten.js +++ b/_baseFlatten.js @@ -1,7 +1,7 @@ -var arrayPush = require('./arrayPush'), - isArguments = require('../isArguments'), - isArray = require('../isArray'), - isArrayLikeObject = require('../isArrayLikeObject'); +var arrayPush = require('./_arrayPush'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isArrayLikeObject = require('./isArrayLikeObject'); /** * The base implementation of `_.flatten` with support for restricting flattening. diff --git a/internal/baseFor.js b/_baseFor.js similarity index 91% rename from internal/baseFor.js rename to _baseFor.js index 94ee03f92..97b70c9e0 100644 --- a/internal/baseFor.js +++ b/_baseFor.js @@ -1,4 +1,4 @@ -var createBaseFor = require('./createBaseFor'); +var createBaseFor = require('./_createBaseFor'); /** * The base implementation of `baseForIn` and `baseForOwn` which iterates diff --git a/internal/baseForIn.js b/_baseForIn.js similarity index 85% rename from internal/baseForIn.js rename to _baseForIn.js index 2180cecbf..4dcfdaf1e 100644 --- a/internal/baseForIn.js +++ b/_baseForIn.js @@ -1,5 +1,5 @@ -var baseFor = require('./baseFor'), - keysIn = require('../keysIn'); +var baseFor = require('./_baseFor'), + keysIn = require('./keysIn'); /** * The base implementation of `_.forIn` without support for iteratee shorthands. diff --git a/internal/baseForOwn.js b/_baseForOwn.js similarity index 85% rename from internal/baseForOwn.js rename to _baseForOwn.js index f3fc3ac6e..503d52344 100644 --- a/internal/baseForOwn.js +++ b/_baseForOwn.js @@ -1,5 +1,5 @@ -var baseFor = require('./baseFor'), - keys = require('../keys'); +var baseFor = require('./_baseFor'), + keys = require('./keys'); /** * The base implementation of `_.forOwn` without support for iteratee shorthands. diff --git a/internal/baseForOwnRight.js b/_baseForOwnRight.js similarity index 84% rename from internal/baseForOwnRight.js rename to _baseForOwnRight.js index 4fc972b98..a4b10e6c5 100644 --- a/internal/baseForOwnRight.js +++ b/_baseForOwnRight.js @@ -1,5 +1,5 @@ -var baseForRight = require('./baseForRight'), - keys = require('../keys'); +var baseForRight = require('./_baseForRight'), + keys = require('./keys'); /** * The base implementation of `_.forOwnRight` without support for iteratee shorthands. diff --git a/internal/baseForRight.js b/_baseForRight.js similarity index 89% rename from internal/baseForRight.js rename to _baseForRight.js index 5ddd19132..32842cd81 100644 --- a/internal/baseForRight.js +++ b/_baseForRight.js @@ -1,4 +1,4 @@ -var createBaseFor = require('./createBaseFor'); +var createBaseFor = require('./_createBaseFor'); /** * This function is like `baseFor` except that it iterates over properties diff --git a/internal/baseFunctions.js b/_baseFunctions.js similarity index 85% rename from internal/baseFunctions.js rename to _baseFunctions.js index b87a604a4..b3dc8f9c9 100644 --- a/internal/baseFunctions.js +++ b/_baseFunctions.js @@ -1,5 +1,5 @@ -var arrayFilter = require('./arrayFilter'), - isFunction = require('../isFunction'); +var arrayFilter = require('./_arrayFilter'), + isFunction = require('./isFunction'); /** * The base implementation of `_.functions` which creates an array of diff --git a/internal/baseGet.js b/_baseGet.js similarity index 88% rename from internal/baseGet.js rename to _baseGet.js index 0c76e5c0e..d11de17bf 100644 --- a/internal/baseGet.js +++ b/_baseGet.js @@ -1,5 +1,5 @@ -var baseToPath = require('./baseToPath'), - isKey = require('./isKey'); +var baseToPath = require('./_baseToPath'), + isKey = require('./_isKey'); /** * The base implementation of `_.get` without support for default values. diff --git a/internal/baseHas.js b/_baseHas.js similarity index 100% rename from internal/baseHas.js rename to _baseHas.js diff --git a/internal/baseHasIn.js b/_baseHasIn.js similarity index 100% rename from internal/baseHasIn.js rename to _baseHasIn.js diff --git a/internal/baseInRange.js b/_baseInRange.js similarity index 100% rename from internal/baseInRange.js rename to _baseInRange.js diff --git a/internal/baseIndexOf.js b/_baseIndexOf.js similarity index 93% rename from internal/baseIndexOf.js rename to _baseIndexOf.js index d40d05c00..6cda8023c 100644 --- a/internal/baseIndexOf.js +++ b/_baseIndexOf.js @@ -1,4 +1,4 @@ -var indexOfNaN = require('./indexOfNaN'); +var indexOfNaN = require('./_indexOfNaN'); /** * The base implementation of `_.indexOf` without `fromIndex` bounds checks. diff --git a/internal/baseIntersection.js b/_baseIntersection.js similarity index 86% rename from internal/baseIntersection.js rename to _baseIntersection.js index db1d894a5..77e463f85 100644 --- a/internal/baseIntersection.js +++ b/_baseIntersection.js @@ -1,9 +1,9 @@ -var SetCache = require('./SetCache'), - arrayIncludes = require('./arrayIncludes'), - arrayIncludesWith = require('./arrayIncludesWith'), - arrayMap = require('./arrayMap'), - baseUnary = require('./baseUnary'), - cacheHas = require('./cacheHas'); +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + arrayMap = require('./_arrayMap'), + baseUnary = require('./_baseUnary'), + cacheHas = require('./_cacheHas'); /** * The base implementation of methods like `_.intersection`, without support diff --git a/_baseInverter.js b/_baseInverter.js new file mode 100644 index 000000000..fbc337f01 --- /dev/null +++ b/_baseInverter.js @@ -0,0 +1,21 @@ +var baseForOwn = require('./_baseForOwn'); + +/** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ +function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; +} + +module.exports = baseInverter; diff --git a/internal/baseInvoke.js b/_baseInvoke.js similarity index 79% rename from internal/baseInvoke.js rename to _baseInvoke.js index e47ebbfa2..a19a5f8f8 100644 --- a/internal/baseInvoke.js +++ b/_baseInvoke.js @@ -1,8 +1,8 @@ -var apply = require('./apply'), - baseToPath = require('./baseToPath'), - isKey = require('./isKey'), - last = require('../last'), - parent = require('./parent'); +var apply = require('./_apply'), + baseToPath = require('./_baseToPath'), + isKey = require('./_isKey'), + last = require('./last'), + parent = require('./_parent'); /** * The base implementation of `_.invoke` without support for individual diff --git a/internal/baseIsEqual.js b/_baseIsEqual.js similarity index 87% rename from internal/baseIsEqual.js rename to _baseIsEqual.js index 0c9ac77db..3772dab0d 100644 --- a/internal/baseIsEqual.js +++ b/_baseIsEqual.js @@ -1,6 +1,6 @@ -var baseIsEqualDeep = require('./baseIsEqualDeep'), - isObject = require('../isObject'), - isObjectLike = require('../isObjectLike'); +var baseIsEqualDeep = require('./_baseIsEqualDeep'), + isObject = require('./isObject'), + isObjectLike = require('./isObjectLike'); /** * The base implementation of `_.isEqual` which supports partial comparisons diff --git a/internal/baseIsEqualDeep.js b/_baseIsEqualDeep.js similarity index 88% rename from internal/baseIsEqualDeep.js rename to _baseIsEqualDeep.js index b1002bc77..b72b4e66a 100644 --- a/internal/baseIsEqualDeep.js +++ b/_baseIsEqualDeep.js @@ -1,11 +1,11 @@ -var Stack = require('./Stack'), - equalArrays = require('./equalArrays'), - equalByTag = require('./equalByTag'), - equalObjects = require('./equalObjects'), - getTag = require('./getTag'), - isArray = require('../isArray'), - isHostObject = require('./isHostObject'), - isTypedArray = require('../isTypedArray'); +var Stack = require('./_Stack'), + equalArrays = require('./_equalArrays'), + equalByTag = require('./_equalByTag'), + equalObjects = require('./_equalObjects'), + getTag = require('./_getTag'), + isArray = require('./isArray'), + isHostObject = require('./_isHostObject'), + isTypedArray = require('./isTypedArray'); /** Used to compose bitmasks for comparison styles. */ var PARTIAL_COMPARE_FLAG = 2; diff --git a/internal/baseIsMatch.js b/_baseIsMatch.js similarity index 95% rename from internal/baseIsMatch.js rename to _baseIsMatch.js index 1f7a6045d..c1dcafc89 100644 --- a/internal/baseIsMatch.js +++ b/_baseIsMatch.js @@ -1,5 +1,5 @@ -var Stack = require('./Stack'), - baseIsEqual = require('./baseIsEqual'); +var Stack = require('./_Stack'), + baseIsEqual = require('./_baseIsEqual'); /** Used to compose bitmasks for comparison styles. */ var UNORDERED_COMPARE_FLAG = 1, diff --git a/internal/baseIteratee.js b/_baseIteratee.js similarity index 70% rename from internal/baseIteratee.js rename to _baseIteratee.js index ccb6bf4b9..19531af3b 100644 --- a/internal/baseIteratee.js +++ b/_baseIteratee.js @@ -1,8 +1,8 @@ -var baseMatches = require('./baseMatches'), - baseMatchesProperty = require('./baseMatchesProperty'), - identity = require('../identity'), - isArray = require('../isArray'), - property = require('../property'); +var baseMatches = require('./_baseMatches'), + baseMatchesProperty = require('./_baseMatchesProperty'), + identity = require('./identity'), + isArray = require('./isArray'), + property = require('./property'); /** * The base implementation of `_.iteratee`. diff --git a/internal/baseKeys.js b/_baseKeys.js similarity index 100% rename from internal/baseKeys.js rename to _baseKeys.js diff --git a/internal/baseKeysIn.js b/_baseKeysIn.js similarity index 91% rename from internal/baseKeysIn.js rename to _baseKeysIn.js index f4d8128f1..a9f30e1b1 100644 --- a/internal/baseKeysIn.js +++ b/_baseKeysIn.js @@ -1,5 +1,5 @@ -var Reflect = require('./Reflect'), - iteratorToArray = require('./iteratorToArray'); +var Reflect = require('./_Reflect'), + iteratorToArray = require('./_iteratorToArray'); /** Used for built-in method references. */ var objectProto = global.Object.prototype; diff --git a/internal/baseLodash.js b/_baseLodash.js similarity index 100% rename from internal/baseLodash.js rename to _baseLodash.js diff --git a/internal/baseMap.js b/_baseMap.js similarity index 87% rename from internal/baseMap.js rename to _baseMap.js index 042ac522e..0bf5cead5 100644 --- a/internal/baseMap.js +++ b/_baseMap.js @@ -1,5 +1,5 @@ -var baseEach = require('./baseEach'), - isArrayLike = require('../isArrayLike'); +var baseEach = require('./_baseEach'), + isArrayLike = require('./isArrayLike'); /** * The base implementation of `_.map` without support for iteratee shorthands. diff --git a/internal/baseMatches.js b/_baseMatches.js similarity index 88% rename from internal/baseMatches.js rename to _baseMatches.js index b94ac5f18..56c72e6ca 100644 --- a/internal/baseMatches.js +++ b/_baseMatches.js @@ -1,5 +1,5 @@ -var baseIsMatch = require('./baseIsMatch'), - getMatchData = require('./getMatchData'); +var baseIsMatch = require('./_baseIsMatch'), + getMatchData = require('./_getMatchData'); /** * The base implementation of `_.matches` which doesn't clone `source`. diff --git a/internal/baseMatchesProperty.js b/_baseMatchesProperty.js similarity index 87% rename from internal/baseMatchesProperty.js rename to _baseMatchesProperty.js index 6f6021885..256ad65f3 100644 --- a/internal/baseMatchesProperty.js +++ b/_baseMatchesProperty.js @@ -1,6 +1,6 @@ -var baseIsEqual = require('./baseIsEqual'), - get = require('../get'), - hasIn = require('../hasIn'); +var baseIsEqual = require('./_baseIsEqual'), + get = require('./get'), + hasIn = require('./hasIn'); /** Used to compose bitmasks for comparison styles. */ var UNORDERED_COMPARE_FLAG = 1, diff --git a/internal/baseMerge.js b/_baseMerge.js similarity index 78% rename from internal/baseMerge.js rename to _baseMerge.js index 48d28314d..977846484 100644 --- a/internal/baseMerge.js +++ b/_baseMerge.js @@ -1,11 +1,11 @@ -var Stack = require('./Stack'), - arrayEach = require('./arrayEach'), - assignMergeValue = require('./assignMergeValue'), - baseMergeDeep = require('./baseMergeDeep'), - isArray = require('../isArray'), - isObject = require('../isObject'), - isTypedArray = require('../isTypedArray'), - keysIn = require('../keysIn'); +var Stack = require('./_Stack'), + arrayEach = require('./_arrayEach'), + assignMergeValue = require('./_assignMergeValue'), + baseMergeDeep = require('./_baseMergeDeep'), + isArray = require('./isArray'), + isObject = require('./isObject'), + isTypedArray = require('./isTypedArray'), + keysIn = require('./keysIn'); /** * The base implementation of `_.merge` without support for multiple sources. diff --git a/internal/baseMergeDeep.js b/_baseMergeDeep.js similarity index 77% rename from internal/baseMergeDeep.js rename to _baseMergeDeep.js index c7f3c40c4..d5caf3fff 100644 --- a/internal/baseMergeDeep.js +++ b/_baseMergeDeep.js @@ -1,14 +1,14 @@ -var assignMergeValue = require('./assignMergeValue'), - baseClone = require('./baseClone'), - copyArray = require('./copyArray'), - isArguments = require('../isArguments'), - isArray = require('../isArray'), - isArrayLikeObject = require('../isArrayLikeObject'), - isFunction = require('../isFunction'), - isObject = require('../isObject'), - isPlainObject = require('../isPlainObject'), - isTypedArray = require('../isTypedArray'), - toPlainObject = require('../toPlainObject'); +var assignMergeValue = require('./_assignMergeValue'), + baseClone = require('./_baseClone'), + copyArray = require('./_copyArray'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isArrayLikeObject = require('./isArrayLikeObject'), + isFunction = require('./isFunction'), + isObject = require('./isObject'), + isPlainObject = require('./isPlainObject'), + isTypedArray = require('./isTypedArray'), + toPlainObject = require('./toPlainObject'); /** * A specialized version of `baseMerge` for arrays and objects which performs @@ -27,7 +27,7 @@ var assignMergeValue = require('./assignMergeValue'), function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { var objValue = object[key], srcValue = source[key], - stacked = stack.get(srcValue) || stack.get(objValue); + stacked = stack.get(srcValue); if (stacked) { assignMergeValue(object, key, stacked); @@ -46,6 +46,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta newValue = copyArray(objValue); } else { + isCommon = false; newValue = baseClone(srcValue); } } @@ -54,6 +55,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta newValue = toPlainObject(objValue); } else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + isCommon = false; newValue = baseClone(srcValue); } else { diff --git a/internal/baseOrderBy.js b/_baseOrderBy.js similarity index 81% rename from internal/baseOrderBy.js rename to _baseOrderBy.js index 933c72c3a..461868064 100644 --- a/internal/baseOrderBy.js +++ b/_baseOrderBy.js @@ -1,8 +1,8 @@ -var arrayMap = require('./arrayMap'), - baseIteratee = require('./baseIteratee'), - baseMap = require('./baseMap'), - baseSortBy = require('./baseSortBy'), - compareMultiple = require('./compareMultiple'); +var arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), + baseMap = require('./_baseMap'), + baseSortBy = require('./_baseSortBy'), + compareMultiple = require('./_compareMultiple'); /** * The base implementation of `_.orderBy` without param guards. diff --git a/internal/basePick.js b/_basePick.js similarity index 91% rename from internal/basePick.js rename to _basePick.js index 1a5b8642a..e2ce7229f 100644 --- a/internal/basePick.js +++ b/_basePick.js @@ -1,4 +1,4 @@ -var arrayReduce = require('./arrayReduce'); +var arrayReduce = require('./_arrayReduce'); /** * The base implementation of `_.pick` without support for individual diff --git a/internal/basePickBy.js b/_basePickBy.js similarity index 92% rename from internal/basePickBy.js rename to _basePickBy.js index 2d7dd2041..37c4943ba 100644 --- a/internal/basePickBy.js +++ b/_basePickBy.js @@ -1,4 +1,4 @@ -var baseForIn = require('./baseForIn'); +var baseForIn = require('./_baseForIn'); /** * The base implementation of `_.pickBy` without support for iteratee shorthands. diff --git a/internal/baseProperty.js b/_baseProperty.js similarity index 100% rename from internal/baseProperty.js rename to _baseProperty.js diff --git a/internal/basePropertyDeep.js b/_basePropertyDeep.js similarity index 90% rename from internal/basePropertyDeep.js rename to _basePropertyDeep.js index 72bc77e6b..acc2009d5 100644 --- a/internal/basePropertyDeep.js +++ b/_basePropertyDeep.js @@ -1,4 +1,4 @@ -var baseGet = require('./baseGet'); +var baseGet = require('./_baseGet'); /** * A specialized version of `baseProperty` which supports deep paths. diff --git a/internal/basePullAll.js b/_basePullAll.js similarity index 86% rename from internal/basePullAll.js rename to _basePullAll.js index 34c6224d2..d54d2b130 100644 --- a/internal/basePullAll.js +++ b/_basePullAll.js @@ -1,4 +1,4 @@ -var basePullAllBy = require('./basePullAllBy'); +var basePullAllBy = require('./_basePullAllBy'); /** * The base implementation of `_.pullAll`. diff --git a/internal/basePullAllBy.js b/_basePullAllBy.js similarity index 92% rename from internal/basePullAllBy.js rename to _basePullAllBy.js index c58f92645..eba83b0f1 100644 --- a/internal/basePullAllBy.js +++ b/_basePullAllBy.js @@ -1,5 +1,5 @@ -var arrayMap = require('./arrayMap'), - baseIndexOf = require('./baseIndexOf'); +var arrayMap = require('./_arrayMap'), + baseIndexOf = require('./_baseIndexOf'); /** Used for built-in method references. */ var arrayProto = global.Array.prototype; diff --git a/internal/basePullAt.js b/_basePullAt.js similarity index 85% rename from internal/basePullAt.js rename to _basePullAt.js index d28139534..134281db4 100644 --- a/internal/basePullAt.js +++ b/_basePullAt.js @@ -1,8 +1,8 @@ -var baseToPath = require('./baseToPath'), - isIndex = require('./isIndex'), - isKey = require('./isKey'), - last = require('../last'), - parent = require('./parent'); +var baseToPath = require('./_baseToPath'), + isIndex = require('./_isIndex'), + isKey = require('./_isKey'), + last = require('./last'), + parent = require('./_parent'); /** Used for built-in method references. */ var arrayProto = global.Array.prototype; diff --git a/internal/baseRandom.js b/_baseRandom.js similarity index 100% rename from internal/baseRandom.js rename to _baseRandom.js diff --git a/internal/baseRange.js b/_baseRange.js similarity index 100% rename from internal/baseRange.js rename to _baseRange.js diff --git a/internal/baseReduce.js b/_baseReduce.js similarity index 100% rename from internal/baseReduce.js rename to _baseReduce.js diff --git a/internal/baseSet.js b/_baseSet.js similarity index 84% rename from internal/baseSet.js rename to _baseSet.js index ac2f78c6e..07b18406d 100644 --- a/internal/baseSet.js +++ b/_baseSet.js @@ -1,8 +1,8 @@ -var assignValue = require('./assignValue'), - baseToPath = require('./baseToPath'), - isIndex = require('./isIndex'), - isKey = require('./isKey'), - isObject = require('../isObject'); +var assignValue = require('./_assignValue'), + baseToPath = require('./_baseToPath'), + isIndex = require('./_isIndex'), + isKey = require('./_isKey'), + isObject = require('./isObject'); /** * The base implementation of `_.set`. diff --git a/internal/baseSetData.js b/_baseSetData.js similarity index 83% rename from internal/baseSetData.js rename to _baseSetData.js index 963830027..e689df2cc 100644 --- a/internal/baseSetData.js +++ b/_baseSetData.js @@ -1,5 +1,5 @@ -var identity = require('../identity'), - metaMap = require('./metaMap'); +var identity = require('./identity'), + metaMap = require('./_metaMap'); /** * The base implementation of `setData` without support for hot loop detection. diff --git a/internal/baseSlice.js b/_baseSlice.js similarity index 100% rename from internal/baseSlice.js rename to _baseSlice.js diff --git a/internal/baseSome.js b/_baseSome.js similarity index 93% rename from internal/baseSome.js rename to _baseSome.js index c76119841..8b6aa0a26 100644 --- a/internal/baseSome.js +++ b/_baseSome.js @@ -1,4 +1,4 @@ -var baseEach = require('./baseEach'); +var baseEach = require('./_baseEach'); /** * The base implementation of `_.some` without support for iteratee shorthands. diff --git a/internal/baseSortBy.js b/_baseSortBy.js similarity index 100% rename from internal/baseSortBy.js rename to _baseSortBy.js diff --git a/internal/baseSortedIndex.js b/_baseSortedIndex.js similarity index 92% rename from internal/baseSortedIndex.js rename to _baseSortedIndex.js index 4ca22d538..396106362 100644 --- a/internal/baseSortedIndex.js +++ b/_baseSortedIndex.js @@ -1,5 +1,5 @@ -var baseSortedIndexBy = require('./baseSortedIndexBy'), - identity = require('../identity'); +var baseSortedIndexBy = require('./_baseSortedIndexBy'), + identity = require('./identity'); /** Used as references for the maximum length and index of an array. */ var MAX_ARRAY_LENGTH = 4294967295, diff --git a/internal/baseSortedIndexBy.js b/_baseSortedIndexBy.js similarity index 100% rename from internal/baseSortedIndexBy.js rename to _baseSortedIndexBy.js diff --git a/internal/baseSortedUniq.js b/_baseSortedUniq.js similarity index 83% rename from internal/baseSortedUniq.js rename to _baseSortedUniq.js index 777db611e..bf1eb2e24 100644 --- a/internal/baseSortedUniq.js +++ b/_baseSortedUniq.js @@ -1,4 +1,4 @@ -var baseSortedUniqBy = require('./baseSortedUniqBy'); +var baseSortedUniqBy = require('./_baseSortedUniqBy'); /** * The base implementation of `_.sortedUniq`. diff --git a/internal/baseSortedUniqBy.js b/_baseSortedUniqBy.js similarity index 96% rename from internal/baseSortedUniqBy.js rename to _baseSortedUniqBy.js index 532f36596..c95a83f24 100644 --- a/internal/baseSortedUniqBy.js +++ b/_baseSortedUniqBy.js @@ -1,4 +1,4 @@ -var eq = require('../eq'); +var eq = require('./eq'); /** * The base implementation of `_.sortedUniqBy` without support for iteratee diff --git a/internal/baseSum.js b/_baseSum.js similarity index 94% rename from internal/baseSum.js rename to _baseSum.js index 348b5e8c0..980f41b37 100644 --- a/internal/baseSum.js +++ b/_baseSum.js @@ -17,7 +17,7 @@ function baseSum(array, iteratee) { result = result === undefined ? current : (result + current); } } - return result; + return length ? result : 0; } module.exports = baseSum; diff --git a/internal/baseTimes.js b/_baseTimes.js similarity index 100% rename from internal/baseTimes.js rename to _baseTimes.js diff --git a/internal/baseToPairs.js b/_baseToPairs.js similarity index 92% rename from internal/baseToPairs.js rename to _baseToPairs.js index a13b7d284..d80b4022c 100644 --- a/internal/baseToPairs.js +++ b/_baseToPairs.js @@ -1,4 +1,4 @@ -var arrayMap = require('./arrayMap'); +var arrayMap = require('./_arrayMap'); /** * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array diff --git a/internal/baseToPath.js b/_baseToPath.js similarity index 80% rename from internal/baseToPath.js rename to _baseToPath.js index dafdfcf05..eb45827ca 100644 --- a/internal/baseToPath.js +++ b/_baseToPath.js @@ -1,5 +1,5 @@ -var isArray = require('../isArray'), - stringToPath = require('./stringToPath'); +var isArray = require('./isArray'), + stringToPath = require('./_stringToPath'); /** * The base implementation of `_.toPath` which only converts `value` to a diff --git a/internal/baseUnary.js b/_baseUnary.js similarity index 100% rename from internal/baseUnary.js rename to _baseUnary.js diff --git a/internal/baseUniq.js b/_baseUniq.js similarity index 85% rename from internal/baseUniq.js rename to _baseUniq.js index 4b2dd3e3e..ecb6fe44b 100644 --- a/internal/baseUniq.js +++ b/_baseUniq.js @@ -1,9 +1,9 @@ -var SetCache = require('./SetCache'), - arrayIncludes = require('./arrayIncludes'), - arrayIncludesWith = require('./arrayIncludesWith'), - cacheHas = require('./cacheHas'), - createSet = require('./createSet'), - setToArray = require('./setToArray'); +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + cacheHas = require('./_cacheHas'), + createSet = require('./_createSet'), + setToArray = require('./_setToArray'); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; diff --git a/internal/baseUnset.js b/_baseUnset.js similarity index 75% rename from internal/baseUnset.js rename to _baseUnset.js index c50286b5c..2be1c1270 100644 --- a/internal/baseUnset.js +++ b/_baseUnset.js @@ -1,8 +1,8 @@ -var baseToPath = require('./baseToPath'), - has = require('../has'), - isKey = require('./isKey'), - last = require('../last'), - parent = require('./parent'); +var baseToPath = require('./_baseToPath'), + has = require('./has'), + isKey = require('./_isKey'), + last = require('./last'), + parent = require('./_parent'); /** * The base implementation of `_.unset`. diff --git a/internal/baseValues.js b/_baseValues.js similarity index 92% rename from internal/baseValues.js rename to _baseValues.js index 74167fb33..b95faadcf 100644 --- a/internal/baseValues.js +++ b/_baseValues.js @@ -1,4 +1,4 @@ -var arrayMap = require('./arrayMap'); +var arrayMap = require('./_arrayMap'); /** * The base implementation of `_.values` and `_.valuesIn` which creates an diff --git a/internal/baseWhile.js b/_baseWhile.js similarity index 95% rename from internal/baseWhile.js rename to _baseWhile.js index 4c44a7d76..07eac61b9 100644 --- a/internal/baseWhile.js +++ b/_baseWhile.js @@ -1,4 +1,4 @@ -var baseSlice = require('./baseSlice'); +var baseSlice = require('./_baseSlice'); /** * The base implementation of methods like `_.dropWhile` and `_.takeWhile` diff --git a/internal/baseWrapperValue.js b/_baseWrapperValue.js similarity index 84% rename from internal/baseWrapperValue.js rename to _baseWrapperValue.js index e0190a5fe..443e0df5e 100644 --- a/internal/baseWrapperValue.js +++ b/_baseWrapperValue.js @@ -1,6 +1,6 @@ -var LazyWrapper = require('./LazyWrapper'), - arrayPush = require('./arrayPush'), - arrayReduce = require('./arrayReduce'); +var LazyWrapper = require('./_LazyWrapper'), + arrayPush = require('./_arrayPush'), + arrayReduce = require('./_arrayReduce'); /** * The base implementation of `wrapperValue` which returns the result of diff --git a/internal/baseXor.js b/_baseXor.js similarity index 86% rename from internal/baseXor.js rename to _baseXor.js index 91faaf40f..7e62d1b24 100644 --- a/internal/baseXor.js +++ b/_baseXor.js @@ -1,6 +1,6 @@ -var arrayPush = require('./arrayPush'), - baseDifference = require('./baseDifference'), - baseUniq = require('./baseUniq'); +var arrayPush = require('./_arrayPush'), + baseDifference = require('./_baseDifference'), + baseUniq = require('./_baseUniq'); /** * The base implementation of methods like `_.xor`, without support for diff --git a/_baseZipObject.js b/_baseZipObject.js new file mode 100644 index 000000000..c8a3e833e --- /dev/null +++ b/_baseZipObject.js @@ -0,0 +1,22 @@ +/** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property names. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ +function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + assignFunc(result, props[index], index < valsLength ? values[index] : undefined); + } + return result; +} + +module.exports = baseZipObject; diff --git a/internal/cacheHas.js b/_cacheHas.js similarity index 93% rename from internal/cacheHas.js rename to _cacheHas.js index e70856226..7f2ac4847 100644 --- a/internal/cacheHas.js +++ b/_cacheHas.js @@ -1,4 +1,4 @@ -var isKeyable = require('./isKeyable'); +var isKeyable = require('./_isKeyable'); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; diff --git a/internal/cachePush.js b/_cachePush.js similarity index 92% rename from internal/cachePush.js rename to _cachePush.js index 7defae4be..638383b64 100644 --- a/internal/cachePush.js +++ b/_cachePush.js @@ -1,4 +1,4 @@ -var isKeyable = require('./isKeyable'); +var isKeyable = require('./_isKeyable'); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; diff --git a/internal/charsEndIndex.js b/_charsEndIndex.js similarity index 92% rename from internal/charsEndIndex.js rename to _charsEndIndex.js index c7f8b150f..07908ff3a 100644 --- a/internal/charsEndIndex.js +++ b/_charsEndIndex.js @@ -1,4 +1,4 @@ -var baseIndexOf = require('./baseIndexOf'); +var baseIndexOf = require('./_baseIndexOf'); /** * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol diff --git a/internal/charsStartIndex.js b/_charsStartIndex.js similarity index 92% rename from internal/charsStartIndex.js rename to _charsStartIndex.js index e3ed1a351..b17afd254 100644 --- a/internal/charsStartIndex.js +++ b/_charsStartIndex.js @@ -1,4 +1,4 @@ -var baseIndexOf = require('./baseIndexOf'); +var baseIndexOf = require('./_baseIndexOf'); /** * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol diff --git a/internal/cloneBuffer.js b/_cloneBuffer.js similarity index 90% rename from internal/cloneBuffer.js rename to _cloneBuffer.js index f40d9b058..defdb151c 100644 --- a/internal/cloneBuffer.js +++ b/_cloneBuffer.js @@ -1,4 +1,4 @@ -var Uint8Array = require('./Uint8Array'); +var Uint8Array = require('./_Uint8Array'); /** * Creates a clone of `buffer`. diff --git a/internal/cloneMap.js b/_cloneMap.js similarity index 68% rename from internal/cloneMap.js rename to _cloneMap.js index d36b5c7c2..1b5af07f8 100644 --- a/internal/cloneMap.js +++ b/_cloneMap.js @@ -1,6 +1,6 @@ -var addMapEntry = require('./addMapEntry'), - arrayReduce = require('./arrayReduce'), - mapToArray = require('./mapToArray'); +var addMapEntry = require('./_addMapEntry'), + arrayReduce = require('./_arrayReduce'), + mapToArray = require('./_mapToArray'); /** * Creates a clone of `map`. diff --git a/internal/cloneRegExp.js b/_cloneRegExp.js similarity index 100% rename from internal/cloneRegExp.js rename to _cloneRegExp.js diff --git a/internal/cloneSet.js b/_cloneSet.js similarity index 68% rename from internal/cloneSet.js rename to _cloneSet.js index 6c1622e95..a6fa4a2f8 100644 --- a/internal/cloneSet.js +++ b/_cloneSet.js @@ -1,6 +1,6 @@ -var addSetEntry = require('./addSetEntry'), - arrayReduce = require('./arrayReduce'), - setToArray = require('./setToArray'); +var addSetEntry = require('./_addSetEntry'), + arrayReduce = require('./_arrayReduce'), + setToArray = require('./_setToArray'); /** * Creates a clone of `set`. diff --git a/internal/cloneSymbol.js b/_cloneSymbol.js similarity index 93% rename from internal/cloneSymbol.js rename to _cloneSymbol.js index 1310b3a51..ac0217d74 100644 --- a/internal/cloneSymbol.js +++ b/_cloneSymbol.js @@ -1,4 +1,4 @@ -var Symbol = require('./Symbol'); +var Symbol = require('./_Symbol'); /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, diff --git a/internal/cloneTypedArray.js b/_cloneTypedArray.js similarity index 91% rename from internal/cloneTypedArray.js rename to _cloneTypedArray.js index 9d15e7d89..b17467de2 100644 --- a/internal/cloneTypedArray.js +++ b/_cloneTypedArray.js @@ -1,4 +1,4 @@ -var cloneBuffer = require('./cloneBuffer'); +var cloneBuffer = require('./_cloneBuffer'); /** * Creates a clone of `typedArray`. diff --git a/internal/compareAscending.js b/_compareAscending.js similarity index 100% rename from internal/compareAscending.js rename to _compareAscending.js diff --git a/internal/compareMultiple.js b/_compareMultiple.js similarity index 96% rename from internal/compareMultiple.js rename to _compareMultiple.js index fba43b6a1..a3f2d8b9a 100644 --- a/internal/compareMultiple.js +++ b/_compareMultiple.js @@ -1,4 +1,4 @@ -var compareAscending = require('./compareAscending'); +var compareAscending = require('./_compareAscending'); /** * Used by `_.orderBy` to compare multiple properties of a value to another diff --git a/internal/composeArgs.js b/_composeArgs.js similarity index 100% rename from internal/composeArgs.js rename to _composeArgs.js diff --git a/internal/composeArgsRight.js b/_composeArgsRight.js similarity index 100% rename from internal/composeArgsRight.js rename to _composeArgsRight.js diff --git a/internal/copyArray.js b/_copyArray.js similarity index 100% rename from internal/copyArray.js rename to _copyArray.js diff --git a/internal/copyObject.js b/_copyObject.js similarity index 89% rename from internal/copyObject.js rename to _copyObject.js index 12ad6c64b..f8406b654 100644 --- a/internal/copyObject.js +++ b/_copyObject.js @@ -1,4 +1,4 @@ -var copyObjectWith = require('./copyObjectWith'); +var copyObjectWith = require('./_copyObjectWith'); /** * Copies properties of `source` to `object`. diff --git a/internal/copyObjectWith.js b/_copyObjectWith.js similarity index 94% rename from internal/copyObjectWith.js rename to _copyObjectWith.js index 7c71e87d6..ac5b9d3be 100644 --- a/internal/copyObjectWith.js +++ b/_copyObjectWith.js @@ -1,4 +1,4 @@ -var assignValue = require('./assignValue'); +var assignValue = require('./_assignValue'); /** * This function is like `copyObject` except that it accepts a function to diff --git a/internal/copySymbols.js b/_copySymbols.js similarity index 81% rename from internal/copySymbols.js rename to _copySymbols.js index e20898b80..1fac3c8a6 100644 --- a/internal/copySymbols.js +++ b/_copySymbols.js @@ -1,5 +1,5 @@ -var copyObject = require('./copyObject'), - getSymbols = require('./getSymbols'); +var copyObject = require('./_copyObject'), + getSymbols = require('./_getSymbols'); /** * Copies own symbol properties of `source` to `object`. diff --git a/_createAggregator.js b/_createAggregator.js new file mode 100644 index 000000000..7f7afd2c1 --- /dev/null +++ b/_createAggregator.js @@ -0,0 +1,23 @@ +var arrayAggregator = require('./_arrayAggregator'), + baseAggregator = require('./_baseAggregator'), + baseIteratee = require('./_baseIteratee'), + isArray = require('./isArray'); + +/** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ +function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, baseIteratee(iteratee), accumulator); + }; +} + +module.exports = createAggregator; diff --git a/internal/createAssigner.js b/_createAssigner.js similarity index 91% rename from internal/createAssigner.js rename to _createAssigner.js index 7dbbc0c64..72c3039e5 100644 --- a/internal/createAssigner.js +++ b/_createAssigner.js @@ -1,5 +1,5 @@ -var isIterateeCall = require('./isIterateeCall'), - rest = require('../rest'); +var isIterateeCall = require('./_isIterateeCall'), + rest = require('./rest'); /** * Creates a function like `_.assign`. diff --git a/internal/createBaseEach.js b/_createBaseEach.js similarity index 94% rename from internal/createBaseEach.js rename to _createBaseEach.js index ab6541b2f..d24fdd1bb 100644 --- a/internal/createBaseEach.js +++ b/_createBaseEach.js @@ -1,4 +1,4 @@ -var isArrayLike = require('../isArrayLike'); +var isArrayLike = require('./isArrayLike'); /** * Creates a `baseEach` or `baseEachRight` function. diff --git a/internal/createBaseFor.js b/_createBaseFor.js similarity index 100% rename from internal/createBaseFor.js rename to _createBaseFor.js diff --git a/internal/createBaseWrapper.js b/_createBaseWrapper.js similarity index 93% rename from internal/createBaseWrapper.js rename to _createBaseWrapper.js index f81d42688..f1e81c35b 100644 --- a/internal/createBaseWrapper.js +++ b/_createBaseWrapper.js @@ -1,4 +1,4 @@ -var createCtorWrapper = require('./createCtorWrapper'); +var createCtorWrapper = require('./_createCtorWrapper'); /** Used to compose bitmasks for wrapper metadata. */ var BIND_FLAG = 1; diff --git a/internal/createCaseFirst.js b/_createCaseFirst.js similarity index 93% rename from internal/createCaseFirst.js rename to _createCaseFirst.js index 2c29e0137..5718f6f4a 100644 --- a/internal/createCaseFirst.js +++ b/_createCaseFirst.js @@ -1,5 +1,5 @@ -var stringToArray = require('./stringToArray'), - toString = require('../toString'); +var stringToArray = require('./_stringToArray'), + toString = require('./toString'); /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', diff --git a/internal/createCompounder.js b/_createCompounder.js similarity index 76% rename from internal/createCompounder.js rename to _createCompounder.js index 7d92c2680..bfa4ee5fe 100644 --- a/internal/createCompounder.js +++ b/_createCompounder.js @@ -1,6 +1,6 @@ -var arrayReduce = require('./arrayReduce'), - deburr = require('../deburr'), - words = require('../words'); +var arrayReduce = require('./_arrayReduce'), + deburr = require('./deburr'), + words = require('./words'); /** * Creates a function like `_.camelCase`. diff --git a/internal/createCtorWrapper.js b/_createCtorWrapper.js similarity index 94% rename from internal/createCtorWrapper.js rename to _createCtorWrapper.js index f5f0bcd01..a0a7f83d7 100644 --- a/internal/createCtorWrapper.js +++ b/_createCtorWrapper.js @@ -1,5 +1,5 @@ -var baseCreate = require('./baseCreate'), - isObject = require('../isObject'); +var baseCreate = require('./_baseCreate'), + isObject = require('./isObject'); /** * Creates a function that produces an instance of `Ctor` regardless of diff --git a/internal/createCurryWrapper.js b/_createCurryWrapper.js similarity index 81% rename from internal/createCurryWrapper.js rename to _createCurryWrapper.js index d5e1f46d4..c48d0df99 100644 --- a/internal/createCurryWrapper.js +++ b/_createCurryWrapper.js @@ -1,8 +1,8 @@ -var apply = require('./apply'), - createCtorWrapper = require('./createCtorWrapper'), - createHybridWrapper = require('./createHybridWrapper'), - createRecurryWrapper = require('./createRecurryWrapper'), - replaceHolders = require('./replaceHolders'); +var apply = require('./_apply'), + createCtorWrapper = require('./_createCtorWrapper'), + createHybridWrapper = require('./_createHybridWrapper'), + createRecurryWrapper = require('./_createRecurryWrapper'), + replaceHolders = require('./_replaceHolders'); /** * Creates a function that wraps `func` to enable currying. diff --git a/internal/createFlow.js b/_createFlow.js similarity index 88% rename from internal/createFlow.js rename to _createFlow.js index 3041f4a16..1d5e5f181 100644 --- a/internal/createFlow.js +++ b/_createFlow.js @@ -1,10 +1,10 @@ -var LodashWrapper = require('./LodashWrapper'), - baseFlatten = require('./baseFlatten'), - getData = require('./getData'), - getFuncName = require('./getFuncName'), - isArray = require('../isArray'), - isLaziable = require('./isLaziable'), - rest = require('../rest'); +var LodashWrapper = require('./_LodashWrapper'), + baseFlatten = require('./_baseFlatten'), + getData = require('./_getData'), + getFuncName = require('./_getFuncName'), + isArray = require('./isArray'), + isLaziable = require('./_isLaziable'), + rest = require('./rest'); /** Used to compose bitmasks for wrapper metadata. */ var CURRY_FLAG = 8, diff --git a/internal/createHybridWrapper.js b/_createHybridWrapper.js similarity index 89% rename from internal/createHybridWrapper.js rename to _createHybridWrapper.js index eb3a71f29..b8d587fa1 100644 --- a/internal/createHybridWrapper.js +++ b/_createHybridWrapper.js @@ -1,9 +1,9 @@ -var composeArgs = require('./composeArgs'), - composeArgsRight = require('./composeArgsRight'), - createCtorWrapper = require('./createCtorWrapper'), - createRecurryWrapper = require('./createRecurryWrapper'), - reorder = require('./reorder'), - replaceHolders = require('./replaceHolders'); +var composeArgs = require('./_composeArgs'), + composeArgsRight = require('./_composeArgsRight'), + createCtorWrapper = require('./_createCtorWrapper'), + createRecurryWrapper = require('./_createRecurryWrapper'), + reorder = require('./_reorder'), + replaceHolders = require('./_replaceHolders'); /** Used to compose bitmasks for wrapper metadata. */ var BIND_FLAG = 1, diff --git a/_createInverter.js b/_createInverter.js new file mode 100644 index 000000000..6c0c56299 --- /dev/null +++ b/_createInverter.js @@ -0,0 +1,17 @@ +var baseInverter = require('./_baseInverter'); + +/** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ +function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; +} + +module.exports = createInverter; diff --git a/internal/createOver.js b/_createOver.js similarity index 73% rename from internal/createOver.js rename to _createOver.js index 5b1165741..62fed0216 100644 --- a/internal/createOver.js +++ b/_createOver.js @@ -1,8 +1,8 @@ -var apply = require('./apply'), - arrayMap = require('./arrayMap'), - baseFlatten = require('./baseFlatten'), - baseIteratee = require('./baseIteratee'), - rest = require('../rest'); +var apply = require('./_apply'), + arrayMap = require('./_arrayMap'), + baseFlatten = require('./_baseFlatten'), + baseIteratee = require('./_baseIteratee'), + rest = require('./rest'); /** * Creates a function like `_.over`. diff --git a/internal/createPadding.js b/_createPadding.js similarity index 90% rename from internal/createPadding.js rename to _createPadding.js index 0e5a02526..e59cc5212 100644 --- a/internal/createPadding.js +++ b/_createPadding.js @@ -1,7 +1,7 @@ -var repeat = require('../repeat'), - stringSize = require('./stringSize'), - stringToArray = require('./stringToArray'), - toInteger = require('../toInteger'); +var repeat = require('./repeat'), + stringSize = require('./_stringSize'), + stringToArray = require('./_stringToArray'), + toInteger = require('./toInteger'); /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', diff --git a/internal/createPartialWrapper.js b/_createPartialWrapper.js similarity index 93% rename from internal/createPartialWrapper.js rename to _createPartialWrapper.js index ad968ea9e..cd4e26986 100644 --- a/internal/createPartialWrapper.js +++ b/_createPartialWrapper.js @@ -1,5 +1,5 @@ -var apply = require('./apply'), - createCtorWrapper = require('./createCtorWrapper'); +var apply = require('./_apply'), + createCtorWrapper = require('./_createCtorWrapper'); /** Used to compose bitmasks for wrapper metadata. */ var BIND_FLAG = 1; diff --git a/internal/createRange.js b/_createRange.js similarity index 85% rename from internal/createRange.js rename to _createRange.js index 056f72828..972856366 100644 --- a/internal/createRange.js +++ b/_createRange.js @@ -1,6 +1,6 @@ -var baseRange = require('./baseRange'), - isIterateeCall = require('./isIterateeCall'), - toNumber = require('../toNumber'); +var baseRange = require('./_baseRange'), + isIterateeCall = require('./_isIterateeCall'), + toNumber = require('./toNumber'); /** * Creates a `_.range` or `_.rangeRight` function. diff --git a/internal/createRecurryWrapper.js b/_createRecurryWrapper.js similarity index 94% rename from internal/createRecurryWrapper.js rename to _createRecurryWrapper.js index a752d9127..2e3f10a89 100644 --- a/internal/createRecurryWrapper.js +++ b/_createRecurryWrapper.js @@ -1,6 +1,6 @@ -var copyArray = require('./copyArray'), - isLaziable = require('./isLaziable'), - setData = require('./setData'); +var copyArray = require('./_copyArray'), + isLaziable = require('./_isLaziable'), + setData = require('./_setData'); /** Used to compose bitmasks for wrapper metadata. */ var BIND_FLAG = 1, diff --git a/internal/createRound.js b/_createRound.js similarity index 87% rename from internal/createRound.js rename to _createRound.js index 3431fe02f..cb42ba246 100644 --- a/internal/createRound.js +++ b/_createRound.js @@ -1,6 +1,6 @@ -var toInteger = require('../toInteger'), - toNumber = require('../toNumber'), - toString = require('../toString'); +var toInteger = require('./toInteger'), + toNumber = require('./toNumber'), + toString = require('./toString'); /** * Creates a function like `_.round`. diff --git a/internal/createSet.js b/_createSet.js similarity index 83% rename from internal/createSet.js rename to _createSet.js index 302457c85..c67128f24 100644 --- a/internal/createSet.js +++ b/_createSet.js @@ -1,5 +1,5 @@ -var Set = require('./Set'), - noop = require('../noop'); +var Set = require('./_Set'), + noop = require('./noop'); /** * Creates a set of `values`. diff --git a/internal/createWrapper.js b/_createWrapper.js similarity index 88% rename from internal/createWrapper.js rename to _createWrapper.js index ec79b7cc6..f391c1a35 100644 --- a/internal/createWrapper.js +++ b/_createWrapper.js @@ -1,12 +1,12 @@ -var baseSetData = require('./baseSetData'), - createBaseWrapper = require('./createBaseWrapper'), - createCurryWrapper = require('./createCurryWrapper'), - createHybridWrapper = require('./createHybridWrapper'), - createPartialWrapper = require('./createPartialWrapper'), - getData = require('./getData'), - mergeData = require('./mergeData'), - setData = require('./setData'), - toInteger = require('../toInteger'); +var baseSetData = require('./_baseSetData'), + createBaseWrapper = require('./_createBaseWrapper'), + createCurryWrapper = require('./_createCurryWrapper'), + createHybridWrapper = require('./_createHybridWrapper'), + createPartialWrapper = require('./_createPartialWrapper'), + getData = require('./_getData'), + mergeData = require('./_mergeData'), + setData = require('./_setData'), + toInteger = require('./toInteger'); /** Used to compose bitmasks for wrapper metadata. */ var BIND_FLAG = 1, diff --git a/internal/deburrLetter.js b/_deburrLetter.js similarity index 100% rename from internal/deburrLetter.js rename to _deburrLetter.js diff --git a/internal/equalArrays.js b/_equalArrays.js similarity index 98% rename from internal/equalArrays.js rename to _equalArrays.js index fda3ac64d..f789ee588 100644 --- a/internal/equalArrays.js +++ b/_equalArrays.js @@ -1,4 +1,4 @@ -var arraySome = require('./arraySome'); +var arraySome = require('./_arraySome'); /** Used to compose bitmasks for comparison styles. */ var UNORDERED_COMPARE_FLAG = 1, diff --git a/internal/equalByTag.js b/_equalByTag.js similarity index 94% rename from internal/equalByTag.js rename to _equalByTag.js index ba00fa3b3..bc503f3f5 100644 --- a/internal/equalByTag.js +++ b/_equalByTag.js @@ -1,7 +1,7 @@ -var Symbol = require('./Symbol'), - Uint8Array = require('./Uint8Array'), - mapToArray = require('./mapToArray'), - setToArray = require('./setToArray'); +var Symbol = require('./_Symbol'), + Uint8Array = require('./_Uint8Array'), + mapToArray = require('./_mapToArray'), + setToArray = require('./_setToArray'); /** Used to compose bitmasks for comparison styles. */ var UNORDERED_COMPARE_FLAG = 1, diff --git a/internal/equalObjects.js b/_equalObjects.js similarity index 97% rename from internal/equalObjects.js rename to _equalObjects.js index ad95a755e..8e4a8547b 100644 --- a/internal/equalObjects.js +++ b/_equalObjects.js @@ -1,5 +1,5 @@ -var baseHas = require('./baseHas'), - keys = require('../keys'); +var baseHas = require('./_baseHas'), + keys = require('./keys'); /** Used to compose bitmasks for comparison styles. */ var PARTIAL_COMPARE_FLAG = 2; diff --git a/internal/escapeHtmlChar.js b/_escapeHtmlChar.js similarity index 100% rename from internal/escapeHtmlChar.js rename to _escapeHtmlChar.js diff --git a/internal/escapeStringChar.js b/_escapeStringChar.js similarity index 100% rename from internal/escapeStringChar.js rename to _escapeStringChar.js diff --git a/internal/getData.js b/_getData.js similarity index 79% rename from internal/getData.js rename to _getData.js index 376ba8739..a1fe7b779 100644 --- a/internal/getData.js +++ b/_getData.js @@ -1,5 +1,5 @@ -var metaMap = require('./metaMap'), - noop = require('../noop'); +var metaMap = require('./_metaMap'), + noop = require('./noop'); /** * Gets metadata for `func`. diff --git a/internal/getFuncName.js b/_getFuncName.js similarity index 94% rename from internal/getFuncName.js rename to _getFuncName.js index 4a555ad13..65bb80178 100644 --- a/internal/getFuncName.js +++ b/_getFuncName.js @@ -1,4 +1,4 @@ -var realNames = require('./realNames'); +var realNames = require('./_realNames'); /** Used for built-in method references. */ var objectProto = global.Object.prototype; diff --git a/internal/getLength.js b/_getLength.js similarity index 89% rename from internal/getLength.js rename to _getLength.js index 48d75ae13..1848d4901 100644 --- a/internal/getLength.js +++ b/_getLength.js @@ -1,4 +1,4 @@ -var baseProperty = require('./baseProperty'); +var baseProperty = require('./_baseProperty'); /** * Gets the "length" property value of `object`. diff --git a/internal/getMatchData.js b/_getMatchData.js similarity index 81% rename from internal/getMatchData.js rename to _getMatchData.js index a295631ec..a1456d240 100644 --- a/internal/getMatchData.js +++ b/_getMatchData.js @@ -1,5 +1,5 @@ -var isStrictComparable = require('./isStrictComparable'), - toPairs = require('../toPairs'); +var isStrictComparable = require('./_isStrictComparable'), + toPairs = require('./toPairs'); /** * Gets the property names, values, and compare flags of `object`. diff --git a/internal/getNative.js b/_getNative.js similarity index 91% rename from internal/getNative.js rename to _getNative.js index 08d520265..b85007aee 100644 --- a/internal/getNative.js +++ b/_getNative.js @@ -1,4 +1,4 @@ -var isNative = require('../isNative'); +var isNative = require('./isNative'); /** * Gets the native function at `key` of `object`. diff --git a/internal/getSymbols.js b/_getSymbols.js similarity index 100% rename from internal/getSymbols.js rename to _getSymbols.js diff --git a/internal/getTag.js b/_getTag.js similarity index 96% rename from internal/getTag.js rename to _getTag.js index c0a08e986..297e33208 100644 --- a/internal/getTag.js +++ b/_getTag.js @@ -1,5 +1,5 @@ -var Map = require('./Map'), - Set = require('./Set'); +var Map = require('./_Map'), + Set = require('./_Set'); /** `Object#toString` result references. */ var mapTag = '[object Map]', diff --git a/internal/getView.js b/_getView.js similarity index 100% rename from internal/getView.js rename to _getView.js diff --git a/internal/hasPath.js b/_hasPath.js similarity index 59% rename from internal/hasPath.js rename to _hasPath.js index 21c5dc698..c063592ce 100644 --- a/internal/hasPath.js +++ b/_hasPath.js @@ -1,12 +1,12 @@ -var baseToPath = require('./baseToPath'), - isArguments = require('../isArguments'), - isArray = require('../isArray'), - isIndex = require('./isIndex'), - isKey = require('./isKey'), - isLength = require('../isLength'), - isString = require('../isString'), - last = require('../last'), - parent = require('./parent'); +var baseToPath = require('./_baseToPath'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isIndex = require('./_isIndex'), + isKey = require('./_isKey'), + isLength = require('./isLength'), + isString = require('./isString'), + last = require('./last'), + parent = require('./_parent'); /** * Checks if `path` exists on `object`. @@ -30,8 +30,11 @@ function hasPath(object, path, hasFunc) { result = hasFunc(object, path); } } - return result || (isLength(object && object.length) && isIndex(path, object.length) && - (isArray(object) || isString(object) || isArguments(object))); + var length = object ? object.length : undefined; + return result || ( + !!length && isLength(length) && isIndex(path, length) && + (isArray(object) || isString(object) || isArguments(object)) + ); } module.exports = hasPath; diff --git a/internal/hashDelete.js b/_hashDelete.js similarity index 90% rename from internal/hashDelete.js rename to _hashDelete.js index ad6cd6c07..b562317c0 100644 --- a/internal/hashDelete.js +++ b/_hashDelete.js @@ -1,4 +1,4 @@ -var hashHas = require('./hashHas'); +var hashHas = require('./_hashHas'); /** * Removes `key` and its value from the hash. diff --git a/internal/hashGet.js b/_hashGet.js similarity index 93% rename from internal/hashGet.js rename to _hashGet.js index ba605030d..d8610c9e9 100644 --- a/internal/hashGet.js +++ b/_hashGet.js @@ -1,4 +1,4 @@ -var nativeCreate = require('./nativeCreate'); +var nativeCreate = require('./_nativeCreate'); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; diff --git a/internal/hashHas.js b/_hashHas.js similarity index 92% rename from internal/hashHas.js rename to _hashHas.js index 8348fa654..2d658b979 100644 --- a/internal/hashHas.js +++ b/_hashHas.js @@ -1,4 +1,4 @@ -var nativeCreate = require('./nativeCreate'); +var nativeCreate = require('./_nativeCreate'); /** Used for built-in method references. */ var objectProto = global.Object.prototype; diff --git a/internal/hashSet.js b/_hashSet.js similarity index 90% rename from internal/hashSet.js rename to _hashSet.js index d238f3dd1..f7c330739 100644 --- a/internal/hashSet.js +++ b/_hashSet.js @@ -1,4 +1,4 @@ -var nativeCreate = require('./nativeCreate'); +var nativeCreate = require('./_nativeCreate'); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; diff --git a/internal/indexKeys.js b/_indexKeys.js similarity index 51% rename from internal/indexKeys.js rename to _indexKeys.js index afb9d3a3f..0e2fc1048 100644 --- a/internal/indexKeys.js +++ b/_indexKeys.js @@ -1,8 +1,8 @@ -var baseTimes = require('./baseTimes'), - isArguments = require('../isArguments'), - isArray = require('../isArray'), - isLength = require('../isLength'), - isString = require('../isString'); +var baseTimes = require('./_baseTimes'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isLength = require('./isLength'), + isString = require('./isString'); /** * Creates an array of index keys for `object` values of arrays, @@ -14,9 +14,11 @@ var baseTimes = require('./baseTimes'), */ function indexKeys(object) { var length = object ? object.length : undefined; - return (isLength(length) && (isArray(object) || isString(object) || isArguments(object))) - ? baseTimes(length, String) - : null; + if (isLength(length) && + (isArray(object) || isString(object) || isArguments(object))) { + return baseTimes(length, String); + } + return null; } module.exports = indexKeys; diff --git a/internal/indexOfNaN.js b/_indexOfNaN.js similarity index 100% rename from internal/indexOfNaN.js rename to _indexOfNaN.js diff --git a/internal/initCloneArray.js b/_initCloneArray.js similarity index 100% rename from internal/initCloneArray.js rename to _initCloneArray.js diff --git a/internal/initCloneByTag.js b/_initCloneByTag.js similarity index 87% rename from internal/initCloneByTag.js rename to _initCloneByTag.js index e86df9c97..c326ba908 100644 --- a/internal/initCloneByTag.js +++ b/_initCloneByTag.js @@ -1,9 +1,9 @@ -var cloneBuffer = require('./cloneBuffer'), - cloneMap = require('./cloneMap'), - cloneRegExp = require('./cloneRegExp'), - cloneSet = require('./cloneSet'), - cloneSymbol = require('./cloneSymbol'), - cloneTypedArray = require('./cloneTypedArray'); +var cloneBuffer = require('./_cloneBuffer'), + cloneMap = require('./_cloneMap'), + cloneRegExp = require('./_cloneRegExp'), + cloneSet = require('./_cloneSet'), + cloneSymbol = require('./_cloneSymbol'), + cloneTypedArray = require('./_cloneTypedArray'); /** `Object#toString` result references. */ var boolTag = '[object Boolean]', diff --git a/internal/initCloneObject.js b/_initCloneObject.js similarity index 64% rename from internal/initCloneObject.js rename to _initCloneObject.js index 09192a7cc..b1da6cb7a 100644 --- a/internal/initCloneObject.js +++ b/_initCloneObject.js @@ -1,5 +1,6 @@ -var baseCreate = require('./baseCreate'), - isFunction = require('../isFunction'); +var baseCreate = require('./_baseCreate'), + isFunction = require('./isFunction'), + isPrototype = require('./_isPrototype'); /** * Initializes an object clone. @@ -9,6 +10,9 @@ var baseCreate = require('./baseCreate'), * @returns {Object} Returns the initialized clone. */ function initCloneObject(object) { + if (isPrototype(object)) { + return {}; + } var Ctor = object.constructor; return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined); } diff --git a/internal/isHostObject.js b/_isHostObject.js similarity index 100% rename from internal/isHostObject.js rename to _isHostObject.js diff --git a/internal/isIndex.js b/_isIndex.js similarity index 100% rename from internal/isIndex.js rename to _isIndex.js diff --git a/internal/isIterateeCall.js b/_isIterateeCall.js similarity index 83% rename from internal/isIterateeCall.js rename to _isIterateeCall.js index eb7c01789..34afa3ea8 100644 --- a/internal/isIterateeCall.js +++ b/_isIterateeCall.js @@ -1,7 +1,7 @@ -var eq = require('../eq'), - isArrayLike = require('../isArrayLike'), - isIndex = require('./isIndex'), - isObject = require('../isObject'); +var eq = require('./eq'), + isArrayLike = require('./isArrayLike'), + isIndex = require('./_isIndex'), + isObject = require('./isObject'); /** * Checks if the provided arguments are from an iteratee call. diff --git a/internal/isKey.js b/_isKey.js similarity index 94% rename from internal/isKey.js rename to _isKey.js index f79128636..0e34576fa 100644 --- a/internal/isKey.js +++ b/_isKey.js @@ -1,4 +1,4 @@ -var isArray = require('../isArray'); +var isArray = require('./isArray'); /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, diff --git a/internal/isKeyable.js b/_isKeyable.js similarity index 100% rename from internal/isKeyable.js rename to _isKeyable.js diff --git a/internal/isLaziable.js b/_isLaziable.js similarity index 76% rename from internal/isLaziable.js rename to _isLaziable.js index edafcd9b2..faa17b9fb 100644 --- a/internal/isLaziable.js +++ b/_isLaziable.js @@ -1,7 +1,7 @@ -var LazyWrapper = require('./LazyWrapper'), - getData = require('./getData'), - getFuncName = require('./getFuncName'), - lodash = require('../wrapperLodash'); +var LazyWrapper = require('./_LazyWrapper'), + getData = require('./_getData'), + getFuncName = require('./_getFuncName'), + lodash = require('./wrapperLodash'); /** * Checks if `func` has a lazy counterpart. diff --git a/internal/isPrototype.js b/_isPrototype.js similarity index 100% rename from internal/isPrototype.js rename to _isPrototype.js diff --git a/internal/isStrictComparable.js b/_isStrictComparable.js similarity index 90% rename from internal/isStrictComparable.js rename to _isStrictComparable.js index e3e029b68..b59f40b85 100644 --- a/internal/isStrictComparable.js +++ b/_isStrictComparable.js @@ -1,4 +1,4 @@ -var isObject = require('../isObject'); +var isObject = require('./isObject'); /** * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. diff --git a/internal/iteratorToArray.js b/_iteratorToArray.js similarity index 100% rename from internal/iteratorToArray.js rename to _iteratorToArray.js diff --git a/internal/lazyClone.js b/_lazyClone.js similarity index 86% rename from internal/lazyClone.js rename to _lazyClone.js index 1e39ef0b3..d8a51f870 100644 --- a/internal/lazyClone.js +++ b/_lazyClone.js @@ -1,5 +1,5 @@ -var LazyWrapper = require('./LazyWrapper'), - copyArray = require('./copyArray'); +var LazyWrapper = require('./_LazyWrapper'), + copyArray = require('./_copyArray'); /** * Creates a clone of the lazy wrapper object. diff --git a/internal/lazyReverse.js b/_lazyReverse.js similarity index 90% rename from internal/lazyReverse.js rename to _lazyReverse.js index c658402f9..c5b52190f 100644 --- a/internal/lazyReverse.js +++ b/_lazyReverse.js @@ -1,4 +1,4 @@ -var LazyWrapper = require('./LazyWrapper'); +var LazyWrapper = require('./_LazyWrapper'); /** * Reverses the direction of lazy iteration. diff --git a/internal/lazyValue.js b/_lazyValue.js similarity index 93% rename from internal/lazyValue.js rename to _lazyValue.js index ba6972957..cc6ebcff1 100644 --- a/internal/lazyValue.js +++ b/_lazyValue.js @@ -1,6 +1,6 @@ -var baseWrapperValue = require('./baseWrapperValue'), - getView = require('./getView'), - isArray = require('../isArray'); +var baseWrapperValue = require('./_baseWrapperValue'), + getView = require('./_getView'), + isArray = require('./isArray'); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; diff --git a/internal/mapClear.js b/_mapClear.js similarity index 80% rename from internal/mapClear.js rename to _mapClear.js index cae5fdddd..c8ca3ef7c 100644 --- a/internal/mapClear.js +++ b/_mapClear.js @@ -1,5 +1,5 @@ -var Hash = require('./Hash'), - Map = require('./Map'); +var Hash = require('./_Hash'), + Map = require('./_Map'); /** * Removes all key-value entries from the map. diff --git a/internal/mapDelete.js b/_mapDelete.js similarity index 75% rename from internal/mapDelete.js rename to _mapDelete.js index 261a9fc33..640eb0a19 100644 --- a/internal/mapDelete.js +++ b/_mapDelete.js @@ -1,7 +1,7 @@ -var Map = require('./Map'), - assocDelete = require('./assocDelete'), - hashDelete = require('./hashDelete'), - isKeyable = require('./isKeyable'); +var Map = require('./_Map'), + assocDelete = require('./_assocDelete'), + hashDelete = require('./_hashDelete'), + isKeyable = require('./_isKeyable'); /** * Removes `key` and its value from the map. diff --git a/internal/mapGet.js b/_mapGet.js similarity index 74% rename from internal/mapGet.js rename to _mapGet.js index 7e1e61e91..8f33854a5 100644 --- a/internal/mapGet.js +++ b/_mapGet.js @@ -1,7 +1,7 @@ -var Map = require('./Map'), - assocGet = require('./assocGet'), - hashGet = require('./hashGet'), - isKeyable = require('./isKeyable'); +var Map = require('./_Map'), + assocGet = require('./_assocGet'), + hashGet = require('./_hashGet'), + isKeyable = require('./_isKeyable'); /** * Gets the map value for `key`. diff --git a/internal/mapHas.js b/_mapHas.js similarity index 76% rename from internal/mapHas.js rename to _mapHas.js index 851e3d4a5..9225537b9 100644 --- a/internal/mapHas.js +++ b/_mapHas.js @@ -1,7 +1,7 @@ -var Map = require('./Map'), - assocHas = require('./assocHas'), - hashHas = require('./hashHas'), - isKeyable = require('./isKeyable'); +var Map = require('./_Map'), + assocHas = require('./_assocHas'), + hashHas = require('./_hashHas'), + isKeyable = require('./_isKeyable'); /** * Checks if a map value for `key` exists. diff --git a/internal/mapSet.js b/_mapSet.js similarity index 78% rename from internal/mapSet.js rename to _mapSet.js index 43a646348..7a587861e 100644 --- a/internal/mapSet.js +++ b/_mapSet.js @@ -1,7 +1,7 @@ -var Map = require('./Map'), - assocSet = require('./assocSet'), - hashSet = require('./hashSet'), - isKeyable = require('./isKeyable'); +var Map = require('./_Map'), + assocSet = require('./_assocSet'), + hashSet = require('./_hashSet'), + isKeyable = require('./_isKeyable'); /** * Sets the map `key` to `value`. diff --git a/internal/mapToArray.js b/_mapToArray.js similarity index 100% rename from internal/mapToArray.js rename to _mapToArray.js diff --git a/internal/mergeData.js b/_mergeData.js similarity index 93% rename from internal/mergeData.js rename to _mergeData.js index ca8b167a6..3be23cefa 100644 --- a/internal/mergeData.js +++ b/_mergeData.js @@ -1,7 +1,7 @@ -var composeArgs = require('./composeArgs'), - composeArgsRight = require('./composeArgsRight'), - copyArray = require('./copyArray'), - replaceHolders = require('./replaceHolders'); +var composeArgs = require('./_composeArgs'), + composeArgsRight = require('./_composeArgsRight'), + copyArray = require('./_copyArray'), + replaceHolders = require('./_replaceHolders'); /** Used to compose bitmasks for wrapper metadata. */ var BIND_FLAG = 1, diff --git a/internal/mergeDefaults.js b/_mergeDefaults.js similarity index 90% rename from internal/mergeDefaults.js rename to _mergeDefaults.js index 97ab718ec..b09c66b43 100644 --- a/internal/mergeDefaults.js +++ b/_mergeDefaults.js @@ -1,5 +1,5 @@ -var baseMerge = require('./baseMerge'), - isObject = require('../isObject'); +var baseMerge = require('./_baseMerge'), + isObject = require('./isObject'); /** * Used by `_.defaultsDeep` to customize its `_.merge` use. diff --git a/internal/metaMap.js b/_metaMap.js similarity index 74% rename from internal/metaMap.js rename to _metaMap.js index 0c67d9945..0157a0b09 100644 --- a/internal/metaMap.js +++ b/_metaMap.js @@ -1,4 +1,4 @@ -var WeakMap = require('./WeakMap'); +var WeakMap = require('./_WeakMap'); /** Used to store function metadata. */ var metaMap = WeakMap && new WeakMap; diff --git a/internal/nativeCreate.js b/_nativeCreate.js similarity index 78% rename from internal/nativeCreate.js rename to _nativeCreate.js index 1d6c35cca..c7aede85b 100644 --- a/internal/nativeCreate.js +++ b/_nativeCreate.js @@ -1,4 +1,4 @@ -var getNative = require('./getNative'); +var getNative = require('./_getNative'); /* Built-in method references that are verified to be native. */ var nativeCreate = getNative(Object, 'create'); diff --git a/internal/parent.js b/_parent.js similarity index 83% rename from internal/parent.js rename to _parent.js index 72c162ee2..e04ff6e2a 100644 --- a/internal/parent.js +++ b/_parent.js @@ -1,5 +1,5 @@ -var baseSlice = require('./baseSlice'), - get = require('../get'); +var baseSlice = require('./_baseSlice'), + get = require('./get'); /** * Gets the parent value at `path` of `object`. diff --git a/internal/reEscape.js b/_reEscape.js similarity index 100% rename from internal/reEscape.js rename to _reEscape.js diff --git a/internal/reEvaluate.js b/_reEvaluate.js similarity index 100% rename from internal/reEvaluate.js rename to _reEvaluate.js diff --git a/internal/reInterpolate.js b/_reInterpolate.js similarity index 100% rename from internal/reInterpolate.js rename to _reInterpolate.js diff --git a/internal/realNames.js b/_realNames.js similarity index 100% rename from internal/realNames.js rename to _realNames.js diff --git a/internal/reorder.js b/_reorder.js similarity index 91% rename from internal/reorder.js rename to _reorder.js index bb09986b0..a3502b051 100644 --- a/internal/reorder.js +++ b/_reorder.js @@ -1,5 +1,5 @@ -var copyArray = require('./copyArray'), - isIndex = require('./isIndex'); +var copyArray = require('./_copyArray'), + isIndex = require('./_isIndex'); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMin = Math.min; diff --git a/internal/replaceHolders.js b/_replaceHolders.js similarity index 100% rename from internal/replaceHolders.js rename to _replaceHolders.js diff --git a/internal/setData.js b/_setData.js similarity index 93% rename from internal/setData.js rename to _setData.js index db122b3dd..8b2efca0f 100644 --- a/internal/setData.js +++ b/_setData.js @@ -1,5 +1,5 @@ -var baseSetData = require('./baseSetData'), - now = require('../now'); +var baseSetData = require('./_baseSetData'), + now = require('./now'); /** Used to detect hot functions by number of calls within a span of milliseconds. */ var HOT_COUNT = 150, diff --git a/internal/setToArray.js b/_setToArray.js similarity index 100% rename from internal/setToArray.js rename to _setToArray.js diff --git a/internal/stackClear.js b/_stackClear.js similarity index 100% rename from internal/stackClear.js rename to _stackClear.js diff --git a/internal/stackDelete.js b/_stackDelete.js similarity index 90% rename from internal/stackDelete.js rename to _stackDelete.js index 778a7e60f..7e38a1377 100644 --- a/internal/stackDelete.js +++ b/_stackDelete.js @@ -1,4 +1,4 @@ -var assocDelete = require('./assocDelete'); +var assocDelete = require('./_assocDelete'); /** * Removes `key` and its value from the stack. diff --git a/internal/stackGet.js b/_stackGet.js similarity index 90% rename from internal/stackGet.js rename to _stackGet.js index e09520207..20b9d9afa 100644 --- a/internal/stackGet.js +++ b/_stackGet.js @@ -1,4 +1,4 @@ -var assocGet = require('./assocGet'); +var assocGet = require('./_assocGet'); /** * Gets the stack value for `key`. diff --git a/internal/stackHas.js b/_stackHas.js similarity index 91% rename from internal/stackHas.js rename to _stackHas.js index 585d35d1a..7a3b0b948 100644 --- a/internal/stackHas.js +++ b/_stackHas.js @@ -1,4 +1,4 @@ -var assocHas = require('./assocHas'); +var assocHas = require('./_assocHas'); /** * Checks if a stack value for `key` exists. diff --git a/internal/stackSet.js b/_stackSet.js similarity index 90% rename from internal/stackSet.js rename to _stackSet.js index eb4de31de..0194d100f 100644 --- a/internal/stackSet.js +++ b/_stackSet.js @@ -1,5 +1,5 @@ -var MapCache = require('./MapCache'), - assocSet = require('./assocSet'); +var MapCache = require('./_MapCache'), + assocSet = require('./_assocSet'); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; diff --git a/internal/stringSize.js b/_stringSize.js similarity index 100% rename from internal/stringSize.js rename to _stringSize.js diff --git a/internal/stringToArray.js b/_stringToArray.js similarity index 100% rename from internal/stringToArray.js rename to _stringToArray.js diff --git a/internal/stringToPath.js b/_stringToPath.js similarity index 94% rename from internal/stringToPath.js rename to _stringToPath.js index 6b028eecf..a8fd82ab7 100644 --- a/internal/stringToPath.js +++ b/_stringToPath.js @@ -1,4 +1,4 @@ -var toString = require('../toString'); +var toString = require('./toString'); /** Used to match property names within property paths. */ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g; diff --git a/internal/toArrayLikeObject.js b/_toArrayLikeObject.js similarity index 84% rename from internal/toArrayLikeObject.js rename to _toArrayLikeObject.js index 2c3d43e78..be01dabc7 100644 --- a/internal/toArrayLikeObject.js +++ b/_toArrayLikeObject.js @@ -1,4 +1,4 @@ -var isArrayLikeObject = require('../isArrayLikeObject'); +var isArrayLikeObject = require('./isArrayLikeObject'); /** * Converts `value` to an array-like object if it's not one. diff --git a/internal/toFunction.js b/_toFunction.js similarity index 87% rename from internal/toFunction.js rename to _toFunction.js index 0879dfeca..4fa85d171 100644 --- a/internal/toFunction.js +++ b/_toFunction.js @@ -1,4 +1,4 @@ -var identity = require('../identity'); +var identity = require('./identity'); /** * Converts `value` to a function if it's not one. diff --git a/internal/unescapeHtmlChar.js b/_unescapeHtmlChar.js similarity index 100% rename from internal/unescapeHtmlChar.js rename to _unescapeHtmlChar.js diff --git a/internal/wrapperClone.js b/_wrapperClone.js similarity index 79% rename from internal/wrapperClone.js rename to _wrapperClone.js index 7c9eb703e..7bb58a2e8 100644 --- a/internal/wrapperClone.js +++ b/_wrapperClone.js @@ -1,6 +1,6 @@ -var LazyWrapper = require('./LazyWrapper'), - LodashWrapper = require('./LodashWrapper'), - copyArray = require('./copyArray'); +var LazyWrapper = require('./_LazyWrapper'), + LodashWrapper = require('./_LodashWrapper'), + copyArray = require('./_copyArray'); /** * Creates a clone of `wrapper`. diff --git a/array.js b/array.js index 6924c53be..eea0b10df 100644 --- a/array.js +++ b/array.js @@ -59,5 +59,6 @@ module.exports = { 'xorWith': require('./xorWith'), 'zip': require('./zip'), 'zipObject': require('./zipObject'), + 'zipObjectDeep': require('./zipObjectDeep'), 'zipWith': require('./zipWith') }; diff --git a/ary.js b/ary.js index a32f83fca..b3906acb3 100644 --- a/ary.js +++ b/ary.js @@ -1,4 +1,4 @@ -var createWrapper = require('./internal/createWrapper'); +var createWrapper = require('./_createWrapper'); /** Used to compose bitmasks for wrapper metadata. */ var ARY_FLAG = 128; diff --git a/assign.js b/assign.js index f197e9df7..d766dd0c4 100644 --- a/assign.js +++ b/assign.js @@ -1,5 +1,5 @@ -var copyObject = require('./internal/copyObject'), - createAssigner = require('./internal/createAssigner'), +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), keys = require('./keys'); /** diff --git a/assignIn.js b/assignIn.js index d32be3d0e..b4177e6ab 100644 --- a/assignIn.js +++ b/assignIn.js @@ -1,5 +1,5 @@ -var copyObject = require('./internal/copyObject'), - createAssigner = require('./internal/createAssigner'), +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), keysIn = require('./keysIn'); /** diff --git a/assignInWith.js b/assignInWith.js index 81a71b181..da73ef7c0 100644 --- a/assignInWith.js +++ b/assignInWith.js @@ -1,5 +1,5 @@ -var copyObjectWith = require('./internal/copyObjectWith'), - createAssigner = require('./internal/createAssigner'), +var copyObjectWith = require('./_copyObjectWith'), + createAssigner = require('./_createAssigner'), keysIn = require('./keysIn'); /** diff --git a/assignWith.js b/assignWith.js index 8b32b89de..eb7915b50 100644 --- a/assignWith.js +++ b/assignWith.js @@ -1,5 +1,5 @@ -var copyObjectWith = require('./internal/copyObjectWith'), - createAssigner = require('./internal/createAssigner'), +var copyObjectWith = require('./_copyObjectWith'), + createAssigner = require('./_createAssigner'), keys = require('./keys'); /** diff --git a/at.js b/at.js index 3b6dfe8f5..cc3618835 100644 --- a/at.js +++ b/at.js @@ -1,5 +1,5 @@ -var baseAt = require('./internal/baseAt'), - baseFlatten = require('./internal/baseFlatten'), +var baseAt = require('./_baseAt'), + baseFlatten = require('./_baseFlatten'), rest = require('./rest'); /** diff --git a/attempt.js b/attempt.js index a848ef56b..305fd007b 100644 --- a/attempt.js +++ b/attempt.js @@ -1,4 +1,4 @@ -var apply = require('./internal/apply'), +var apply = require('./_apply'), isError = require('./isError'), rest = require('./rest'); diff --git a/bind.js b/bind.js index 0d9c97c42..6e383b742 100644 --- a/bind.js +++ b/bind.js @@ -1,5 +1,5 @@ -var createWrapper = require('./internal/createWrapper'), - replaceHolders = require('./internal/replaceHolders'), +var createWrapper = require('./_createWrapper'), + replaceHolders = require('./_replaceHolders'), rest = require('./rest'); /** Used to compose bitmasks for wrapper metadata. */ diff --git a/bindAll.js b/bindAll.js index 022f783f6..d5bde4249 100644 --- a/bindAll.js +++ b/bindAll.js @@ -1,5 +1,5 @@ -var arrayEach = require('./internal/arrayEach'), - baseFlatten = require('./internal/baseFlatten'), +var arrayEach = require('./_arrayEach'), + baseFlatten = require('./_baseFlatten'), bind = require('./bind'), rest = require('./rest'); diff --git a/bindKey.js b/bindKey.js index e2abb451e..a9d97abd2 100644 --- a/bindKey.js +++ b/bindKey.js @@ -1,5 +1,5 @@ -var createWrapper = require('./internal/createWrapper'), - replaceHolders = require('./internal/replaceHolders'), +var createWrapper = require('./_createWrapper'), + replaceHolders = require('./_replaceHolders'), rest = require('./rest'); /** Used to compose bitmasks for wrapper metadata. */ diff --git a/camelCase.js b/camelCase.js index 815099481..00239e3c8 100644 --- a/camelCase.js +++ b/camelCase.js @@ -1,5 +1,5 @@ var capitalize = require('./capitalize'), - createCompounder = require('./internal/createCompounder'); + createCompounder = require('./_createCompounder'); /** * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). diff --git a/ceil.js b/ceil.js index 3c33db3e6..ecf2f1232 100644 --- a/ceil.js +++ b/ceil.js @@ -1,4 +1,4 @@ -var createRound = require('./internal/createRound'); +var createRound = require('./_createRound'); /** * Computes `number` rounded up to `precision`. diff --git a/chunk.js b/chunk.js index 598f8acf1..b4bbc7bef 100644 --- a/chunk.js +++ b/chunk.js @@ -1,4 +1,4 @@ -var baseSlice = require('./internal/baseSlice'), +var baseSlice = require('./_baseSlice'), toInteger = require('./toInteger'); /* Built-in method references for those with the same name as other `lodash` methods. */ diff --git a/clamp.js b/clamp.js index 86e504e09..9e186d818 100644 --- a/clamp.js +++ b/clamp.js @@ -1,4 +1,4 @@ -var baseClamp = require('./internal/baseClamp'), +var baseClamp = require('./_baseClamp'), toNumber = require('./toNumber'); /** diff --git a/clone.js b/clone.js index 0b213cbf6..08e9744f2 100644 --- a/clone.js +++ b/clone.js @@ -1,4 +1,4 @@ -var baseClone = require('./internal/baseClone'); +var baseClone = require('./_baseClone'); /** * Creates a shallow clone of `value`. diff --git a/cloneDeep.js b/cloneDeep.js index 2e89d1d28..9fbf338b3 100644 --- a/cloneDeep.js +++ b/cloneDeep.js @@ -1,4 +1,4 @@ -var baseClone = require('./internal/baseClone'); +var baseClone = require('./_baseClone'); /** * This method is like `_.clone` except that it recursively clones `value`. diff --git a/cloneDeepWith.js b/cloneDeepWith.js index c814cf50f..be5bb5729 100644 --- a/cloneDeepWith.js +++ b/cloneDeepWith.js @@ -1,4 +1,4 @@ -var baseClone = require('./internal/baseClone'); +var baseClone = require('./_baseClone'); /** * This method is like `_.cloneWith` except that it recursively clones `value`. diff --git a/cloneWith.js b/cloneWith.js index e436b1e8c..1bc6035a2 100644 --- a/cloneWith.js +++ b/cloneWith.js @@ -1,4 +1,4 @@ -var baseClone = require('./internal/baseClone'); +var baseClone = require('./_baseClone'); /** * This method is like `_.clone` except that it accepts `customizer` which diff --git a/commit.js b/commit.js index 5b5d6ec58..1f87f5052 100644 --- a/commit.js +++ b/commit.js @@ -1,4 +1,4 @@ -var LodashWrapper = require('./internal/LodashWrapper'); +var LodashWrapper = require('./_LodashWrapper'); /** * Executes the chained sequence and returns the wrapped result. diff --git a/concat.js b/concat.js index ecee6f893..a3a78df0e 100644 --- a/concat.js +++ b/concat.js @@ -1,5 +1,5 @@ -var arrayConcat = require('./internal/arrayConcat'), - baseFlatten = require('./internal/baseFlatten'), +var arrayConcat = require('./_arrayConcat'), + baseFlatten = require('./_baseFlatten'), isArray = require('./isArray'), rest = require('./rest'); diff --git a/cond.js b/cond.js index d04cfd909..593ac9e2e 100644 --- a/cond.js +++ b/cond.js @@ -1,6 +1,6 @@ -var apply = require('./internal/apply'), - arrayMap = require('./internal/arrayMap'), - baseIteratee = require('./internal/baseIteratee'), +var apply = require('./_apply'), + arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), rest = require('./rest'); /** Used as the `TypeError` message for "Functions" methods. */ diff --git a/conforms.js b/conforms.js index 32541fe6e..2bfeca250 100644 --- a/conforms.js +++ b/conforms.js @@ -1,5 +1,5 @@ -var baseClone = require('./internal/baseClone'), - baseConforms = require('./internal/baseConforms'); +var baseClone = require('./_baseClone'), + baseConforms = require('./_baseConforms'); /** * Creates a function that invokes the predicate properties of `source` with diff --git a/core.js b/core.js index 9aa3e4df8..cdb750eca 100644 --- a/core.js +++ b/core.js @@ -1,6 +1,6 @@ /** * @license - * lodash 4.0.1 (Custom Build) + * lodash 4.1.0 (Custom Build) * Build: `lodash core -o ./dist/lodash.core.js` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -13,7 +13,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.0.1'; + var VERSION = '4.1.0'; /** Used to compose bitmasks for wrapper metadata. */ var BIND_FLAG = 1, @@ -420,20 +420,21 @@ * `differenceBy`, `differenceWith`, `drop`, `dropRight`, `dropRightWhile`, * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flip`, `flow`, * `flowRight`, `fromPairs`, `functions`, `functionsIn`, `groupBy`, `initial`, - * `intersection`, `intersectionBy`, `intersectionWith`, `invert`, `invokeMap`, - * `iteratee`, `keyBy`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, - * `matches`, `matchesProperty`, `memoize`, `merge`, `mergeWith`, `method`, - * `methodOf`, `mixin`, `negate`, `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, - * `over`, `overArgs`, `overEvery`, `overSome`, `partial`, `partialRight`, - * `partition`, `pick`, `pickBy`, `plant`, `property`, `propertyOf`, `pull`, - * `pullAll`, `pullAllBy`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, - * `reject`, `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, - * `shuffle`, `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, - * `takeRight`, `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, - * `toArray`, `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, - * `unary`, `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, - * `unset`, `unshift`, `unzip`, `unzipWith`, `values`, `valuesIn`, `without`, - * `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, `zipObject`, and `zipWith` + * `intersection`, `intersectionBy`, `intersectionWith`, `invert`, `invertBy`, + * `invokeMap`, `iteratee`, `keyBy`, `keys`, `keysIn`, `map`, `mapKeys`, + * `mapValues`, `matches`, `matchesProperty`, `memoize`, `merge`, `mergeWith`, + * `method`, `methodOf`, `mixin`, `negate`, `nthArg`, `omit`, `omitBy`, `once`, + * `orderBy`, `over`, `overArgs`, `overEvery`, `overSome`, `partial`, + * `partialRight`, `partition`, `pick`, `pickBy`, `plant`, `property`, + * `propertyOf`, `pull`, `pullAll`, `pullAllBy`, `pullAt`, `push`, `range`, + * `rangeRight`, `rearg`, `reject`, `remove`, `rest`, `reverse`, `sampleSize`, + * `set`, `setWith`, `shuffle`, `slice`, `sort`, `sortBy`, `splice`, `spread`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `tap`, `throttle`, + * `thru`, `toArray`, `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, + * `transform`, `unary`, `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, + * `uniqWith`, `unset`, `unshift`, `unzip`, `unzipWith`, `values`, `valuesIn`, + * `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, `zipObject`, + * `zipObjectDeep`, and `zipWith` * * The wrapper methods that are **not** chainable by default are: * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, @@ -1360,9 +1361,11 @@ */ function indexKeys(object) { var length = object ? object.length : undefined; - return (isLength(length) && (isArray(object) || isString(object) || isArguments(object))) - ? baseTimes(length, String) - : null; + if (isLength(length) && + (isArray(object) || isString(object) || isArguments(object))) { + return baseTimes(length, String); + } + return null; } /** @@ -1871,36 +1874,6 @@ return baseEach(collection, toFunction(iteratee)); } - /** - * Invokes the method at `path` of each element in `collection`, returning - * an array of the results of each invoked method. Any additional arguments - * are provided to each invoked method. If `methodName` is a function it's - * invoked for, and `this` bound to, each element in `collection`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|string} path The path of the method to invoke or - * the function invoked per iteration. - * @param {...*} [args] The arguments to invoke each method with. - * @returns {Array} Returns the array of results. - * @example - * - * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); - * // => [[1, 5, 7], [1, 2, 3]] - * - * _.invokeMap([123, 456], String.prototype.split, ''); - * // => [['1', '2', '3'], ['4', '5', '6']] - */ - var invokeMap = rest(function(collection, path, args) { - var isFunc = typeof path == 'function'; - return baseMap(collection, function(value) { - var func = isFunc ? path : value[path]; - return func == null ? func : func.apply(value, args); - }); - }); - /** * Creates an array of values by running each element in `collection` through * `iteratee`. The iteratee is invoked with three arguments: @@ -1972,7 +1945,7 @@ * * _.reduce([1, 2], function(sum, n) { * return sum + n; - * }); + * }, 0); * // => 3 * * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { @@ -2098,26 +2071,6 @@ /*------------------------------------------------------------------------*/ - /** - * Gets the timestamp of the number of milliseconds that have elapsed since - * the Unix epoch (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @type Function - * @category Date - * @returns {number} Returns the timestamp. - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => logs the number of milliseconds it took for the deferred function to be invoked - */ - var now = Date.now; - - /*------------------------------------------------------------------------*/ - /** * Creates a function that invokes `func`, with the `this` binding and arguments * of the created function, while it's called less than `n` times. Subsequent @@ -2593,9 +2546,16 @@ * // => false */ function isEmpty(value) { - return (!isObjectLike(value) || isFunction(value.splice)) - ? !size(value) - : !keys(value).length; + if (isArrayLike(value) && + (isArray(value) || isString(value) || isFunction(value.splice) || isArguments(value))) { + return !value.length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; } /** @@ -2733,8 +2693,6 @@ * // => false */ function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. var type = typeof value; return !!value && (type == 'object' || type == 'function'); } @@ -3720,7 +3678,6 @@ lodash.filter = filter; lodash.flatten = flatten; lodash.flattenDeep = flattenDeep; - lodash.invokeMap = invokeMap; lodash.iteratee = iteratee; lodash.keys = keys; lodash.map = map; @@ -3774,7 +3731,6 @@ lodash.min = min; lodash.noConflict = noConflict; lodash.noop = noop; - lodash.now = now; lodash.reduce = reduce; lodash.result = result; lodash.size = size; diff --git a/countBy.js b/countBy.js index 074544df0..814262e0e 100644 --- a/countBy.js +++ b/countBy.js @@ -1,4 +1,4 @@ -var createAggregator = require('./internal/createAggregator'); +var createAggregator = require('./_createAggregator'); /** Used for built-in method references. */ var objectProto = global.Object.prototype; diff --git a/create.js b/create.js index 2f120c8eb..196512358 100644 --- a/create.js +++ b/create.js @@ -1,5 +1,5 @@ -var baseAssign = require('./internal/baseAssign'), - baseCreate = require('./internal/baseCreate'); +var baseAssign = require('./_baseAssign'), + baseCreate = require('./_baseCreate'); /** * Creates an object that inherits from the `prototype` object. If a `properties` diff --git a/curry.js b/curry.js index 7aaa27ab3..a1c35e634 100644 --- a/curry.js +++ b/curry.js @@ -1,4 +1,4 @@ -var createWrapper = require('./internal/createWrapper'); +var createWrapper = require('./_createWrapper'); /** Used to compose bitmasks for wrapper metadata. */ var CURRY_FLAG = 8; diff --git a/curryRight.js b/curryRight.js index 2cd6abc06..9ed278a22 100644 --- a/curryRight.js +++ b/curryRight.js @@ -1,4 +1,4 @@ -var createWrapper = require('./internal/createWrapper'); +var createWrapper = require('./_createWrapper'); /** Used to compose bitmasks for wrapper metadata. */ var CURRY_RIGHT_FLAG = 16; diff --git a/deburr.js b/deburr.js index 944735a87..7e7503471 100644 --- a/deburr.js +++ b/deburr.js @@ -1,4 +1,4 @@ -var deburrLetter = require('./internal/deburrLetter'), +var deburrLetter = require('./_deburrLetter'), toString = require('./toString'); /** Used to match latin-1 supplementary letters (excluding mathematical operators). */ diff --git a/defaults.js b/defaults.js index 3788ebb57..eded2845c 100644 --- a/defaults.js +++ b/defaults.js @@ -1,5 +1,5 @@ -var apply = require('./internal/apply'), - assignInDefaults = require('./internal/assignInDefaults'), +var apply = require('./_apply'), + assignInDefaults = require('./_assignInDefaults'), assignInWith = require('./assignInWith'), rest = require('./rest'); diff --git a/defaultsDeep.js b/defaultsDeep.js index 84d7fee3c..c495aee4d 100644 --- a/defaultsDeep.js +++ b/defaultsDeep.js @@ -1,5 +1,5 @@ -var apply = require('./internal/apply'), - mergeDefaults = require('./internal/mergeDefaults'), +var apply = require('./_apply'), + mergeDefaults = require('./_mergeDefaults'), mergeWith = require('./mergeWith'), rest = require('./rest'); diff --git a/defer.js b/defer.js index a00baf202..2587bef72 100644 --- a/defer.js +++ b/defer.js @@ -1,4 +1,4 @@ -var baseDelay = require('./internal/baseDelay'), +var baseDelay = require('./_baseDelay'), rest = require('./rest'); /** diff --git a/delay.js b/delay.js index 7d4da66e3..28d070c69 100644 --- a/delay.js +++ b/delay.js @@ -1,4 +1,4 @@ -var baseDelay = require('./internal/baseDelay'), +var baseDelay = require('./_baseDelay'), rest = require('./rest'), toNumber = require('./toNumber'); diff --git a/difference.js b/difference.js index 1d5ce9c0c..a1495b357 100644 --- a/difference.js +++ b/difference.js @@ -1,5 +1,5 @@ -var baseDifference = require('./internal/baseDifference'), - baseFlatten = require('./internal/baseFlatten'), +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), isArrayLikeObject = require('./isArrayLikeObject'), rest = require('./rest'); diff --git a/differenceBy.js b/differenceBy.js index 27bf998f4..51bcc7d4f 100644 --- a/differenceBy.js +++ b/differenceBy.js @@ -1,6 +1,6 @@ -var baseDifference = require('./internal/baseDifference'), - baseFlatten = require('./internal/baseFlatten'), - baseIteratee = require('./internal/baseIteratee'), +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseIteratee = require('./_baseIteratee'), isArrayLikeObject = require('./isArrayLikeObject'), last = require('./last'), rest = require('./rest'); diff --git a/differenceWith.js b/differenceWith.js index 176bc52ed..b60f3a068 100644 --- a/differenceWith.js +++ b/differenceWith.js @@ -1,5 +1,5 @@ -var baseDifference = require('./internal/baseDifference'), - baseFlatten = require('./internal/baseFlatten'), +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), isArrayLikeObject = require('./isArrayLikeObject'), last = require('./last'), rest = require('./rest'); diff --git a/drop.js b/drop.js index cc6912381..3094995c9 100644 --- a/drop.js +++ b/drop.js @@ -1,4 +1,4 @@ -var baseSlice = require('./internal/baseSlice'), +var baseSlice = require('./_baseSlice'), toInteger = require('./toInteger'); /** diff --git a/dropRight.js b/dropRight.js index 067433ec2..61e12682b 100644 --- a/dropRight.js +++ b/dropRight.js @@ -1,4 +1,4 @@ -var baseSlice = require('./internal/baseSlice'), +var baseSlice = require('./_baseSlice'), toInteger = require('./toInteger'); /** diff --git a/dropRightWhile.js b/dropRightWhile.js index d562957ef..f9e30cca0 100644 --- a/dropRightWhile.js +++ b/dropRightWhile.js @@ -1,5 +1,5 @@ -var baseIteratee = require('./internal/baseIteratee'), - baseWhile = require('./internal/baseWhile'); +var baseIteratee = require('./_baseIteratee'), + baseWhile = require('./_baseWhile'); /** * Creates a slice of `array` excluding elements dropped from the end. diff --git a/dropWhile.js b/dropWhile.js index 0e884f038..0a343110d 100644 --- a/dropWhile.js +++ b/dropWhile.js @@ -1,5 +1,5 @@ -var baseIteratee = require('./internal/baseIteratee'), - baseWhile = require('./internal/baseWhile'); +var baseIteratee = require('./_baseIteratee'), + baseWhile = require('./_baseWhile'); /** * Creates a slice of `array` excluding elements dropped from the beginning. diff --git a/endsWith.js b/endsWith.js index 1c2173545..5da6b5e30 100644 --- a/endsWith.js +++ b/endsWith.js @@ -1,4 +1,4 @@ -var baseClamp = require('./internal/baseClamp'), +var baseClamp = require('./_baseClamp'), toInteger = require('./toInteger'), toString = require('./toString'); diff --git a/escape.js b/escape.js index 21c867742..62857ed2e 100644 --- a/escape.js +++ b/escape.js @@ -1,4 +1,4 @@ -var escapeHtmlChar = require('./internal/escapeHtmlChar'), +var escapeHtmlChar = require('./_escapeHtmlChar'), toString = require('./toString'); /** Used to match HTML entities and HTML characters. */ diff --git a/every.js b/every.js index eba00af9d..88a5e7821 100644 --- a/every.js +++ b/every.js @@ -1,8 +1,8 @@ -var arrayEvery = require('./internal/arrayEvery'), - baseEvery = require('./internal/baseEvery'), - baseIteratee = require('./internal/baseIteratee'), +var arrayEvery = require('./_arrayEvery'), + baseEvery = require('./_baseEvery'), + baseIteratee = require('./_baseIteratee'), isArray = require('./isArray'), - isIterateeCall = require('./internal/isIterateeCall'); + isIterateeCall = require('./_isIterateeCall'); /** * Checks if `predicate` returns truthy for **all** elements of `collection`. diff --git a/fill.js b/fill.js index 4a1d0d9e5..4c0119fed 100644 --- a/fill.js +++ b/fill.js @@ -1,5 +1,5 @@ -var baseFill = require('./internal/baseFill'), - isIterateeCall = require('./internal/isIterateeCall'); +var baseFill = require('./_baseFill'), + isIterateeCall = require('./_isIterateeCall'); /** * Fills elements of `array` with `value` from `start` up to, but not diff --git a/filter.js b/filter.js index 75bf8427f..34544855a 100644 --- a/filter.js +++ b/filter.js @@ -1,6 +1,6 @@ -var arrayFilter = require('./internal/arrayFilter'), - baseFilter = require('./internal/baseFilter'), - baseIteratee = require('./internal/baseIteratee'), +var arrayFilter = require('./_arrayFilter'), + baseFilter = require('./_baseFilter'), + baseIteratee = require('./_baseIteratee'), isArray = require('./isArray'); /** diff --git a/find.js b/find.js index b91015578..40f982e0d 100644 --- a/find.js +++ b/find.js @@ -1,7 +1,7 @@ -var baseEach = require('./internal/baseEach'), - baseFind = require('./internal/baseFind'), - baseFindIndex = require('./internal/baseFindIndex'), - baseIteratee = require('./internal/baseIteratee'), +var baseEach = require('./_baseEach'), + baseFind = require('./_baseFind'), + baseFindIndex = require('./_baseFindIndex'), + baseIteratee = require('./_baseIteratee'), isArray = require('./isArray'); /** diff --git a/findIndex.js b/findIndex.js index a05ba7d3e..e61263ca6 100644 --- a/findIndex.js +++ b/findIndex.js @@ -1,5 +1,5 @@ -var baseFindIndex = require('./internal/baseFindIndex'), - baseIteratee = require('./internal/baseIteratee'); +var baseFindIndex = require('./_baseFindIndex'), + baseIteratee = require('./_baseIteratee'); /** * This method is like `_.find` except that it returns the index of the first diff --git a/findKey.js b/findKey.js index cae5acf3c..ae6e1d83e 100644 --- a/findKey.js +++ b/findKey.js @@ -1,6 +1,6 @@ -var baseFind = require('./internal/baseFind'), - baseForOwn = require('./internal/baseForOwn'), - baseIteratee = require('./internal/baseIteratee'); +var baseFind = require('./_baseFind'), + baseForOwn = require('./_baseForOwn'), + baseIteratee = require('./_baseIteratee'); /** * This method is like `_.find` except that it returns the key of the first diff --git a/findLast.js b/findLast.js index 4bf9b9e97..0e5d5932b 100644 --- a/findLast.js +++ b/findLast.js @@ -1,7 +1,7 @@ -var baseEachRight = require('./internal/baseEachRight'), - baseFind = require('./internal/baseFind'), - baseFindIndex = require('./internal/baseFindIndex'), - baseIteratee = require('./internal/baseIteratee'), +var baseEachRight = require('./_baseEachRight'), + baseFind = require('./_baseFind'), + baseFindIndex = require('./_baseFindIndex'), + baseIteratee = require('./_baseIteratee'), isArray = require('./isArray'); /** diff --git a/findLastIndex.js b/findLastIndex.js index 9957bbfe2..621cb3657 100644 --- a/findLastIndex.js +++ b/findLastIndex.js @@ -1,5 +1,5 @@ -var baseFindIndex = require('./internal/baseFindIndex'), - baseIteratee = require('./internal/baseIteratee'); +var baseFindIndex = require('./_baseFindIndex'), + baseIteratee = require('./_baseIteratee'); /** * This method is like `_.findIndex` except that it iterates over elements diff --git a/findLastKey.js b/findLastKey.js index 82c30de99..b68c123f4 100644 --- a/findLastKey.js +++ b/findLastKey.js @@ -1,6 +1,6 @@ -var baseFind = require('./internal/baseFind'), - baseForOwnRight = require('./internal/baseForOwnRight'), - baseIteratee = require('./internal/baseIteratee'); +var baseFind = require('./_baseFind'), + baseForOwnRight = require('./_baseForOwnRight'), + baseIteratee = require('./_baseIteratee'); /** * This method is like `_.findKey` except that it iterates over elements of diff --git a/flatMap.js b/flatMap.js index fa992b315..e9cb01bda 100644 --- a/flatMap.js +++ b/flatMap.js @@ -1,6 +1,6 @@ -var arrayMap = require('./internal/arrayMap'), - baseFlatten = require('./internal/baseFlatten'), - baseIteratee = require('./internal/baseIteratee'); +var arrayMap = require('./_arrayMap'), + baseFlatten = require('./_baseFlatten'), + baseIteratee = require('./_baseIteratee'); /** * Creates an array of flattened values by running each element in `array` diff --git a/flatten.js b/flatten.js index 60674d744..6a6b8cf7c 100644 --- a/flatten.js +++ b/flatten.js @@ -1,4 +1,4 @@ -var baseFlatten = require('./internal/baseFlatten'); +var baseFlatten = require('./_baseFlatten'); /** * Flattens `array` a single level. diff --git a/flattenDeep.js b/flattenDeep.js index f5cc416de..3daab79e1 100644 --- a/flattenDeep.js +++ b/flattenDeep.js @@ -1,4 +1,4 @@ -var baseFlatten = require('./internal/baseFlatten'); +var baseFlatten = require('./_baseFlatten'); /** * This method is like `_.flatten` except that it recursively flattens `array`. diff --git a/flip.js b/flip.js index 9f6912d1c..6e14896fa 100644 --- a/flip.js +++ b/flip.js @@ -1,4 +1,4 @@ -var createWrapper = require('./internal/createWrapper'); +var createWrapper = require('./_createWrapper'); /** Used to compose bitmasks for wrapper metadata. */ var FLIP_FLAG = 512; diff --git a/floor.js b/floor.js index e5e6b035f..9bbf097b4 100644 --- a/floor.js +++ b/floor.js @@ -1,4 +1,4 @@ -var createRound = require('./internal/createRound'); +var createRound = require('./_createRound'); /** * Computes `number` rounded down to `precision`. diff --git a/flow.js b/flow.js index a544ad2f4..a69e914c2 100644 --- a/flow.js +++ b/flow.js @@ -1,4 +1,4 @@ -var createFlow = require('./internal/createFlow'); +var createFlow = require('./_createFlow'); /** * Creates a function that returns the result of invoking the provided diff --git a/flowRight.js b/flowRight.js index 84194f29c..4164a8b98 100644 --- a/flowRight.js +++ b/flowRight.js @@ -1,4 +1,4 @@ -var createFlow = require('./internal/createFlow'); +var createFlow = require('./_createFlow'); /** * This method is like `_.flow` except that it creates a function that diff --git a/forEach.js b/forEach.js index 35e9b6ae3..e7bde6dee 100644 --- a/forEach.js +++ b/forEach.js @@ -1,7 +1,7 @@ -var arrayEach = require('./internal/arrayEach'), - baseEach = require('./internal/baseEach'), +var arrayEach = require('./_arrayEach'), + baseEach = require('./_baseEach'), isArray = require('./isArray'), - toFunction = require('./internal/toFunction'); + toFunction = require('./_toFunction'); /** * Iterates over elements of `collection` invoking `iteratee` for each element. diff --git a/forEachRight.js b/forEachRight.js index 2c1205b77..68f2e2f2c 100644 --- a/forEachRight.js +++ b/forEachRight.js @@ -1,7 +1,7 @@ -var arrayEachRight = require('./internal/arrayEachRight'), - baseEachRight = require('./internal/baseEachRight'), +var arrayEachRight = require('./_arrayEachRight'), + baseEachRight = require('./_baseEachRight'), isArray = require('./isArray'), - toFunction = require('./internal/toFunction'); + toFunction = require('./_toFunction'); /** * This method is like `_.forEach` except that it iterates over elements of diff --git a/forIn.js b/forIn.js index 0a18d146f..d68dd3ada 100644 --- a/forIn.js +++ b/forIn.js @@ -1,6 +1,6 @@ -var baseFor = require('./internal/baseFor'), +var baseFor = require('./_baseFor'), keysIn = require('./keysIn'), - toFunction = require('./internal/toFunction'); + toFunction = require('./_toFunction'); /** * Iterates over own and inherited enumerable properties of an object invoking diff --git a/forInRight.js b/forInRight.js index 9fd75f7df..9dedc259d 100644 --- a/forInRight.js +++ b/forInRight.js @@ -1,6 +1,6 @@ -var baseForRight = require('./internal/baseForRight'), +var baseForRight = require('./_baseForRight'), keysIn = require('./keysIn'), - toFunction = require('./internal/toFunction'); + toFunction = require('./_toFunction'); /** * This method is like `_.forIn` except that it iterates over properties of diff --git a/forOwn.js b/forOwn.js index 11d87632d..ee066cc7c 100644 --- a/forOwn.js +++ b/forOwn.js @@ -1,5 +1,5 @@ -var baseForOwn = require('./internal/baseForOwn'), - toFunction = require('./internal/toFunction'); +var baseForOwn = require('./_baseForOwn'), + toFunction = require('./_toFunction'); /** * Iterates over own enumerable properties of an object invoking `iteratee` diff --git a/forOwnRight.js b/forOwnRight.js index 3912c4c85..1016195b9 100644 --- a/forOwnRight.js +++ b/forOwnRight.js @@ -1,5 +1,5 @@ -var baseForOwnRight = require('./internal/baseForOwnRight'), - toFunction = require('./internal/toFunction'); +var baseForOwnRight = require('./_baseForOwnRight'), + toFunction = require('./_toFunction'); /** * This method is like `_.forOwn` except that it iterates over properties of diff --git a/fp/_baseConvert.js b/fp/_baseConvert.js index 10a7d70bc..5e71b64d8 100644 --- a/fp/_baseConvert.js +++ b/fp/_baseConvert.js @@ -149,6 +149,7 @@ function baseConvert(util, name, func) { }; var wrap = function(name, func) { + name = mapping.aliasToReal[name] || name; var wrapper = wrappers[name]; if (wrapper) { return wrapper(func); @@ -215,7 +216,7 @@ function baseConvert(util, name, func) { // Wrap the lodash method and its aliases. each(keys(_), function(key) { - each(mapping.alias[key] || [], function(alias) { + each(mapping.realToAlias[key] || [], function(alias) { _[alias] = _[key]; }); }); diff --git a/fp/_mapping.js b/fp/_mapping.js index 4f1e607ee..711ac45c5 100644 --- a/fp/_mapping.js +++ b/fp/_mapping.js @@ -1,202 +1,220 @@ -module.exports = { +/** Used to map aliases to their real names. */ +exports.aliasToReal = { + 'all': 'some', + 'allPass': 'overEvery', + 'apply': 'spread', + 'compose': 'flowRight', + 'contains': 'includes', + 'dissoc': 'omit', + 'each': 'forEach', + 'eachRight': 'forEachRight', + 'equals': 'isEqual', + 'extend': 'assignIn', + 'extendWith': 'assignInWith', + 'first': 'head', + 'init': 'initial', + 'mapObj': 'mapValues', + 'omitAll': 'omit', + 'nAry': 'ary', + 'path': 'get', + 'pathEq': 'matchesProperty', + 'pathOr': 'getOr', + 'pickAll': 'pick', + 'pipe': 'flow', + 'prop': 'get', + 'propOf': 'propertyOf', + 'propOr': 'getOr', + 'somePass': 'overSome', + 'unapply': 'rest', + 'unnest': 'flatten', + 'useWith': 'overArgs', + 'whereEq': 'filter', + 'zipObj': 'zipObject' +}; - /** Used to map method names to their aliases. */ - 'alias': { - 'ary': ['nAry'], - 'assignIn': ['extend'], - 'assignInWith': ['extendWith'], - 'filter': ['whereEq'], - 'flatten': ['unnest'], - 'flow': ['pipe'], - 'flowRight': ['compose'], - 'forEach': ['each'], - 'forEachRight': ['eachRight'], - 'get': ['path', 'prop'], - 'getOr': ['pathOr', 'propOr'], - 'head': ['first'], - 'includes': ['contains'], - 'initial': ['init'], - 'isEqual': ['equals'], - 'mapValues': ['mapObj'], - 'matchesProperty': ['pathEq'], - 'omit': ['dissoc', 'omitAll'], - 'overArgs': ['useWith'], - 'overEvery': ['allPass'], - 'overSome': ['somePass'], - 'pick': ['pickAll'], - 'propertyOf': ['propOf'], - 'rest': ['unapply'], - 'some': ['all'], - 'spread': ['apply'], - 'zipObject': ['zipObj'] +/** Used to map method names to their iteratee ary. */ +exports.aryIteratee = { + 'assignWith': 2, + 'assignInWith': 2, + 'cloneDeepWith': 1, + 'cloneWith': 1, + 'dropRightWhile': 1, + 'dropWhile': 1, + 'every': 1, + 'filter': 1, + 'find': 1, + 'findIndex': 1, + 'findKey': 1, + 'findLast': 1, + 'findLastIndex': 1, + 'findLastKey': 1, + 'flatMap': 1, + 'forEach': 1, + 'forEachRight': 1, + 'forIn': 1, + 'forInRight': 1, + 'forOwn': 1, + 'forOwnRight': 1, + 'isEqualWith': 2, + 'isMatchWith': 2, + 'map': 1, + 'mapKeys': 1, + 'mapValues': 1, + 'partition': 1, + 'reduce': 2, + 'reduceRight': 2, + 'reject': 1, + 'remove': 1, + 'some': 1, + 'takeRightWhile': 1, + 'takeWhile': 1, + 'times': 1, + 'transform': 2 +}; + +/** Used to map ary to method names. */ +exports.aryMethod = { + 1: [ + 'attempt', 'ceil', 'create', 'curry', 'curryRight', 'floor', 'fromPairs', + 'invert', 'iteratee', 'memoize', 'method', 'methodOf', 'mixin', 'over', + 'overEvery', 'overSome', 'rest', 'reverse', 'round', 'runInContext', + 'template', 'trim', 'trimEnd', 'trimStart', 'uniqueId', 'words' + ], + 2: [ + 'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindKey', + 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN', + 'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference', + 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq', 'every', + 'filter', 'find', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex', + 'findLastKey', 'flatMap', 'forEach', 'forEachRight', 'forIn', 'forInRight', + 'forOwn', 'forOwnRight', 'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', + 'includes', 'indexOf', 'intersection', 'invertBy', 'invoke', 'invokeMap', + 'isEqual', 'isMatch', 'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', + 'mapKeys', 'mapValues', 'matchesProperty', 'maxBy', 'merge', 'minBy', 'omit', + 'omitBy', 'orderBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', + 'partition', 'pick', 'pickBy', 'pull', 'pullAll', 'pullAt', 'random', 'range', + 'rangeRight', 'rearg', 'reject', 'remove', 'repeat', 'result', 'sampleSize', + 'some', 'sortBy', 'sortedIndex', 'sortedIndexOf', 'sortedLastIndex', + 'sortedLastIndexOf', 'sortedUniqBy', 'split', 'startsWith', 'subtract', + 'sumBy', 'take', 'takeRight', 'takeRightWhile', 'takeWhile', 'tap', 'throttle', + 'thru', 'times', 'truncate', 'union', 'uniqBy', 'uniqWith', 'unset', 'unzipWith', + 'without', 'wrap', 'xor', 'zip', 'zipObject', 'zipObjectDeep' + ], + 3: [ + 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith', + 'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'isEqualWith', + 'isMatchWith', 'mergeWith', 'pullAllBy', 'reduce', 'reduceRight', 'replace', + 'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy', + 'unionWith', 'xorBy', 'xorWith', 'zipWith' + ], + 4: [ + 'fill', 'setWith' + ] +}; + +/** Used to map ary to rearg configs. */ +exports.aryRearg = { + 2: [1, 0], + 3: [2, 1, 0], + 4: [3, 2, 0, 1] +}; + +/** Used to map method names to iteratee rearg configs. */ +exports.iterateeRearg = { + 'findKey': [1], + 'findLastKey': [1], + 'mapKeys': [1] +}; + +/** Used to map method names to rearg configs. */ +exports.methodRearg = { + 'assignInWith': [1, 2, 0], + 'assignWith': [1, 2, 0], + 'clamp': [2, 0, 1], + 'mergeWith': [1, 2, 0], + 'reduce': [2, 0, 1], + 'reduceRight': [2, 0, 1], + 'set': [2, 0, 1], + 'setWith': [3, 1, 2, 0], + 'slice': [2, 0, 1], + 'transform': [2, 0, 1] +}; + +/** Used to iterate `mapping.aryMethod` keys. */ +exports.caps = [1, 2, 3, 4]; + +/** Used to map keys to other keys. */ +exports.key = { + 'curryN': 'curry', + 'curryRightN': 'curryRight', + 'getOr': 'get' +}; + +/** Used to identify methods which mutate arrays or objects. */ +exports.mutate = { + 'array': { + 'fill': true, + 'pull': true, + 'pullAll': true, + 'pullAllBy': true, + 'pullAt': true, + 'remove': true, + 'reverse': true }, - - /** Used to map method names to their iteratee ary. */ - 'aryIteratee': { - 'assignWith': 2, - 'assignInWith': 2, - 'cloneDeepWith': 1, - 'cloneWith': 1, - 'dropRightWhile': 1, - 'dropWhile': 1, - 'every': 1, - 'filter': 1, - 'find': 1, - 'findIndex': 1, - 'findKey': 1, - 'findLast': 1, - 'findLastIndex': 1, - 'findLastKey': 1, - 'flatMap': 1, - 'forEach': 1, - 'forEachRight': 1, - 'forIn': 1, - 'forInRight': 1, - 'forOwn': 1, - 'forOwnRight': 1, - 'isEqualWith': 2, - 'isMatchWith': 2, - 'map': 1, - 'mapKeys': 1, - 'mapValues': 1, - 'partition': 1, - 'reduce': 2, - 'reduceRight': 2, - 'reject': 1, - 'remove': 1, - 'some': 1, - 'takeRightWhile': 1, - 'takeWhile': 1, - 'times': 1, - 'transform': 2 - }, - - /** Used to map ary to method names. */ - 'aryMethod': { - 1:[ - 'attempt', 'ceil', 'create', 'curry', 'curryRight', 'floor', 'fromPairs', - 'invert', 'iteratee', 'memoize', 'method', 'methodOf', 'mixin', 'over', - 'overEvery', 'overSome', 'rest', 'reverse', 'round', 'runInContext', - 'template', 'trim', 'trimEnd', 'trimStart', 'uniqueId', 'words' - ], - 2:[ - 'add', 'after', 'ary', 'assign', 'at', 'before', 'bind', 'bindKey', - 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN', - 'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference', - 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq', - 'every', 'extend', 'filter', 'find', 'find', 'findIndex', 'findKey', - 'findLast', 'findLastIndex', 'findLastKey', 'flatMap', 'forEach', - 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get', - 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection', - 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy', 'lastIndexOf', - 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty', 'maxBy', - 'merge', 'minBy', 'omit', 'omitBy', 'orderBy', 'overArgs', 'pad', 'padEnd', - 'padStart', 'parseInt', 'partition', 'pick', 'pickBy', 'pull', 'pullAll', - 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', - 'repeat', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex', - 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy', - 'split', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight', 'takeRightWhile', - 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'truncate', 'union', 'uniqBy', - 'uniqWith', 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject' - ], - 3:[ - 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith', - 'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'isEqualWith', - 'isMatchWith', 'mergeWith', 'pullAllBy', 'reduce', 'reduceRight', 'replace', - 'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy', - 'unionWith', 'xorBy', 'xorWith', 'zipWith' - ], - 4:[ - 'fill', 'setWith' - ] - }, - - /** Used to map ary to rearg configs. */ - 'aryRearg': { - 2: [1, 0], - 3: [2, 1, 0], - 4: [3, 2, 0, 1] - }, - - /** Used to map method names to iteratee rearg configs. */ - 'iterateeRearg': { - 'findKey': [1], - 'findLastKey': [1], - 'mapKeys': [1] - }, - - /** Used to map method names to rearg configs. */ - 'methodRearg': { - 'clamp': [2, 0, 1], - 'reduce': [2, 0, 1], - 'reduceRight': [2, 0, 1], - 'set': [2, 0, 1], - 'setWith': [3, 1, 2, 0], - 'slice': [2, 0, 1], - 'transform': [2, 0, 1] - }, - - /** Used to iterate `mapping.aryMethod` keys. */ - 'caps': [1, 2, 3, 4], - - /** Used to map keys to other keys. */ - 'key': { - 'curryN': 'curry', - 'curryRightN': 'curryRight', - 'getOr': 'get' - }, - - /** Used to identify methods which mutate arrays or objects. */ - 'mutate': { - 'array': { - 'fill': true, - 'pull': true, - 'pullAll': true, - 'pullAllBy': true, - 'pullAt': true, - 'remove': true, - 'reverse': true - }, - 'object': { - 'assign': true, - 'assignIn': true, - 'assignInWith': true, - 'assignWith': true, - 'defaults': true, - 'defaultsDeep': true, - 'merge': true, - 'mergeWith': true - }, - 'set': { - 'set': true, - 'setWith': true - } - }, - - /** Used to track methods with placeholder support */ - 'placeholder': { - 'bind': true, - 'bindKey': true, - 'curry': true, - 'curryRight': true, - 'partial': true, - 'partialRight': true - }, - - /** Used to track methods that skip `_.rearg`. */ - 'skipRearg': { + 'object': { 'assign': true, 'assignIn': true, - 'concat': true, + 'assignInWith': true, + 'assignWith': true, 'defaults': true, 'defaultsDeep': true, - 'difference': true, - 'matchesProperty': true, 'merge': true, - 'random': true, - 'range': true, - 'rangeRight': true, - 'zip': true, - 'zipObject': true + 'mergeWith': true + }, + 'set': { + 'set': true, + 'setWith': true } }; + +/** Used to track methods with placeholder support */ +exports.placeholder = { + 'bind': true, + 'bindKey': true, + 'curry': true, + 'curryRight': true, + 'partial': true, + 'partialRight': true +}; + +/** Used to map real names to their aliases. */ +exports.realToAlias = (function() { + var hasOwnProperty = Object.prototype.hasOwnProperty, + object = exports.aliasToReal, + result = {}; + + for (var key in object) { + var value = object[key]; + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + } + return result; +}()); + +/** Used to track methods that skip `_.rearg`. */ +exports.skipRearg = { + 'assign': true, + 'assignIn': true, + 'concat': true, + 'difference': true, + 'matchesProperty': true, + 'merge': true, + 'random': true, + 'range': true, + 'rangeRight': true, + 'zip': true, + 'zipObject': true +}; diff --git a/fp/_util.js b/fp/_util.js index 1fb05e435..d076f4643 100644 --- a/fp/_util.js +++ b/fp/_util.js @@ -2,9 +2,9 @@ module.exports = { 'ary': require('../ary'), 'cloneDeep': require('../cloneDeep'), 'curry': require('../curry'), - 'forEach': require('../internal/arrayEach'), + 'forEach': require('../_arrayEach'), 'isFunction': require('../isFunction'), 'iteratee': require('../iteratee'), - 'keys': require('../internal/baseKeys'), + 'keys': require('../_baseKeys'), 'rearg': require('../rearg') }; diff --git a/fp/add.js b/fp/add.js new file mode 100644 index 000000000..c51b8fa6a --- /dev/null +++ b/fp/add.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('add', require('../add')); diff --git a/fp/after.js b/fp/after.js new file mode 100644 index 000000000..83691b7a5 --- /dev/null +++ b/fp/after.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('after', require('../after')); diff --git a/fp/all.js b/fp/all.js new file mode 100644 index 000000000..900ac25e8 --- /dev/null +++ b/fp/all.js @@ -0,0 +1 @@ +module.exports = require('./some'); diff --git a/fp/allPass.js b/fp/allPass.js new file mode 100644 index 000000000..79b73ef84 --- /dev/null +++ b/fp/allPass.js @@ -0,0 +1 @@ +module.exports = require('./overEvery'); diff --git a/fp/apply.js b/fp/apply.js new file mode 100644 index 000000000..2b7571296 --- /dev/null +++ b/fp/apply.js @@ -0,0 +1 @@ +module.exports = require('./spread'); diff --git a/fp/array.js b/fp/array.js new file mode 100644 index 000000000..fe939c2c2 --- /dev/null +++ b/fp/array.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../array')); diff --git a/fp/ary.js b/fp/ary.js new file mode 100644 index 000000000..0f75d18a3 --- /dev/null +++ b/fp/ary.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('ary', require('../ary')); diff --git a/fp/assign.js b/fp/assign.js new file mode 100644 index 000000000..ad02bcb84 --- /dev/null +++ b/fp/assign.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('assign', require('../assign')); diff --git a/fp/assignIn.js b/fp/assignIn.js new file mode 100644 index 000000000..1ed4f0d7e --- /dev/null +++ b/fp/assignIn.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('assignIn', require('../assignIn')); diff --git a/fp/assignInWith.js b/fp/assignInWith.js new file mode 100644 index 000000000..882145d91 --- /dev/null +++ b/fp/assignInWith.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('assignInWith', require('../assignInWith')); diff --git a/fp/assignWith.js b/fp/assignWith.js new file mode 100644 index 000000000..1ff052782 --- /dev/null +++ b/fp/assignWith.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('assignWith', require('../assignWith')); diff --git a/fp/at.js b/fp/at.js new file mode 100644 index 000000000..5da35250e --- /dev/null +++ b/fp/at.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('at', require('../at')); diff --git a/fp/attempt.js b/fp/attempt.js new file mode 100644 index 000000000..d8a3be523 --- /dev/null +++ b/fp/attempt.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('attempt', require('../attempt')); diff --git a/fp/before.js b/fp/before.js new file mode 100644 index 000000000..f2954a62e --- /dev/null +++ b/fp/before.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('before', require('../before')); diff --git a/fp/bind.js b/fp/bind.js new file mode 100644 index 000000000..e054a486d --- /dev/null +++ b/fp/bind.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('bind', require('../bind')); diff --git a/fp/bindAll.js b/fp/bindAll.js new file mode 100644 index 000000000..495b75c6e --- /dev/null +++ b/fp/bindAll.js @@ -0,0 +1 @@ +module.exports = require('../bindAll'); diff --git a/fp/bindKey.js b/fp/bindKey.js new file mode 100644 index 000000000..0b588c7a3 --- /dev/null +++ b/fp/bindKey.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('bindKey', require('../bindKey')); diff --git a/fp/camelCase.js b/fp/camelCase.js new file mode 100644 index 000000000..328041ec3 --- /dev/null +++ b/fp/camelCase.js @@ -0,0 +1 @@ +module.exports = require('../camelCase'); diff --git a/fp/capitalize.js b/fp/capitalize.js new file mode 100644 index 000000000..186e6d981 --- /dev/null +++ b/fp/capitalize.js @@ -0,0 +1 @@ +module.exports = require('../capitalize'); diff --git a/fp/ceil.js b/fp/ceil.js new file mode 100644 index 000000000..7c3774bb5 --- /dev/null +++ b/fp/ceil.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('ceil', require('../ceil')); diff --git a/fp/chain.js b/fp/chain.js new file mode 100644 index 000000000..2f139cc00 --- /dev/null +++ b/fp/chain.js @@ -0,0 +1 @@ +module.exports = require('../chain'); diff --git a/fp/chunk.js b/fp/chunk.js new file mode 100644 index 000000000..9d32b8a31 --- /dev/null +++ b/fp/chunk.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('chunk', require('../chunk')); diff --git a/fp/clamp.js b/fp/clamp.js new file mode 100644 index 000000000..8ec3d9de5 --- /dev/null +++ b/fp/clamp.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('clamp', require('../clamp')); diff --git a/fp/clone.js b/fp/clone.js new file mode 100644 index 000000000..afd2c156e --- /dev/null +++ b/fp/clone.js @@ -0,0 +1 @@ +module.exports = require('../clone'); diff --git a/fp/cloneDeep.js b/fp/cloneDeep.js new file mode 100644 index 000000000..a17a6f801 --- /dev/null +++ b/fp/cloneDeep.js @@ -0,0 +1 @@ +module.exports = require('../cloneDeep'); diff --git a/fp/cloneDeepWith.js b/fp/cloneDeepWith.js new file mode 100644 index 000000000..01c7fefdd --- /dev/null +++ b/fp/cloneDeepWith.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('cloneDeepWith', require('../cloneDeepWith')); diff --git a/fp/cloneWith.js b/fp/cloneWith.js new file mode 100644 index 000000000..9e9d7838e --- /dev/null +++ b/fp/cloneWith.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('cloneWith', require('../cloneWith')); diff --git a/fp/collection.js b/fp/collection.js new file mode 100644 index 000000000..fc8b328a0 --- /dev/null +++ b/fp/collection.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../collection')); diff --git a/fp/commit.js b/fp/commit.js new file mode 100644 index 000000000..04e9eb943 --- /dev/null +++ b/fp/commit.js @@ -0,0 +1 @@ +module.exports = require('../commit'); diff --git a/fp/compact.js b/fp/compact.js new file mode 100644 index 000000000..b2ed9c7d8 --- /dev/null +++ b/fp/compact.js @@ -0,0 +1 @@ +module.exports = require('../compact'); diff --git a/fp/compose.js b/fp/compose.js new file mode 100644 index 000000000..1954e9423 --- /dev/null +++ b/fp/compose.js @@ -0,0 +1 @@ +module.exports = require('./flowRight'); diff --git a/fp/concat.js b/fp/concat.js new file mode 100644 index 000000000..c13a92abd --- /dev/null +++ b/fp/concat.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('concat', require('../concat')); diff --git a/fp/cond.js b/fp/cond.js new file mode 100644 index 000000000..a150a89eb --- /dev/null +++ b/fp/cond.js @@ -0,0 +1 @@ +module.exports = require('../cond'); diff --git a/fp/conforms.js b/fp/conforms.js new file mode 100644 index 000000000..387dde184 --- /dev/null +++ b/fp/conforms.js @@ -0,0 +1 @@ +module.exports = require('../conforms'); diff --git a/fp/constant.js b/fp/constant.js new file mode 100644 index 000000000..3bcd27686 --- /dev/null +++ b/fp/constant.js @@ -0,0 +1 @@ +module.exports = require('../constant'); diff --git a/fp/contains.js b/fp/contains.js new file mode 100644 index 000000000..594722af5 --- /dev/null +++ b/fp/contains.js @@ -0,0 +1 @@ +module.exports = require('./includes'); diff --git a/fp/countBy.js b/fp/countBy.js new file mode 100644 index 000000000..ee4b94285 --- /dev/null +++ b/fp/countBy.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('countBy', require('../countBy')); diff --git a/fp/create.js b/fp/create.js new file mode 100644 index 000000000..bdad77148 --- /dev/null +++ b/fp/create.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('create', require('../create')); diff --git a/fp/curry.js b/fp/curry.js new file mode 100644 index 000000000..d64722c13 --- /dev/null +++ b/fp/curry.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('curry', require('../curry')); diff --git a/fp/curryN.js b/fp/curryN.js new file mode 100644 index 000000000..f33f7fc3f --- /dev/null +++ b/fp/curryN.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('curryN', require('../curry')); diff --git a/fp/curryRight.js b/fp/curryRight.js new file mode 100644 index 000000000..2e0470912 --- /dev/null +++ b/fp/curryRight.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('curryRight', require('../curryRight')); diff --git a/fp/curryRightN.js b/fp/curryRightN.js new file mode 100644 index 000000000..510e4e403 --- /dev/null +++ b/fp/curryRightN.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('curryRightN', require('../curryRight')); diff --git a/fp/date.js b/fp/date.js new file mode 100644 index 000000000..82cb952bc --- /dev/null +++ b/fp/date.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../date')); diff --git a/fp/debounce.js b/fp/debounce.js new file mode 100644 index 000000000..a6b0407a2 --- /dev/null +++ b/fp/debounce.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('debounce', require('../debounce')); diff --git a/fp/deburr.js b/fp/deburr.js new file mode 100644 index 000000000..f8e1a4939 --- /dev/null +++ b/fp/deburr.js @@ -0,0 +1 @@ +module.exports = require('../deburr'); diff --git a/fp/defaults.js b/fp/defaults.js new file mode 100644 index 000000000..7c3b3ab96 --- /dev/null +++ b/fp/defaults.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('defaults', require('../defaults')); diff --git a/fp/defaultsDeep.js b/fp/defaultsDeep.js new file mode 100644 index 000000000..c7480e217 --- /dev/null +++ b/fp/defaultsDeep.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('defaultsDeep', require('../defaultsDeep')); diff --git a/fp/defer.js b/fp/defer.js new file mode 100644 index 000000000..4126727cd --- /dev/null +++ b/fp/defer.js @@ -0,0 +1 @@ +module.exports = require('../defer'); diff --git a/fp/delay.js b/fp/delay.js new file mode 100644 index 000000000..cd3b1c329 --- /dev/null +++ b/fp/delay.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('delay', require('../delay')); diff --git a/fp/difference.js b/fp/difference.js new file mode 100644 index 000000000..aea9ab8d1 --- /dev/null +++ b/fp/difference.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('difference', require('../difference')); diff --git a/fp/differenceBy.js b/fp/differenceBy.js new file mode 100644 index 000000000..ab65554af --- /dev/null +++ b/fp/differenceBy.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('differenceBy', require('../differenceBy')); diff --git a/fp/differenceWith.js b/fp/differenceWith.js new file mode 100644 index 000000000..f932a2e47 --- /dev/null +++ b/fp/differenceWith.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('differenceWith', require('../differenceWith')); diff --git a/fp/dissoc.js b/fp/dissoc.js new file mode 100644 index 000000000..144cf4b96 --- /dev/null +++ b/fp/dissoc.js @@ -0,0 +1 @@ +module.exports = require('./omit'); diff --git a/fp/drop.js b/fp/drop.js new file mode 100644 index 000000000..ccca2d0da --- /dev/null +++ b/fp/drop.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('drop', require('../drop')); diff --git a/fp/dropRight.js b/fp/dropRight.js new file mode 100644 index 000000000..bd9a2bd7b --- /dev/null +++ b/fp/dropRight.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('dropRight', require('../dropRight')); diff --git a/fp/dropRightWhile.js b/fp/dropRightWhile.js new file mode 100644 index 000000000..2dbb2a3b6 --- /dev/null +++ b/fp/dropRightWhile.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('dropRightWhile', require('../dropRightWhile')); diff --git a/fp/dropWhile.js b/fp/dropWhile.js new file mode 100644 index 000000000..17e46ff4e --- /dev/null +++ b/fp/dropWhile.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('dropWhile', require('../dropWhile')); diff --git a/fp/each.js b/fp/each.js new file mode 100644 index 000000000..8800f4204 --- /dev/null +++ b/fp/each.js @@ -0,0 +1 @@ +module.exports = require('./forEach'); diff --git a/fp/eachRight.js b/fp/eachRight.js new file mode 100644 index 000000000..3252b2aba --- /dev/null +++ b/fp/eachRight.js @@ -0,0 +1 @@ +module.exports = require('./forEachRight'); diff --git a/fp/endsWith.js b/fp/endsWith.js new file mode 100644 index 000000000..cbe8f8ca2 --- /dev/null +++ b/fp/endsWith.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('endsWith', require('../endsWith')); diff --git a/fp/eq.js b/fp/eq.js new file mode 100644 index 000000000..518a54df7 --- /dev/null +++ b/fp/eq.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('eq', require('../eq')); diff --git a/fp/equals.js b/fp/equals.js new file mode 100644 index 000000000..e6a5ce0ca --- /dev/null +++ b/fp/equals.js @@ -0,0 +1 @@ +module.exports = require('./isEqual'); diff --git a/fp/escape.js b/fp/escape.js new file mode 100644 index 000000000..e5de9f231 --- /dev/null +++ b/fp/escape.js @@ -0,0 +1 @@ +module.exports = require('../escape'); diff --git a/fp/escapeRegExp.js b/fp/escapeRegExp.js new file mode 100644 index 000000000..ab18963a1 --- /dev/null +++ b/fp/escapeRegExp.js @@ -0,0 +1 @@ +module.exports = require('../escapeRegExp'); diff --git a/fp/every.js b/fp/every.js new file mode 100644 index 000000000..965f889b6 --- /dev/null +++ b/fp/every.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('every', require('../every')); diff --git a/fp/extend.js b/fp/extend.js new file mode 100644 index 000000000..e00166c20 --- /dev/null +++ b/fp/extend.js @@ -0,0 +1 @@ +module.exports = require('./assignIn'); diff --git a/fp/extendWith.js b/fp/extendWith.js new file mode 100644 index 000000000..dbdcb3b4e --- /dev/null +++ b/fp/extendWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInWith'); diff --git a/fp/fill.js b/fp/fill.js new file mode 100644 index 000000000..e16f8bf33 --- /dev/null +++ b/fp/fill.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('fill', require('../fill')); diff --git a/fp/filter.js b/fp/filter.js new file mode 100644 index 000000000..7191a8223 --- /dev/null +++ b/fp/filter.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('filter', require('../filter')); diff --git a/fp/find.js b/fp/find.js new file mode 100644 index 000000000..5915bbd04 --- /dev/null +++ b/fp/find.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('find', require('../find')); diff --git a/fp/findIndex.js b/fp/findIndex.js new file mode 100644 index 000000000..6bf435c78 --- /dev/null +++ b/fp/findIndex.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('findIndex', require('../findIndex')); diff --git a/fp/findKey.js b/fp/findKey.js new file mode 100644 index 000000000..3ff9844c1 --- /dev/null +++ b/fp/findKey.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('findKey', require('../findKey')); diff --git a/fp/findLast.js b/fp/findLast.js new file mode 100644 index 000000000..31e169b38 --- /dev/null +++ b/fp/findLast.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('findLast', require('../findLast')); diff --git a/fp/findLastIndex.js b/fp/findLastIndex.js new file mode 100644 index 000000000..db41e8843 --- /dev/null +++ b/fp/findLastIndex.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('findLastIndex', require('../findLastIndex')); diff --git a/fp/findLastKey.js b/fp/findLastKey.js new file mode 100644 index 000000000..ffe9e2a11 --- /dev/null +++ b/fp/findLastKey.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('findLastKey', require('../findLastKey')); diff --git a/fp/first.js b/fp/first.js new file mode 100644 index 000000000..53f4ad13e --- /dev/null +++ b/fp/first.js @@ -0,0 +1 @@ +module.exports = require('./head'); diff --git a/fp/flatMap.js b/fp/flatMap.js new file mode 100644 index 000000000..da249a883 --- /dev/null +++ b/fp/flatMap.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('flatMap', require('../flatMap')); diff --git a/fp/flatten.js b/fp/flatten.js new file mode 100644 index 000000000..f1c1a6223 --- /dev/null +++ b/fp/flatten.js @@ -0,0 +1 @@ +module.exports = require('../flatten'); diff --git a/fp/flattenDeep.js b/fp/flattenDeep.js new file mode 100644 index 000000000..c2ff9879b --- /dev/null +++ b/fp/flattenDeep.js @@ -0,0 +1 @@ +module.exports = require('../flattenDeep'); diff --git a/fp/flip.js b/fp/flip.js new file mode 100644 index 000000000..730bbd1bb --- /dev/null +++ b/fp/flip.js @@ -0,0 +1 @@ +module.exports = require('../flip'); diff --git a/fp/floor.js b/fp/floor.js new file mode 100644 index 000000000..f130f8b59 --- /dev/null +++ b/fp/floor.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('floor', require('../floor')); diff --git a/fp/flow.js b/fp/flow.js new file mode 100644 index 000000000..d9943c6d0 --- /dev/null +++ b/fp/flow.js @@ -0,0 +1 @@ +module.exports = require('../flow'); diff --git a/fp/flowRight.js b/fp/flowRight.js new file mode 100644 index 000000000..556dc378f --- /dev/null +++ b/fp/flowRight.js @@ -0,0 +1 @@ +module.exports = require('../flowRight'); diff --git a/fp/forEach.js b/fp/forEach.js new file mode 100644 index 000000000..d715ea662 --- /dev/null +++ b/fp/forEach.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('forEach', require('../forEach')); diff --git a/fp/forEachRight.js b/fp/forEachRight.js new file mode 100644 index 000000000..90dd8dd29 --- /dev/null +++ b/fp/forEachRight.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('forEachRight', require('../forEachRight')); diff --git a/fp/forIn.js b/fp/forIn.js new file mode 100644 index 000000000..90a8f07bb --- /dev/null +++ b/fp/forIn.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('forIn', require('../forIn')); diff --git a/fp/forInRight.js b/fp/forInRight.js new file mode 100644 index 000000000..505258f44 --- /dev/null +++ b/fp/forInRight.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('forInRight', require('../forInRight')); diff --git a/fp/forOwn.js b/fp/forOwn.js new file mode 100644 index 000000000..6fef1e3d5 --- /dev/null +++ b/fp/forOwn.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('forOwn', require('../forOwn')); diff --git a/fp/forOwnRight.js b/fp/forOwnRight.js new file mode 100644 index 000000000..11ff1fdaf --- /dev/null +++ b/fp/forOwnRight.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('forOwnRight', require('../forOwnRight')); diff --git a/fp/fromPairs.js b/fp/fromPairs.js new file mode 100644 index 000000000..f5c3cb8d7 --- /dev/null +++ b/fp/fromPairs.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('fromPairs', require('../fromPairs')); diff --git a/fp/function.js b/fp/function.js new file mode 100644 index 000000000..dfe69b1fa --- /dev/null +++ b/fp/function.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../function')); diff --git a/fp/functions.js b/fp/functions.js new file mode 100644 index 000000000..bb1cb93b2 --- /dev/null +++ b/fp/functions.js @@ -0,0 +1 @@ +module.exports = require('../functions'); diff --git a/fp/functionsIn.js b/fp/functionsIn.js new file mode 100644 index 000000000..d375213c4 --- /dev/null +++ b/fp/functionsIn.js @@ -0,0 +1 @@ +module.exports = require('../functionsIn'); diff --git a/fp/get.js b/fp/get.js new file mode 100644 index 000000000..a054c9d22 --- /dev/null +++ b/fp/get.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('get', require('../get')); diff --git a/fp/getOr.js b/fp/getOr.js new file mode 100644 index 000000000..c46f2e9e0 --- /dev/null +++ b/fp/getOr.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('getOr', require('../get')); diff --git a/fp/groupBy.js b/fp/groupBy.js new file mode 100644 index 000000000..6588856a9 --- /dev/null +++ b/fp/groupBy.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('groupBy', require('../groupBy')); diff --git a/fp/gt.js b/fp/gt.js new file mode 100644 index 000000000..5b92de949 --- /dev/null +++ b/fp/gt.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('gt', require('../gt')); diff --git a/fp/gte.js b/fp/gte.js new file mode 100644 index 000000000..3a4025067 --- /dev/null +++ b/fp/gte.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('gte', require('../gte')); diff --git a/fp/has.js b/fp/has.js new file mode 100644 index 000000000..e37db9ab5 --- /dev/null +++ b/fp/has.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('has', require('../has')); diff --git a/fp/hasIn.js b/fp/hasIn.js new file mode 100644 index 000000000..84d781564 --- /dev/null +++ b/fp/hasIn.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('hasIn', require('../hasIn')); diff --git a/fp/head.js b/fp/head.js new file mode 100644 index 000000000..bd97a7b2c --- /dev/null +++ b/fp/head.js @@ -0,0 +1 @@ +module.exports = require('../head'); diff --git a/fp/identity.js b/fp/identity.js new file mode 100644 index 000000000..6d007dc10 --- /dev/null +++ b/fp/identity.js @@ -0,0 +1 @@ +module.exports = require('../identity'); diff --git a/fp/inRange.js b/fp/inRange.js new file mode 100644 index 000000000..fc55e1c1f --- /dev/null +++ b/fp/inRange.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('inRange', require('../inRange')); diff --git a/fp/includes.js b/fp/includes.js new file mode 100644 index 000000000..91f1eec4d --- /dev/null +++ b/fp/includes.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('includes', require('../includes')); diff --git a/fp/indexOf.js b/fp/indexOf.js new file mode 100644 index 000000000..65345cedc --- /dev/null +++ b/fp/indexOf.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('indexOf', require('../indexOf')); diff --git a/fp/init.js b/fp/init.js new file mode 100644 index 000000000..2f88d8b0e --- /dev/null +++ b/fp/init.js @@ -0,0 +1 @@ +module.exports = require('./initial'); diff --git a/fp/initial.js b/fp/initial.js new file mode 100644 index 000000000..9fc94e060 --- /dev/null +++ b/fp/initial.js @@ -0,0 +1 @@ +module.exports = require('../initial'); diff --git a/fp/intersection.js b/fp/intersection.js new file mode 100644 index 000000000..784f4d1c3 --- /dev/null +++ b/fp/intersection.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('intersection', require('../intersection')); diff --git a/fp/intersectionBy.js b/fp/intersectionBy.js new file mode 100644 index 000000000..4aa93b635 --- /dev/null +++ b/fp/intersectionBy.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('intersectionBy', require('../intersectionBy')); diff --git a/fp/intersectionWith.js b/fp/intersectionWith.js new file mode 100644 index 000000000..879fe9d44 --- /dev/null +++ b/fp/intersectionWith.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('intersectionWith', require('../intersectionWith')); diff --git a/fp/invert.js b/fp/invert.js new file mode 100644 index 000000000..231d5caf8 --- /dev/null +++ b/fp/invert.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('invert', require('../invert')); diff --git a/fp/invertBy.js b/fp/invertBy.js new file mode 100644 index 000000000..90820e6c3 --- /dev/null +++ b/fp/invertBy.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('invertBy', require('../invertBy')); diff --git a/fp/invoke.js b/fp/invoke.js new file mode 100644 index 000000000..a8635e8c3 --- /dev/null +++ b/fp/invoke.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('invoke', require('../invoke')); diff --git a/fp/invokeMap.js b/fp/invokeMap.js new file mode 100644 index 000000000..2691ae36e --- /dev/null +++ b/fp/invokeMap.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('invokeMap', require('../invokeMap')); diff --git a/fp/isArguments.js b/fp/isArguments.js new file mode 100644 index 000000000..093aa354c --- /dev/null +++ b/fp/isArguments.js @@ -0,0 +1 @@ +module.exports = require('../isArguments'); diff --git a/fp/isArray.js b/fp/isArray.js new file mode 100644 index 000000000..ec7fad3c3 --- /dev/null +++ b/fp/isArray.js @@ -0,0 +1 @@ +module.exports = require('../isArray'); diff --git a/fp/isArrayLike.js b/fp/isArrayLike.js new file mode 100644 index 000000000..1595b2f18 --- /dev/null +++ b/fp/isArrayLike.js @@ -0,0 +1 @@ +module.exports = require('../isArrayLike'); diff --git a/fp/isArrayLikeObject.js b/fp/isArrayLikeObject.js new file mode 100644 index 000000000..4d1d20289 --- /dev/null +++ b/fp/isArrayLikeObject.js @@ -0,0 +1 @@ +module.exports = require('../isArrayLikeObject'); diff --git a/fp/isBoolean.js b/fp/isBoolean.js new file mode 100644 index 000000000..30d4a4aa0 --- /dev/null +++ b/fp/isBoolean.js @@ -0,0 +1 @@ +module.exports = require('../isBoolean'); diff --git a/fp/isDate.js b/fp/isDate.js new file mode 100644 index 000000000..ac002f459 --- /dev/null +++ b/fp/isDate.js @@ -0,0 +1 @@ +module.exports = require('../isDate'); diff --git a/fp/isElement.js b/fp/isElement.js new file mode 100644 index 000000000..458a3484d --- /dev/null +++ b/fp/isElement.js @@ -0,0 +1 @@ +module.exports = require('../isElement'); diff --git a/fp/isEmpty.js b/fp/isEmpty.js new file mode 100644 index 000000000..b1a04cd88 --- /dev/null +++ b/fp/isEmpty.js @@ -0,0 +1 @@ +module.exports = require('../isEmpty'); diff --git a/fp/isEqual.js b/fp/isEqual.js new file mode 100644 index 000000000..91b7d6654 --- /dev/null +++ b/fp/isEqual.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('isEqual', require('../isEqual')); diff --git a/fp/isEqualWith.js b/fp/isEqualWith.js new file mode 100644 index 000000000..37a6e3506 --- /dev/null +++ b/fp/isEqualWith.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('isEqualWith', require('../isEqualWith')); diff --git a/fp/isError.js b/fp/isError.js new file mode 100644 index 000000000..da2710c26 --- /dev/null +++ b/fp/isError.js @@ -0,0 +1 @@ +module.exports = require('../isError'); diff --git a/fp/isFinite.js b/fp/isFinite.js new file mode 100644 index 000000000..a71e53de4 --- /dev/null +++ b/fp/isFinite.js @@ -0,0 +1 @@ +module.exports = require('../isFinite'); diff --git a/fp/isFunction.js b/fp/isFunction.js new file mode 100644 index 000000000..1fc73f62f --- /dev/null +++ b/fp/isFunction.js @@ -0,0 +1 @@ +module.exports = require('../isFunction'); diff --git a/fp/isInteger.js b/fp/isInteger.js new file mode 100644 index 000000000..f990b011c --- /dev/null +++ b/fp/isInteger.js @@ -0,0 +1 @@ +module.exports = require('../isInteger'); diff --git a/fp/isLength.js b/fp/isLength.js new file mode 100644 index 000000000..f40c36235 --- /dev/null +++ b/fp/isLength.js @@ -0,0 +1 @@ +module.exports = require('../isLength'); diff --git a/fp/isMatch.js b/fp/isMatch.js new file mode 100644 index 000000000..749c90331 --- /dev/null +++ b/fp/isMatch.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('isMatch', require('../isMatch')); diff --git a/fp/isMatchWith.js b/fp/isMatchWith.js new file mode 100644 index 000000000..b1311fcf3 --- /dev/null +++ b/fp/isMatchWith.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('isMatchWith', require('../isMatchWith')); diff --git a/fp/isNaN.js b/fp/isNaN.js new file mode 100644 index 000000000..74daf0a08 --- /dev/null +++ b/fp/isNaN.js @@ -0,0 +1 @@ +module.exports = require('../isNaN'); diff --git a/fp/isNative.js b/fp/isNative.js new file mode 100644 index 000000000..9eeded4a8 --- /dev/null +++ b/fp/isNative.js @@ -0,0 +1 @@ +module.exports = require('../isNative'); diff --git a/fp/isNil.js b/fp/isNil.js new file mode 100644 index 000000000..beace9db0 --- /dev/null +++ b/fp/isNil.js @@ -0,0 +1 @@ +module.exports = require('../isNil'); diff --git a/fp/isNull.js b/fp/isNull.js new file mode 100644 index 000000000..44689a783 --- /dev/null +++ b/fp/isNull.js @@ -0,0 +1 @@ +module.exports = require('../isNull'); diff --git a/fp/isNumber.js b/fp/isNumber.js new file mode 100644 index 000000000..d7e86155d --- /dev/null +++ b/fp/isNumber.js @@ -0,0 +1 @@ +module.exports = require('../isNumber'); diff --git a/fp/isObject.js b/fp/isObject.js new file mode 100644 index 000000000..bb4863002 --- /dev/null +++ b/fp/isObject.js @@ -0,0 +1 @@ +module.exports = require('../isObject'); diff --git a/fp/isObjectLike.js b/fp/isObjectLike.js new file mode 100644 index 000000000..5ef6f62b1 --- /dev/null +++ b/fp/isObjectLike.js @@ -0,0 +1 @@ +module.exports = require('../isObjectLike'); diff --git a/fp/isPlainObject.js b/fp/isPlainObject.js new file mode 100644 index 000000000..2d34d86a4 --- /dev/null +++ b/fp/isPlainObject.js @@ -0,0 +1 @@ +module.exports = require('../isPlainObject'); diff --git a/fp/isRegExp.js b/fp/isRegExp.js new file mode 100644 index 000000000..4d0727bec --- /dev/null +++ b/fp/isRegExp.js @@ -0,0 +1 @@ +module.exports = require('../isRegExp'); diff --git a/fp/isSafeInteger.js b/fp/isSafeInteger.js new file mode 100644 index 000000000..ed08cab66 --- /dev/null +++ b/fp/isSafeInteger.js @@ -0,0 +1 @@ +module.exports = require('../isSafeInteger'); diff --git a/fp/isString.js b/fp/isString.js new file mode 100644 index 000000000..2f22d0e44 --- /dev/null +++ b/fp/isString.js @@ -0,0 +1 @@ +module.exports = require('../isString'); diff --git a/fp/isSymbol.js b/fp/isSymbol.js new file mode 100644 index 000000000..9ce6731ec --- /dev/null +++ b/fp/isSymbol.js @@ -0,0 +1 @@ +module.exports = require('../isSymbol'); diff --git a/fp/isTypedArray.js b/fp/isTypedArray.js new file mode 100644 index 000000000..72349c5f0 --- /dev/null +++ b/fp/isTypedArray.js @@ -0,0 +1 @@ +module.exports = require('../isTypedArray'); diff --git a/fp/isUndefined.js b/fp/isUndefined.js new file mode 100644 index 000000000..a65c5bec9 --- /dev/null +++ b/fp/isUndefined.js @@ -0,0 +1 @@ +module.exports = require('../isUndefined'); diff --git a/fp/iteratee.js b/fp/iteratee.js new file mode 100644 index 000000000..2884465d5 --- /dev/null +++ b/fp/iteratee.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('iteratee', require('../iteratee')); diff --git a/fp/join.js b/fp/join.js new file mode 100644 index 000000000..fdaa488e3 --- /dev/null +++ b/fp/join.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('join', require('../join')); diff --git a/fp/kebabCase.js b/fp/kebabCase.js new file mode 100644 index 000000000..f251a4d48 --- /dev/null +++ b/fp/kebabCase.js @@ -0,0 +1 @@ +module.exports = require('../kebabCase'); diff --git a/fp/keyBy.js b/fp/keyBy.js new file mode 100644 index 000000000..ad9abacb1 --- /dev/null +++ b/fp/keyBy.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('keyBy', require('../keyBy')); diff --git a/fp/keys.js b/fp/keys.js new file mode 100644 index 000000000..23dc6b7d9 --- /dev/null +++ b/fp/keys.js @@ -0,0 +1 @@ +module.exports = require('../keys'); diff --git a/fp/keysIn.js b/fp/keysIn.js new file mode 100644 index 000000000..2b738b99f --- /dev/null +++ b/fp/keysIn.js @@ -0,0 +1 @@ +module.exports = require('../keysIn'); diff --git a/fp/lang.js b/fp/lang.js new file mode 100644 index 000000000..08cc9c14b --- /dev/null +++ b/fp/lang.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../lang')); diff --git a/fp/last.js b/fp/last.js new file mode 100644 index 000000000..222be23aa --- /dev/null +++ b/fp/last.js @@ -0,0 +1 @@ +module.exports = require('../last'); diff --git a/fp/lastIndexOf.js b/fp/lastIndexOf.js new file mode 100644 index 000000000..e27480e37 --- /dev/null +++ b/fp/lastIndexOf.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('lastIndexOf', require('../lastIndexOf')); diff --git a/fp/lowerCase.js b/fp/lowerCase.js new file mode 100644 index 000000000..4da15cea6 --- /dev/null +++ b/fp/lowerCase.js @@ -0,0 +1 @@ +module.exports = require('../lowerCase'); diff --git a/fp/lowerFirst.js b/fp/lowerFirst.js new file mode 100644 index 000000000..afd1ba547 --- /dev/null +++ b/fp/lowerFirst.js @@ -0,0 +1 @@ +module.exports = require('../lowerFirst'); diff --git a/fp/lt.js b/fp/lt.js new file mode 100644 index 000000000..dd4cba04f --- /dev/null +++ b/fp/lt.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('lt', require('../lt')); diff --git a/fp/lte.js b/fp/lte.js new file mode 100644 index 000000000..f9bf7254f --- /dev/null +++ b/fp/lte.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('lte', require('../lte')); diff --git a/fp/map.js b/fp/map.js new file mode 100644 index 000000000..b74c1a1ce --- /dev/null +++ b/fp/map.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('map', require('../map')); diff --git a/fp/mapKeys.js b/fp/mapKeys.js new file mode 100644 index 000000000..a8156c104 --- /dev/null +++ b/fp/mapKeys.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('mapKeys', require('../mapKeys')); diff --git a/fp/mapObj.js b/fp/mapObj.js new file mode 100644 index 000000000..9f1872de9 --- /dev/null +++ b/fp/mapObj.js @@ -0,0 +1 @@ +module.exports = require('./mapValues'); diff --git a/fp/mapValues.js b/fp/mapValues.js new file mode 100644 index 000000000..9375d73e3 --- /dev/null +++ b/fp/mapValues.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('mapValues', require('../mapValues')); diff --git a/fp/matches.js b/fp/matches.js new file mode 100644 index 000000000..eea591643 --- /dev/null +++ b/fp/matches.js @@ -0,0 +1 @@ +module.exports = require('../matches'); diff --git a/fp/matchesProperty.js b/fp/matchesProperty.js new file mode 100644 index 000000000..c4343a171 --- /dev/null +++ b/fp/matchesProperty.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('matchesProperty', require('../matchesProperty')); diff --git a/fp/math.js b/fp/math.js new file mode 100644 index 000000000..e8f50f792 --- /dev/null +++ b/fp/math.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../math')); diff --git a/fp/max.js b/fp/max.js new file mode 100644 index 000000000..f7258c6ec --- /dev/null +++ b/fp/max.js @@ -0,0 +1 @@ +module.exports = require('../max'); diff --git a/fp/maxBy.js b/fp/maxBy.js new file mode 100644 index 000000000..b81243fab --- /dev/null +++ b/fp/maxBy.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('maxBy', require('../maxBy')); diff --git a/fp/mean.js b/fp/mean.js new file mode 100644 index 000000000..b78e427a9 --- /dev/null +++ b/fp/mean.js @@ -0,0 +1 @@ +module.exports = require('../mean'); diff --git a/fp/memoize.js b/fp/memoize.js new file mode 100644 index 000000000..1a45e09eb --- /dev/null +++ b/fp/memoize.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('memoize', require('../memoize')); diff --git a/fp/merge.js b/fp/merge.js new file mode 100644 index 000000000..3dca64191 --- /dev/null +++ b/fp/merge.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('merge', require('../merge')); diff --git a/fp/mergeWith.js b/fp/mergeWith.js new file mode 100644 index 000000000..ba456444d --- /dev/null +++ b/fp/mergeWith.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('mergeWith', require('../mergeWith')); diff --git a/fp/method.js b/fp/method.js new file mode 100644 index 000000000..c2f95c3f1 --- /dev/null +++ b/fp/method.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('method', require('../method')); diff --git a/fp/methodOf.js b/fp/methodOf.js new file mode 100644 index 000000000..223f6516e --- /dev/null +++ b/fp/methodOf.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('methodOf', require('../methodOf')); diff --git a/fp/min.js b/fp/min.js new file mode 100644 index 000000000..10db02c0e --- /dev/null +++ b/fp/min.js @@ -0,0 +1 @@ +module.exports = require('../min'); diff --git a/fp/minBy.js b/fp/minBy.js new file mode 100644 index 000000000..10edfd40d --- /dev/null +++ b/fp/minBy.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('minBy', require('../minBy')); diff --git a/fp/mixin.js b/fp/mixin.js new file mode 100644 index 000000000..965f1808c --- /dev/null +++ b/fp/mixin.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('mixin', require('../mixin')); diff --git a/fp/nAry.js b/fp/nAry.js new file mode 100644 index 000000000..f262a76cc --- /dev/null +++ b/fp/nAry.js @@ -0,0 +1 @@ +module.exports = require('./ary'); diff --git a/fp/negate.js b/fp/negate.js new file mode 100644 index 000000000..345b4250e --- /dev/null +++ b/fp/negate.js @@ -0,0 +1 @@ +module.exports = require('../negate'); diff --git a/fp/next.js b/fp/next.js new file mode 100644 index 000000000..5cad70e44 --- /dev/null +++ b/fp/next.js @@ -0,0 +1 @@ +module.exports = require('../next'); diff --git a/fp/noop.js b/fp/noop.js new file mode 100644 index 000000000..ca1005047 --- /dev/null +++ b/fp/noop.js @@ -0,0 +1 @@ +module.exports = require('../noop'); diff --git a/fp/now.js b/fp/now.js new file mode 100644 index 000000000..aa5ed67a7 --- /dev/null +++ b/fp/now.js @@ -0,0 +1 @@ +module.exports = require('../now'); diff --git a/fp/nthArg.js b/fp/nthArg.js new file mode 100644 index 000000000..dd47ac666 --- /dev/null +++ b/fp/nthArg.js @@ -0,0 +1 @@ +module.exports = require('../nthArg'); diff --git a/fp/number.js b/fp/number.js new file mode 100644 index 000000000..5c10b8842 --- /dev/null +++ b/fp/number.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../number')); diff --git a/fp/object.js b/fp/object.js new file mode 100644 index 000000000..ae39a1346 --- /dev/null +++ b/fp/object.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../object')); diff --git a/fp/omit.js b/fp/omit.js new file mode 100644 index 000000000..404b55160 --- /dev/null +++ b/fp/omit.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('omit', require('../omit')); diff --git a/fp/omitAll.js b/fp/omitAll.js new file mode 100644 index 000000000..144cf4b96 --- /dev/null +++ b/fp/omitAll.js @@ -0,0 +1 @@ +module.exports = require('./omit'); diff --git a/fp/omitBy.js b/fp/omitBy.js new file mode 100644 index 000000000..745efa54f --- /dev/null +++ b/fp/omitBy.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('omitBy', require('../omitBy')); diff --git a/fp/once.js b/fp/once.js new file mode 100644 index 000000000..6bd0beb20 --- /dev/null +++ b/fp/once.js @@ -0,0 +1 @@ +module.exports = require('../once'); diff --git a/fp/orderBy.js b/fp/orderBy.js new file mode 100644 index 000000000..b32244f18 --- /dev/null +++ b/fp/orderBy.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('orderBy', require('../orderBy')); diff --git a/fp/over.js b/fp/over.js new file mode 100644 index 000000000..0a5a797a7 --- /dev/null +++ b/fp/over.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('over', require('../over')); diff --git a/fp/overArgs.js b/fp/overArgs.js new file mode 100644 index 000000000..818838745 --- /dev/null +++ b/fp/overArgs.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('overArgs', require('../overArgs')); diff --git a/fp/overEvery.js b/fp/overEvery.js new file mode 100644 index 000000000..36dc552b3 --- /dev/null +++ b/fp/overEvery.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('overEvery', require('../overEvery')); diff --git a/fp/overSome.js b/fp/overSome.js new file mode 100644 index 000000000..b02d464ac --- /dev/null +++ b/fp/overSome.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('overSome', require('../overSome')); diff --git a/fp/pad.js b/fp/pad.js new file mode 100644 index 000000000..e59cfc935 --- /dev/null +++ b/fp/pad.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('pad', require('../pad')); diff --git a/fp/padEnd.js b/fp/padEnd.js new file mode 100644 index 000000000..0b6dbb786 --- /dev/null +++ b/fp/padEnd.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('padEnd', require('../padEnd')); diff --git a/fp/padStart.js b/fp/padStart.js new file mode 100644 index 000000000..c97f09897 --- /dev/null +++ b/fp/padStart.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('padStart', require('../padStart')); diff --git a/fp/parseInt.js b/fp/parseInt.js new file mode 100644 index 000000000..35be7137e --- /dev/null +++ b/fp/parseInt.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('parseInt', require('../parseInt')); diff --git a/fp/partial.js b/fp/partial.js new file mode 100644 index 000000000..fe07680ac --- /dev/null +++ b/fp/partial.js @@ -0,0 +1 @@ +module.exports = require('../partial'); diff --git a/fp/partialRight.js b/fp/partialRight.js new file mode 100644 index 000000000..667859067 --- /dev/null +++ b/fp/partialRight.js @@ -0,0 +1 @@ +module.exports = require('../partialRight'); diff --git a/fp/partition.js b/fp/partition.js new file mode 100644 index 000000000..b1495e676 --- /dev/null +++ b/fp/partition.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('partition', require('../partition')); diff --git a/fp/path.js b/fp/path.js new file mode 100644 index 000000000..b29cfb213 --- /dev/null +++ b/fp/path.js @@ -0,0 +1 @@ +module.exports = require('./get'); diff --git a/fp/pathEq.js b/fp/pathEq.js new file mode 100644 index 000000000..36c027a38 --- /dev/null +++ b/fp/pathEq.js @@ -0,0 +1 @@ +module.exports = require('./matchesProperty'); diff --git a/fp/pathOr.js b/fp/pathOr.js new file mode 100644 index 000000000..4ab582091 --- /dev/null +++ b/fp/pathOr.js @@ -0,0 +1 @@ +module.exports = require('./getOr'); diff --git a/fp/pick.js b/fp/pick.js new file mode 100644 index 000000000..e84b366d7 --- /dev/null +++ b/fp/pick.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('pick', require('../pick')); diff --git a/fp/pickAll.js b/fp/pickAll.js new file mode 100644 index 000000000..a8ecd4613 --- /dev/null +++ b/fp/pickAll.js @@ -0,0 +1 @@ +module.exports = require('./pick'); diff --git a/fp/pickBy.js b/fp/pickBy.js new file mode 100644 index 000000000..4d14a0b58 --- /dev/null +++ b/fp/pickBy.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('pickBy', require('../pickBy')); diff --git a/fp/pipe.js b/fp/pipe.js new file mode 100644 index 000000000..b2e1e2cc8 --- /dev/null +++ b/fp/pipe.js @@ -0,0 +1 @@ +module.exports = require('./flow'); diff --git a/fp/plant.js b/fp/plant.js new file mode 100644 index 000000000..c85596a0c --- /dev/null +++ b/fp/plant.js @@ -0,0 +1 @@ +module.exports = require('../plant'); diff --git a/fp/prop.js b/fp/prop.js new file mode 100644 index 000000000..b29cfb213 --- /dev/null +++ b/fp/prop.js @@ -0,0 +1 @@ +module.exports = require('./get'); diff --git a/fp/propOf.js b/fp/propOf.js new file mode 100644 index 000000000..cf0d197c6 --- /dev/null +++ b/fp/propOf.js @@ -0,0 +1 @@ +module.exports = require('./propertyOf'); diff --git a/fp/propOr.js b/fp/propOr.js new file mode 100644 index 000000000..4ab582091 --- /dev/null +++ b/fp/propOr.js @@ -0,0 +1 @@ +module.exports = require('./getOr'); diff --git a/fp/property.js b/fp/property.js new file mode 100644 index 000000000..fab6f239f --- /dev/null +++ b/fp/property.js @@ -0,0 +1 @@ +module.exports = require('../property'); diff --git a/fp/propertyOf.js b/fp/propertyOf.js new file mode 100644 index 000000000..d941cdbf5 --- /dev/null +++ b/fp/propertyOf.js @@ -0,0 +1 @@ +module.exports = require('../propertyOf'); diff --git a/fp/pull.js b/fp/pull.js new file mode 100644 index 000000000..47f49aefc --- /dev/null +++ b/fp/pull.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('pull', require('../pull')); diff --git a/fp/pullAll.js b/fp/pullAll.js new file mode 100644 index 000000000..ffb663bc6 --- /dev/null +++ b/fp/pullAll.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('pullAll', require('../pullAll')); diff --git a/fp/pullAllBy.js b/fp/pullAllBy.js new file mode 100644 index 000000000..23b11b7b3 --- /dev/null +++ b/fp/pullAllBy.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('pullAllBy', require('../pullAllBy')); diff --git a/fp/pullAt.js b/fp/pullAt.js new file mode 100644 index 000000000..5836d2dda --- /dev/null +++ b/fp/pullAt.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('pullAt', require('../pullAt')); diff --git a/fp/random.js b/fp/random.js new file mode 100644 index 000000000..607d63a19 --- /dev/null +++ b/fp/random.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('random', require('../random')); diff --git a/fp/range.js b/fp/range.js new file mode 100644 index 000000000..1142304e5 --- /dev/null +++ b/fp/range.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('range', require('../range')); diff --git a/fp/rangeRight.js b/fp/rangeRight.js new file mode 100644 index 000000000..22482877d --- /dev/null +++ b/fp/rangeRight.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('rangeRight', require('../rangeRight')); diff --git a/fp/rearg.js b/fp/rearg.js new file mode 100644 index 000000000..b2753e9e0 --- /dev/null +++ b/fp/rearg.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('rearg', require('../rearg')); diff --git a/fp/reduce.js b/fp/reduce.js new file mode 100644 index 000000000..2f1b42510 --- /dev/null +++ b/fp/reduce.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('reduce', require('../reduce')); diff --git a/fp/reduceRight.js b/fp/reduceRight.js new file mode 100644 index 000000000..b110e9e9b --- /dev/null +++ b/fp/reduceRight.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('reduceRight', require('../reduceRight')); diff --git a/fp/reject.js b/fp/reject.js new file mode 100644 index 000000000..30bd3bc7d --- /dev/null +++ b/fp/reject.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('reject', require('../reject')); diff --git a/fp/remove.js b/fp/remove.js new file mode 100644 index 000000000..4b67a9431 --- /dev/null +++ b/fp/remove.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('remove', require('../remove')); diff --git a/fp/repeat.js b/fp/repeat.js new file mode 100644 index 000000000..bc0704b3a --- /dev/null +++ b/fp/repeat.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('repeat', require('../repeat')); diff --git a/fp/replace.js b/fp/replace.js new file mode 100644 index 000000000..a4462e7d8 --- /dev/null +++ b/fp/replace.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('replace', require('../replace')); diff --git a/fp/rest.js b/fp/rest.js new file mode 100644 index 000000000..69dfc18a7 --- /dev/null +++ b/fp/rest.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('rest', require('../rest')); diff --git a/fp/result.js b/fp/result.js new file mode 100644 index 000000000..1d3fb58ff --- /dev/null +++ b/fp/result.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('result', require('../result')); diff --git a/fp/reverse.js b/fp/reverse.js new file mode 100644 index 000000000..a6d960de0 --- /dev/null +++ b/fp/reverse.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('reverse', require('../reverse')); diff --git a/fp/round.js b/fp/round.js new file mode 100644 index 000000000..9eb69b18e --- /dev/null +++ b/fp/round.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('round', require('../round')); diff --git a/fp/sample.js b/fp/sample.js new file mode 100644 index 000000000..008cb0683 --- /dev/null +++ b/fp/sample.js @@ -0,0 +1 @@ +module.exports = require('../sample'); diff --git a/fp/sampleSize.js b/fp/sampleSize.js new file mode 100644 index 000000000..920c075ff --- /dev/null +++ b/fp/sampleSize.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('sampleSize', require('../sampleSize')); diff --git a/fp/seq.js b/fp/seq.js new file mode 100644 index 000000000..d8f42b0a4 --- /dev/null +++ b/fp/seq.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../seq')); diff --git a/fp/set.js b/fp/set.js new file mode 100644 index 000000000..fc2a75b36 --- /dev/null +++ b/fp/set.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('set', require('../set')); diff --git a/fp/setWith.js b/fp/setWith.js new file mode 100644 index 000000000..fd836ea40 --- /dev/null +++ b/fp/setWith.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('setWith', require('../setWith')); diff --git a/fp/shuffle.js b/fp/shuffle.js new file mode 100644 index 000000000..85d569921 --- /dev/null +++ b/fp/shuffle.js @@ -0,0 +1 @@ +module.exports = require('../shuffle'); diff --git a/fp/size.js b/fp/size.js new file mode 100644 index 000000000..efba2ca65 --- /dev/null +++ b/fp/size.js @@ -0,0 +1 @@ +module.exports = require('../size'); diff --git a/fp/slice.js b/fp/slice.js new file mode 100644 index 000000000..6fb1898f9 --- /dev/null +++ b/fp/slice.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('slice', require('../slice')); diff --git a/fp/snakeCase.js b/fp/snakeCase.js new file mode 100644 index 000000000..2893f7bda --- /dev/null +++ b/fp/snakeCase.js @@ -0,0 +1 @@ +module.exports = require('../snakeCase'); diff --git a/fp/some.js b/fp/some.js new file mode 100644 index 000000000..64727fe38 --- /dev/null +++ b/fp/some.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('some', require('../some')); diff --git a/fp/somePass.js b/fp/somePass.js new file mode 100644 index 000000000..2774ab37a --- /dev/null +++ b/fp/somePass.js @@ -0,0 +1 @@ +module.exports = require('./overSome'); diff --git a/fp/sortBy.js b/fp/sortBy.js new file mode 100644 index 000000000..80fe4dd37 --- /dev/null +++ b/fp/sortBy.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('sortBy', require('../sortBy')); diff --git a/fp/sortedIndex.js b/fp/sortedIndex.js new file mode 100644 index 000000000..509dcb879 --- /dev/null +++ b/fp/sortedIndex.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('sortedIndex', require('../sortedIndex')); diff --git a/fp/sortedIndexBy.js b/fp/sortedIndexBy.js new file mode 100644 index 000000000..aa2d21969 --- /dev/null +++ b/fp/sortedIndexBy.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('sortedIndexBy', require('../sortedIndexBy')); diff --git a/fp/sortedIndexOf.js b/fp/sortedIndexOf.js new file mode 100644 index 000000000..c12742010 --- /dev/null +++ b/fp/sortedIndexOf.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('sortedIndexOf', require('../sortedIndexOf')); diff --git a/fp/sortedLastIndex.js b/fp/sortedLastIndex.js new file mode 100644 index 000000000..7ec9e3359 --- /dev/null +++ b/fp/sortedLastIndex.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('sortedLastIndex', require('../sortedLastIndex')); diff --git a/fp/sortedLastIndexBy.js b/fp/sortedLastIndexBy.js new file mode 100644 index 000000000..e03f1853e --- /dev/null +++ b/fp/sortedLastIndexBy.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('sortedLastIndexBy', require('../sortedLastIndexBy')); diff --git a/fp/sortedLastIndexOf.js b/fp/sortedLastIndexOf.js new file mode 100644 index 000000000..0130801e9 --- /dev/null +++ b/fp/sortedLastIndexOf.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('sortedLastIndexOf', require('../sortedLastIndexOf')); diff --git a/fp/sortedUniq.js b/fp/sortedUniq.js new file mode 100644 index 000000000..c0df750ee --- /dev/null +++ b/fp/sortedUniq.js @@ -0,0 +1 @@ +module.exports = require('../sortedUniq'); diff --git a/fp/sortedUniqBy.js b/fp/sortedUniqBy.js new file mode 100644 index 000000000..f5c65ad6b --- /dev/null +++ b/fp/sortedUniqBy.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('sortedUniqBy', require('../sortedUniqBy')); diff --git a/fp/split.js b/fp/split.js new file mode 100644 index 000000000..79f269393 --- /dev/null +++ b/fp/split.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('split', require('../split')); diff --git a/fp/spread.js b/fp/spread.js new file mode 100644 index 000000000..162e77d9f --- /dev/null +++ b/fp/spread.js @@ -0,0 +1 @@ +module.exports = require('../spread'); diff --git a/fp/startCase.js b/fp/startCase.js new file mode 100644 index 000000000..2a6a66ef1 --- /dev/null +++ b/fp/startCase.js @@ -0,0 +1 @@ +module.exports = require('../startCase'); diff --git a/fp/startsWith.js b/fp/startsWith.js new file mode 100644 index 000000000..730a141f6 --- /dev/null +++ b/fp/startsWith.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('startsWith', require('../startsWith')); diff --git a/fp/string.js b/fp/string.js new file mode 100644 index 000000000..773b03704 --- /dev/null +++ b/fp/string.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../string')); diff --git a/fp/subtract.js b/fp/subtract.js new file mode 100644 index 000000000..46b83db36 --- /dev/null +++ b/fp/subtract.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('subtract', require('../subtract')); diff --git a/fp/sum.js b/fp/sum.js new file mode 100644 index 000000000..e8a59c5d0 --- /dev/null +++ b/fp/sum.js @@ -0,0 +1 @@ +module.exports = require('../sum'); diff --git a/fp/sumBy.js b/fp/sumBy.js new file mode 100644 index 000000000..2692dc1e4 --- /dev/null +++ b/fp/sumBy.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('sumBy', require('../sumBy')); diff --git a/fp/tail.js b/fp/tail.js new file mode 100644 index 000000000..36c6494a6 --- /dev/null +++ b/fp/tail.js @@ -0,0 +1 @@ +module.exports = require('../tail'); diff --git a/fp/take.js b/fp/take.js new file mode 100644 index 000000000..e0984a4d2 --- /dev/null +++ b/fp/take.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('take', require('../take')); diff --git a/fp/takeRight.js b/fp/takeRight.js new file mode 100644 index 000000000..7b7c3ce70 --- /dev/null +++ b/fp/takeRight.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('takeRight', require('../takeRight')); diff --git a/fp/takeRightWhile.js b/fp/takeRightWhile.js new file mode 100644 index 000000000..305b254a1 --- /dev/null +++ b/fp/takeRightWhile.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('takeRightWhile', require('../takeRightWhile')); diff --git a/fp/takeWhile.js b/fp/takeWhile.js new file mode 100644 index 000000000..a90126db0 --- /dev/null +++ b/fp/takeWhile.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('takeWhile', require('../takeWhile')); diff --git a/fp/tap.js b/fp/tap.js new file mode 100644 index 000000000..3bec2bdb2 --- /dev/null +++ b/fp/tap.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('tap', require('../tap')); diff --git a/fp/template.js b/fp/template.js new file mode 100644 index 000000000..0130d1450 --- /dev/null +++ b/fp/template.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('template', require('../template')); diff --git a/fp/templateSettings.js b/fp/templateSettings.js new file mode 100644 index 000000000..ddbbb5861 --- /dev/null +++ b/fp/templateSettings.js @@ -0,0 +1 @@ +module.exports = require('../templateSettings'); diff --git a/fp/throttle.js b/fp/throttle.js new file mode 100644 index 000000000..36f76d6df --- /dev/null +++ b/fp/throttle.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('throttle', require('../throttle')); diff --git a/fp/thru.js b/fp/thru.js new file mode 100644 index 000000000..05ddaefd8 --- /dev/null +++ b/fp/thru.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('thru', require('../thru')); diff --git a/fp/times.js b/fp/times.js new file mode 100644 index 000000000..02fd3b70c --- /dev/null +++ b/fp/times.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('times', require('../times')); diff --git a/fp/toArray.js b/fp/toArray.js new file mode 100644 index 000000000..1ea0b5210 --- /dev/null +++ b/fp/toArray.js @@ -0,0 +1 @@ +module.exports = require('../toArray'); diff --git a/fp/toInteger.js b/fp/toInteger.js new file mode 100644 index 000000000..17e59a3d9 --- /dev/null +++ b/fp/toInteger.js @@ -0,0 +1 @@ +module.exports = require('../toInteger'); diff --git a/fp/toIterator.js b/fp/toIterator.js new file mode 100644 index 000000000..13bf21c2a --- /dev/null +++ b/fp/toIterator.js @@ -0,0 +1 @@ +module.exports = require('../toIterator'); diff --git a/fp/toJSON.js b/fp/toJSON.js new file mode 100644 index 000000000..5f6cb9268 --- /dev/null +++ b/fp/toJSON.js @@ -0,0 +1 @@ +module.exports = require('../toJSON'); diff --git a/fp/toLength.js b/fp/toLength.js new file mode 100644 index 000000000..38529fb0a --- /dev/null +++ b/fp/toLength.js @@ -0,0 +1 @@ +module.exports = require('../toLength'); diff --git a/fp/toLower.js b/fp/toLower.js new file mode 100644 index 000000000..01d343248 --- /dev/null +++ b/fp/toLower.js @@ -0,0 +1 @@ +module.exports = require('../toLower'); diff --git a/fp/toNumber.js b/fp/toNumber.js new file mode 100644 index 000000000..071e320a1 --- /dev/null +++ b/fp/toNumber.js @@ -0,0 +1 @@ +module.exports = require('../toNumber'); diff --git a/fp/toPairs.js b/fp/toPairs.js new file mode 100644 index 000000000..4b4dcb767 --- /dev/null +++ b/fp/toPairs.js @@ -0,0 +1 @@ +module.exports = require('../toPairs'); diff --git a/fp/toPairsIn.js b/fp/toPairsIn.js new file mode 100644 index 000000000..53076cc6a --- /dev/null +++ b/fp/toPairsIn.js @@ -0,0 +1 @@ +module.exports = require('../toPairsIn'); diff --git a/fp/toPath.js b/fp/toPath.js new file mode 100644 index 000000000..62762ecfa --- /dev/null +++ b/fp/toPath.js @@ -0,0 +1 @@ +module.exports = require('../toPath'); diff --git a/fp/toPlainObject.js b/fp/toPlainObject.js new file mode 100644 index 000000000..6a6aebd04 --- /dev/null +++ b/fp/toPlainObject.js @@ -0,0 +1 @@ +module.exports = require('../toPlainObject'); diff --git a/fp/toSafeInteger.js b/fp/toSafeInteger.js new file mode 100644 index 000000000..3f5b8174d --- /dev/null +++ b/fp/toSafeInteger.js @@ -0,0 +1 @@ +module.exports = require('../toSafeInteger'); diff --git a/fp/toString.js b/fp/toString.js new file mode 100644 index 000000000..c309058c0 --- /dev/null +++ b/fp/toString.js @@ -0,0 +1 @@ +module.exports = require('../[object Object]'); diff --git a/fp/toUpper.js b/fp/toUpper.js new file mode 100644 index 000000000..428eb3385 --- /dev/null +++ b/fp/toUpper.js @@ -0,0 +1 @@ +module.exports = require('../toUpper'); diff --git a/fp/transform.js b/fp/transform.js new file mode 100644 index 000000000..30bed49a9 --- /dev/null +++ b/fp/transform.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('transform', require('../transform')); diff --git a/fp/trim.js b/fp/trim.js new file mode 100644 index 000000000..b7cafe967 --- /dev/null +++ b/fp/trim.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('trim', require('../trim')); diff --git a/fp/trimEnd.js b/fp/trimEnd.js new file mode 100644 index 000000000..166659666 --- /dev/null +++ b/fp/trimEnd.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('trimEnd', require('../trimEnd')); diff --git a/fp/trimStart.js b/fp/trimStart.js new file mode 100644 index 000000000..4921b0342 --- /dev/null +++ b/fp/trimStart.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('trimStart', require('../trimStart')); diff --git a/fp/truncate.js b/fp/truncate.js new file mode 100644 index 000000000..0c4d158f8 --- /dev/null +++ b/fp/truncate.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('truncate', require('../truncate')); diff --git a/fp/unapply.js b/fp/unapply.js new file mode 100644 index 000000000..c5dfe779d --- /dev/null +++ b/fp/unapply.js @@ -0,0 +1 @@ +module.exports = require('./rest'); diff --git a/fp/unary.js b/fp/unary.js new file mode 100644 index 000000000..3bc648376 --- /dev/null +++ b/fp/unary.js @@ -0,0 +1 @@ +module.exports = require('../unary'); diff --git a/fp/unescape.js b/fp/unescape.js new file mode 100644 index 000000000..4233b155f --- /dev/null +++ b/fp/unescape.js @@ -0,0 +1 @@ +module.exports = require('../unescape'); diff --git a/fp/union.js b/fp/union.js new file mode 100644 index 000000000..9deef1235 --- /dev/null +++ b/fp/union.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('union', require('../union')); diff --git a/fp/unionBy.js b/fp/unionBy.js new file mode 100644 index 000000000..029b35961 --- /dev/null +++ b/fp/unionBy.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('unionBy', require('../unionBy')); diff --git a/fp/unionWith.js b/fp/unionWith.js new file mode 100644 index 000000000..631eda089 --- /dev/null +++ b/fp/unionWith.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('unionWith', require('../unionWith')); diff --git a/fp/uniq.js b/fp/uniq.js new file mode 100644 index 000000000..c64510f09 --- /dev/null +++ b/fp/uniq.js @@ -0,0 +1 @@ +module.exports = require('../uniq'); diff --git a/fp/uniqBy.js b/fp/uniqBy.js new file mode 100644 index 000000000..1b6c03ff9 --- /dev/null +++ b/fp/uniqBy.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('uniqBy', require('../uniqBy')); diff --git a/fp/uniqWith.js b/fp/uniqWith.js new file mode 100644 index 000000000..be4c48def --- /dev/null +++ b/fp/uniqWith.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('uniqWith', require('../uniqWith')); diff --git a/fp/uniqueId.js b/fp/uniqueId.js new file mode 100644 index 000000000..daa41cb09 --- /dev/null +++ b/fp/uniqueId.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('uniqueId', require('../uniqueId')); diff --git a/fp/unnest.js b/fp/unnest.js new file mode 100644 index 000000000..5d34060aa --- /dev/null +++ b/fp/unnest.js @@ -0,0 +1 @@ +module.exports = require('./flatten'); diff --git a/fp/unset.js b/fp/unset.js new file mode 100644 index 000000000..0c4c1a690 --- /dev/null +++ b/fp/unset.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('unset', require('../unset')); diff --git a/fp/unzip.js b/fp/unzip.js new file mode 100644 index 000000000..e0ac2dbf5 --- /dev/null +++ b/fp/unzip.js @@ -0,0 +1 @@ +module.exports = require('../unzip'); diff --git a/fp/unzipWith.js b/fp/unzipWith.js new file mode 100644 index 000000000..de25cf7a8 --- /dev/null +++ b/fp/unzipWith.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('unzipWith', require('../unzipWith')); diff --git a/fp/upperCase.js b/fp/upperCase.js new file mode 100644 index 000000000..ddcb3695c --- /dev/null +++ b/fp/upperCase.js @@ -0,0 +1 @@ +module.exports = require('../upperCase'); diff --git a/fp/upperFirst.js b/fp/upperFirst.js new file mode 100644 index 000000000..34f1e20f9 --- /dev/null +++ b/fp/upperFirst.js @@ -0,0 +1 @@ +module.exports = require('../upperFirst'); diff --git a/fp/useWith.js b/fp/useWith.js new file mode 100644 index 000000000..d8b3df5a4 --- /dev/null +++ b/fp/useWith.js @@ -0,0 +1 @@ +module.exports = require('./overArgs'); diff --git a/fp/util.js b/fp/util.js new file mode 100644 index 000000000..18c00baed --- /dev/null +++ b/fp/util.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../util')); diff --git a/fp/value.js b/fp/value.js new file mode 100644 index 000000000..4dc0e7e96 --- /dev/null +++ b/fp/value.js @@ -0,0 +1 @@ +module.exports = require('../value'); diff --git a/fp/valueOf.js b/fp/valueOf.js new file mode 100644 index 000000000..c309058c0 --- /dev/null +++ b/fp/valueOf.js @@ -0,0 +1 @@ +module.exports = require('../[object Object]'); diff --git a/fp/values.js b/fp/values.js new file mode 100644 index 000000000..384317091 --- /dev/null +++ b/fp/values.js @@ -0,0 +1 @@ +module.exports = require('../values'); diff --git a/fp/valuesIn.js b/fp/valuesIn.js new file mode 100644 index 000000000..f81c171c4 --- /dev/null +++ b/fp/valuesIn.js @@ -0,0 +1 @@ +module.exports = require('../valuesIn'); diff --git a/fp/whereEq.js b/fp/whereEq.js new file mode 100644 index 000000000..ade80f6fb --- /dev/null +++ b/fp/whereEq.js @@ -0,0 +1 @@ +module.exports = require('./filter'); diff --git a/fp/without.js b/fp/without.js new file mode 100644 index 000000000..5238e940f --- /dev/null +++ b/fp/without.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('without', require('../without')); diff --git a/fp/words.js b/fp/words.js new file mode 100644 index 000000000..b58a485b9 --- /dev/null +++ b/fp/words.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('words', require('../words')); diff --git a/fp/wrap.js b/fp/wrap.js new file mode 100644 index 000000000..56465a226 --- /dev/null +++ b/fp/wrap.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('wrap', require('../wrap')); diff --git a/fp/wrapperAt.js b/fp/wrapperAt.js new file mode 100644 index 000000000..f8d37a194 --- /dev/null +++ b/fp/wrapperAt.js @@ -0,0 +1 @@ +module.exports = require('../wrapperAt'); diff --git a/fp/wrapperChain.js b/fp/wrapperChain.js new file mode 100644 index 000000000..964a846c8 --- /dev/null +++ b/fp/wrapperChain.js @@ -0,0 +1 @@ +module.exports = require('../wrapperChain'); diff --git a/fp/wrapperFlatMap.js b/fp/wrapperFlatMap.js new file mode 100644 index 000000000..fa030c0da --- /dev/null +++ b/fp/wrapperFlatMap.js @@ -0,0 +1 @@ +module.exports = require('../wrapperFlatMap'); diff --git a/fp/wrapperLodash.js b/fp/wrapperLodash.js new file mode 100644 index 000000000..d62a9969f --- /dev/null +++ b/fp/wrapperLodash.js @@ -0,0 +1 @@ +module.exports = require('../wrapperLodash'); diff --git a/fp/wrapperReverse.js b/fp/wrapperReverse.js new file mode 100644 index 000000000..cf703886c --- /dev/null +++ b/fp/wrapperReverse.js @@ -0,0 +1 @@ +module.exports = require('../wrapperReverse'); diff --git a/fp/wrapperValue.js b/fp/wrapperValue.js new file mode 100644 index 000000000..494dfb107 --- /dev/null +++ b/fp/wrapperValue.js @@ -0,0 +1 @@ +module.exports = require('../wrapperValue'); diff --git a/fp/xor.js b/fp/xor.js new file mode 100644 index 000000000..0f3e025fe --- /dev/null +++ b/fp/xor.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('xor', require('../xor')); diff --git a/fp/xorBy.js b/fp/xorBy.js new file mode 100644 index 000000000..e48fc41c7 --- /dev/null +++ b/fp/xorBy.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('xorBy', require('../xorBy')); diff --git a/fp/xorWith.js b/fp/xorWith.js new file mode 100644 index 000000000..5c2eebe67 --- /dev/null +++ b/fp/xorWith.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('xorWith', require('../xorWith')); diff --git a/fp/zip.js b/fp/zip.js new file mode 100644 index 000000000..0cae73b0a --- /dev/null +++ b/fp/zip.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('zip', require('../zip')); diff --git a/fp/zipObj.js b/fp/zipObj.js new file mode 100644 index 000000000..f4a34531b --- /dev/null +++ b/fp/zipObj.js @@ -0,0 +1 @@ +module.exports = require('./zipObject'); diff --git a/fp/zipObject.js b/fp/zipObject.js new file mode 100644 index 000000000..8c2ff3bc2 --- /dev/null +++ b/fp/zipObject.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('zipObject', require('../zipObject')); diff --git a/fp/zipObjectDeep.js b/fp/zipObjectDeep.js new file mode 100644 index 000000000..a0ee4e34e --- /dev/null +++ b/fp/zipObjectDeep.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('zipObjectDeep', require('../zipObjectDeep')); diff --git a/fp/zipWith.js b/fp/zipWith.js new file mode 100644 index 000000000..da75f3de4 --- /dev/null +++ b/fp/zipWith.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert('zipWith', require('../zipWith')); diff --git a/functions.js b/functions.js index 653949043..b50a197de 100644 --- a/functions.js +++ b/functions.js @@ -1,4 +1,4 @@ -var baseFunctions = require('./internal/baseFunctions'), +var baseFunctions = require('./_baseFunctions'), keys = require('./keys'); /** diff --git a/functionsIn.js b/functionsIn.js index db4b81140..b48e5a65b 100644 --- a/functionsIn.js +++ b/functionsIn.js @@ -1,4 +1,4 @@ -var baseFunctions = require('./internal/baseFunctions'), +var baseFunctions = require('./_baseFunctions'), keysIn = require('./keysIn'); /** diff --git a/get.js b/get.js index 342cd49be..755fa05ae 100644 --- a/get.js +++ b/get.js @@ -1,4 +1,4 @@ -var baseGet = require('./internal/baseGet'); +var baseGet = require('./_baseGet'); /** * Gets the value at `path` of `object`. If the resolved value is diff --git a/groupBy.js b/groupBy.js index b8325ec93..f3c9b7ef8 100644 --- a/groupBy.js +++ b/groupBy.js @@ -1,4 +1,4 @@ -var createAggregator = require('./internal/createAggregator'); +var createAggregator = require('./_createAggregator'); /** Used for built-in method references. */ var objectProto = global.Object.prototype; diff --git a/has.js b/has.js index 3dc1d92a7..d66d2de02 100644 --- a/has.js +++ b/has.js @@ -1,5 +1,5 @@ -var baseHas = require('./internal/baseHas'), - hasPath = require('./internal/hasPath'); +var baseHas = require('./_baseHas'), + hasPath = require('./_hasPath'); /** * Checks if `path` is a direct property of `object`. diff --git a/hasIn.js b/hasIn.js index d4f6cb326..7da6b7dcd 100644 --- a/hasIn.js +++ b/hasIn.js @@ -1,5 +1,5 @@ -var baseHasIn = require('./internal/baseHasIn'), - hasPath = require('./internal/hasPath'); +var baseHasIn = require('./_baseHasIn'), + hasPath = require('./_hasPath'); /** * Checks if `path` is a direct or inherited property of `object`. diff --git a/inRange.js b/inRange.js index 2480acb4c..69c61101c 100644 --- a/inRange.js +++ b/inRange.js @@ -1,4 +1,4 @@ -var baseInRange = require('./internal/baseInRange'), +var baseInRange = require('./_baseInRange'), toNumber = require('./toNumber'); /** diff --git a/includes.js b/includes.js index c0d0227c9..01d684454 100644 --- a/includes.js +++ b/includes.js @@ -1,4 +1,4 @@ -var baseIndexOf = require('./internal/baseIndexOf'), +var baseIndexOf = require('./_baseIndexOf'), isArrayLike = require('./isArrayLike'), isString = require('./isString'), toInteger = require('./toInteger'), diff --git a/index.js b/index.js index 7fc6a243a..5d063e21f 100644 --- a/index.js +++ b/index.js @@ -1 +1 @@ -module.exports = require('./lodash.js'); \ No newline at end of file +module.exports = require('./lodash'); \ No newline at end of file diff --git a/indexOf.js b/indexOf.js index bb5fbd218..e20637a4f 100644 --- a/indexOf.js +++ b/indexOf.js @@ -1,4 +1,4 @@ -var baseIndexOf = require('./internal/baseIndexOf'), +var baseIndexOf = require('./_baseIndexOf'), toInteger = require('./toInteger'); /* Built-in method references for those with the same name as other `lodash` methods. */ diff --git a/internal/createAggregator.js b/internal/createAggregator.js deleted file mode 100644 index 3a0309167..000000000 --- a/internal/createAggregator.js +++ /dev/null @@ -1,35 +0,0 @@ -var baseEach = require('./baseEach'), - baseIteratee = require('./baseIteratee'), - isArray = require('../isArray'); - -/** - * Creates a function like `_.groupBy`. - * - * @private - * @param {Function} setter The function to set keys and values of the accumulator object. - * @param {Function} [initializer] The function to initialize the accumulator object. - * @returns {Function} Returns the new aggregator function. - */ -function createAggregator(setter, initializer) { - return function(collection, iteratee) { - var result = initializer ? initializer() : {}; - iteratee = baseIteratee(iteratee); - - if (isArray(collection)) { - var index = -1, - length = collection.length; - - while (++index < length) { - var value = collection[index]; - setter(result, value, iteratee(value), collection); - } - } else { - baseEach(collection, function(value, key, collection) { - setter(result, value, iteratee(value), collection); - }); - } - return result; - }; -} - -module.exports = createAggregator; diff --git a/intersection.js b/intersection.js index 6a33fcf41..8e1b8c35d 100644 --- a/intersection.js +++ b/intersection.js @@ -1,7 +1,7 @@ -var arrayMap = require('./internal/arrayMap'), - baseIntersection = require('./internal/baseIntersection'), +var arrayMap = require('./_arrayMap'), + baseIntersection = require('./_baseIntersection'), rest = require('./rest'), - toArrayLikeObject = require('./internal/toArrayLikeObject'); + toArrayLikeObject = require('./_toArrayLikeObject'); /** * Creates an array of unique values that are included in all of the provided diff --git a/intersectionBy.js b/intersectionBy.js index 9b2bc4b14..a8b38e750 100644 --- a/intersectionBy.js +++ b/intersectionBy.js @@ -1,9 +1,9 @@ -var arrayMap = require('./internal/arrayMap'), - baseIntersection = require('./internal/baseIntersection'), - baseIteratee = require('./internal/baseIteratee'), +var arrayMap = require('./_arrayMap'), + baseIntersection = require('./_baseIntersection'), + baseIteratee = require('./_baseIteratee'), last = require('./last'), rest = require('./rest'), - toArrayLikeObject = require('./internal/toArrayLikeObject'); + toArrayLikeObject = require('./_toArrayLikeObject'); /** * This method is like `_.intersection` except that it accepts `iteratee` diff --git a/intersectionWith.js b/intersectionWith.js index e6cbe6360..c39e38f53 100644 --- a/intersectionWith.js +++ b/intersectionWith.js @@ -1,8 +1,8 @@ -var arrayMap = require('./internal/arrayMap'), - baseIntersection = require('./internal/baseIntersection'), +var arrayMap = require('./_arrayMap'), + baseIntersection = require('./_baseIntersection'), last = require('./last'), rest = require('./rest'), - toArrayLikeObject = require('./internal/toArrayLikeObject'); + toArrayLikeObject = require('./_toArrayLikeObject'); /** * This method is like `_.intersection` except that it accepts `comparator` diff --git a/invert.js b/invert.js index 8c7a42934..11628b14e 100644 --- a/invert.js +++ b/invert.js @@ -1,23 +1,16 @@ -var arrayReduce = require('./internal/arrayReduce'), - keys = require('./keys'); - -/** Used for built-in method references. */ -var objectProto = global.Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +var constant = require('./constant'), + createInverter = require('./_createInverter'), + identity = require('./identity'); /** * Creates an object composed of the inverted keys and values of `object`. * If `object` contains duplicate values, subsequent values overwrite property - * assignments of previous values unless `multiVal` is `true`. + * assignments of previous values. * * @static * @memberOf _ * @category Object * @param {Object} object The object to invert. - * @param {boolean} [multiVal] Allow multiple values per key. - * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`. * @returns {Object} Returns the new inverted object. * @example * @@ -25,26 +18,9 @@ var hasOwnProperty = objectProto.hasOwnProperty; * * _.invert(object); * // => { '1': 'c', '2': 'b' } - * - * // with `multiVal` - * _.invert(object, true); - * // => { '1': ['a', 'c'], '2': ['b'] } */ -function invert(object, multiVal, guard) { - return arrayReduce(keys(object), function(result, key) { - var value = object[key]; - if (multiVal && !guard) { - if (hasOwnProperty.call(result, value)) { - result[value].push(key); - } else { - result[value] = [key]; - } - } - else { - result[value] = key; - } - return result; - }, {}); -} +var invert = createInverter(function(result, value, key) { + result[value] = key; +}, constant(identity)); module.exports = invert; diff --git a/invertBy.js b/invertBy.js new file mode 100644 index 000000000..6206f708c --- /dev/null +++ b/invertBy.js @@ -0,0 +1,43 @@ +var baseIteratee = require('./_baseIteratee'), + createInverter = require('./_createInverter'); + +/** Used for built-in method references. */ +var objectProto = global.Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` through `iteratee`. + * The corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to invert. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ +var invertBy = createInverter(function(result, value, key) { + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } +}, baseIteratee); + +module.exports = invertBy; diff --git a/invoke.js b/invoke.js index a3ced9891..f090a7236 100644 --- a/invoke.js +++ b/invoke.js @@ -1,4 +1,4 @@ -var baseInvoke = require('./internal/baseInvoke'), +var baseInvoke = require('./_baseInvoke'), rest = require('./rest'); /** diff --git a/invokeMap.js b/invokeMap.js index 07d7dd3cc..42c8fbe14 100644 --- a/invokeMap.js +++ b/invokeMap.js @@ -1,8 +1,8 @@ -var apply = require('./internal/apply'), - baseEach = require('./internal/baseEach'), - baseInvoke = require('./internal/baseInvoke'), +var apply = require('./_apply'), + baseEach = require('./_baseEach'), + baseInvoke = require('./_baseInvoke'), isArrayLike = require('./isArrayLike'), - isKey = require('./internal/isKey'), + isKey = require('./_isKey'), rest = require('./rest'); /** diff --git a/isArrayLike.js b/isArrayLike.js index bcfcfccc4..9f4ddd51b 100644 --- a/isArrayLike.js +++ b/isArrayLike.js @@ -1,4 +1,4 @@ -var getLength = require('./internal/getLength'), +var getLength = require('./_getLength'), isFunction = require('./isFunction'), isLength = require('./isLength'); diff --git a/isEmpty.js b/isEmpty.js index dd7e0ce17..32abeaf83 100644 --- a/isEmpty.js +++ b/isEmpty.js @@ -1,7 +1,14 @@ -var isFunction = require('./isFunction'), - isObjectLike = require('./isObjectLike'), - keys = require('./keys'), - size = require('./size'); +var isArguments = require('./isArguments'), + isArray = require('./isArray'), + isArrayLike = require('./isArrayLike'), + isFunction = require('./isFunction'), + isString = require('./isString'); + +/** Used for built-in method references. */ +var objectProto = global.Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** * Checks if `value` is empty. A value is considered empty unless it's an @@ -31,9 +38,16 @@ var isFunction = require('./isFunction'), * // => false */ function isEmpty(value) { - return (!isObjectLike(value) || isFunction(value.splice)) - ? !size(value) - : !keys(value).length; + if (isArrayLike(value) && + (isArray(value) || isString(value) || isFunction(value.splice) || isArguments(value))) { + return !value.length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; } module.exports = isEmpty; diff --git a/isEqual.js b/isEqual.js index 475582be4..43a3a2b56 100644 --- a/isEqual.js +++ b/isEqual.js @@ -1,4 +1,4 @@ -var baseIsEqual = require('./internal/baseIsEqual'); +var baseIsEqual = require('./_baseIsEqual'); /** * Performs a deep comparison between two values to determine if they are diff --git a/isEqualWith.js b/isEqualWith.js index 3262db9f6..60fe95d9e 100644 --- a/isEqualWith.js +++ b/isEqualWith.js @@ -1,4 +1,4 @@ -var baseIsEqual = require('./internal/baseIsEqual'); +var baseIsEqual = require('./_baseIsEqual'); /** * This method is like `_.isEqual` except that it accepts `customizer` which is diff --git a/isMatch.js b/isMatch.js index d9bf84642..a14131fef 100644 --- a/isMatch.js +++ b/isMatch.js @@ -1,5 +1,5 @@ -var baseIsMatch = require('./internal/baseIsMatch'), - getMatchData = require('./internal/getMatchData'); +var baseIsMatch = require('./_baseIsMatch'), + getMatchData = require('./_getMatchData'); /** * Performs a deep comparison between `object` and `source` to determine if diff --git a/isMatchWith.js b/isMatchWith.js index 7b1345ae7..2460eb35e 100644 --- a/isMatchWith.js +++ b/isMatchWith.js @@ -1,5 +1,5 @@ -var baseIsMatch = require('./internal/baseIsMatch'), - getMatchData = require('./internal/getMatchData'); +var baseIsMatch = require('./_baseIsMatch'), + getMatchData = require('./_getMatchData'); /** * This method is like `_.isMatch` except that it accepts `customizer` which diff --git a/isNative.js b/isNative.js index 9307b444b..1422779b7 100644 --- a/isNative.js +++ b/isNative.js @@ -1,5 +1,5 @@ var isFunction = require('./isFunction'), - isHostObject = require('./internal/isHostObject'), + isHostObject = require('./_isHostObject'), isObjectLike = require('./isObjectLike'); /** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */ diff --git a/isObject.js b/isObject.js index c87108066..41993db21 100644 --- a/isObject.js +++ b/isObject.js @@ -22,8 +22,6 @@ * // => false */ function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. var type = typeof value; return !!value && (type == 'object' || type == 'function'); } diff --git a/isPlainObject.js b/isPlainObject.js index 979b17429..81f8b59ae 100644 --- a/isPlainObject.js +++ b/isPlainObject.js @@ -1,4 +1,4 @@ -var isHostObject = require('./internal/isHostObject'), +var isHostObject = require('./_isHostObject'), isObjectLike = require('./isObjectLike'); /** `Object#toString` result references. */ diff --git a/iteratee.js b/iteratee.js index cc3009808..2cad2ede9 100644 --- a/iteratee.js +++ b/iteratee.js @@ -1,4 +1,4 @@ -var baseIteratee = require('./internal/baseIteratee'), +var baseIteratee = require('./_baseIteratee'), isArray = require('./isArray'), isObjectLike = require('./isObjectLike'), matches = require('./matches'); diff --git a/kebabCase.js b/kebabCase.js index d3c8fccb1..f29124fb2 100644 --- a/kebabCase.js +++ b/kebabCase.js @@ -1,4 +1,4 @@ -var createCompounder = require('./internal/createCompounder'); +var createCompounder = require('./_createCompounder'); /** * Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). diff --git a/keyBy.js b/keyBy.js index 8a4bac5b3..febc86b4b 100644 --- a/keyBy.js +++ b/keyBy.js @@ -1,4 +1,4 @@ -var createAggregator = require('./internal/createAggregator'); +var createAggregator = require('./_createAggregator'); /** * Creates an object composed of keys generated from the results of running @@ -14,17 +14,17 @@ var createAggregator = require('./internal/createAggregator'); * @returns {Object} Returns the composed aggregate object. * @example * - * var keyData = [ + * var array = [ * { 'dir': 'left', 'code': 97 }, * { 'dir': 'right', 'code': 100 } * ]; * - * _.keyBy(keyData, function(o) { + * _.keyBy(array, function(o) { * return String.fromCharCode(o.code); * }); * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } * - * _.keyBy(keyData, 'dir'); + * _.keyBy(array, 'dir'); * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } */ var keyBy = createAggregator(function(result, value, key) { diff --git a/keys.js b/keys.js index 4bad147fa..eac239f5c 100644 --- a/keys.js +++ b/keys.js @@ -1,9 +1,9 @@ -var baseHas = require('./internal/baseHas'), - baseKeys = require('./internal/baseKeys'), - indexKeys = require('./internal/indexKeys'), +var baseHas = require('./_baseHas'), + baseKeys = require('./_baseKeys'), + indexKeys = require('./_indexKeys'), isArrayLike = require('./isArrayLike'), - isIndex = require('./internal/isIndex'), - isPrototype = require('./internal/isPrototype'); + isIndex = require('./_isIndex'), + isPrototype = require('./_isPrototype'); /** * Creates an array of the own enumerable property names of `object`. diff --git a/keysIn.js b/keysIn.js index 516e9cf8d..ca2d3b572 100644 --- a/keysIn.js +++ b/keysIn.js @@ -1,7 +1,7 @@ -var baseKeysIn = require('./internal/baseKeysIn'), - indexKeys = require('./internal/indexKeys'), - isIndex = require('./internal/isIndex'), - isPrototype = require('./internal/isPrototype'); +var baseKeysIn = require('./_baseKeysIn'), + indexKeys = require('./_indexKeys'), + isIndex = require('./_isIndex'), + isPrototype = require('./_isPrototype'); /** Used for built-in method references. */ var objectProto = global.Object.prototype; diff --git a/lastIndexOf.js b/lastIndexOf.js index a7f019fe0..6ce7227f8 100644 --- a/lastIndexOf.js +++ b/lastIndexOf.js @@ -1,4 +1,4 @@ -var indexOfNaN = require('./internal/indexOfNaN'), +var indexOfNaN = require('./_indexOfNaN'), toInteger = require('./toInteger'); /* Built-in method references for those with the same name as other `lodash` methods. */ diff --git a/lodash.js b/lodash.js index 95aef7960..14beccfca 100644 --- a/lodash.js +++ b/lodash.js @@ -1,7 +1,7 @@ /** * @license - * lodash 4.0.1 (Custom Build) - * Build: `lodash -d -o ./lodash.js` + * lodash 4.1.0 (Custom Build) + * Build: `lodash -d -o ./foo/lodash.js` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors @@ -13,7 +13,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.0.1'; + var VERSION = '4.1.0'; /** Used to compose bitmasks for wrapper metadata. */ var BIND_FLAG = 1, @@ -411,6 +411,27 @@ return func.apply(thisArg, args); } + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + /** * Creates a new array concatenating `array` with `other`. * @@ -820,7 +841,7 @@ result = result === undefined ? current : (result + current); } } - return result; + return length ? result : 0; } /** @@ -1378,20 +1399,21 @@ * `differenceBy`, `differenceWith`, `drop`, `dropRight`, `dropRightWhile`, * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flip`, `flow`, * `flowRight`, `fromPairs`, `functions`, `functionsIn`, `groupBy`, `initial`, - * `intersection`, `intersectionBy`, `intersectionWith`, `invert`, `invokeMap`, - * `iteratee`, `keyBy`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, - * `matches`, `matchesProperty`, `memoize`, `merge`, `mergeWith`, `method`, - * `methodOf`, `mixin`, `negate`, `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, - * `over`, `overArgs`, `overEvery`, `overSome`, `partial`, `partialRight`, - * `partition`, `pick`, `pickBy`, `plant`, `property`, `propertyOf`, `pull`, - * `pullAll`, `pullAllBy`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, - * `reject`, `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, - * `shuffle`, `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, - * `takeRight`, `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, - * `toArray`, `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, - * `unary`, `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, - * `unset`, `unshift`, `unzip`, `unzipWith`, `values`, `valuesIn`, `without`, - * `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, `zipObject`, and `zipWith` + * `intersection`, `intersectionBy`, `intersectionWith`, `invert`, `invertBy`, + * `invokeMap`, `iteratee`, `keyBy`, `keys`, `keysIn`, `map`, `mapKeys`, + * `mapValues`, `matches`, `matchesProperty`, `memoize`, `merge`, `mergeWith`, + * `method`, `methodOf`, `mixin`, `negate`, `nthArg`, `omit`, `omitBy`, `once`, + * `orderBy`, `over`, `overArgs`, `overEvery`, `overSome`, `partial`, + * `partialRight`, `partition`, `pick`, `pickBy`, `plant`, `property`, + * `propertyOf`, `pull`, `pullAll`, `pullAllBy`, `pullAt`, `push`, `range`, + * `rangeRight`, `rearg`, `reject`, `remove`, `rest`, `reverse`, `sampleSize`, + * `set`, `setWith`, `shuffle`, `slice`, `sort`, `sortBy`, `splice`, `spread`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `tap`, `throttle`, + * `thru`, `toArray`, `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, + * `transform`, `unary`, `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, + * `uniqWith`, `unset`, `unshift`, `unzip`, `unzipWith`, `values`, `valuesIn`, + * `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, `zipObject`, + * `zipObjectDeep`, and `zipWith` * * The wrapper methods that are **not** chainable by default are: * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, @@ -2123,6 +2145,24 @@ } } + /** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; + } + /** * The base implementation of `_.assign` without support for multiple sources * or `customizer` functions. @@ -2669,6 +2709,24 @@ return result; } + /** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; + } + /** * The base implementation of `_.invoke` without support for individual * method arguments. @@ -2999,7 +3057,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { var objValue = object[key], srcValue = source[key], - stacked = stack.get(srcValue) || stack.get(objValue); + stacked = stack.get(srcValue); if (stacked) { assignMergeValue(object, key, stacked); @@ -3018,6 +3076,7 @@ newValue = copyArray(objValue); } else { + isCommon = false; newValue = baseClone(srcValue); } } @@ -3026,6 +3085,7 @@ newValue = toPlainObject(objValue); } else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + isCommon = false; newValue = baseClone(srcValue); } else { @@ -3626,6 +3686,27 @@ return (result && result.length) ? baseUniq(result, iteratee, comparator) : []; } + /** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property names. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ + function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + assignFunc(result, props[index], index < valsLength ? values[index] : undefined); + } + return result; + } + /** * Creates a clone of `buffer`. * @@ -3843,29 +3924,16 @@ * Creates a function like `_.groupBy`. * * @private - * @param {Function} setter The function to set keys and values of the accumulator object. - * @param {Function} [initializer] The function to initialize the accumulator object. + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. * @returns {Function} Returns the new aggregator function. */ function createAggregator(setter, initializer) { return function(collection, iteratee) { - var result = initializer ? initializer() : {}; - iteratee = getIteratee(iteratee); + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; - if (isArray(collection)) { - var index = -1, - length = collection.length; - - while (++index < length) { - var value = collection[index]; - setter(result, value, iteratee(value), collection); - } - } else { - baseEach(collection, function(value, key, collection) { - setter(result, value, iteratee(value), collection); - }); - } - return result; + return func(collection, setter, getIteratee(iteratee), accumulator); }; } @@ -4198,6 +4266,20 @@ return wrapper; } + /** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ + function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } + /** * Creates a function like `_.over`. * @@ -4840,8 +4922,11 @@ result = hasFunc(object, path); } } - return result || (isLength(object && object.length) && isIndex(path, object.length) && - (isArray(object) || isString(object) || isArguments(object))); + var length = object ? object.length : undefined; + return result || ( + !!length && isLength(length) && isIndex(path, length) && + (isArray(object) || isString(object) || isArguments(object)) + ); } /** @@ -4871,6 +4956,9 @@ * @returns {Object} Returns the initialized clone. */ function initCloneObject(object) { + if (isPrototype(object)) { + return {}; + } var Ctor = object.constructor; return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined); } @@ -4930,9 +5018,11 @@ */ function indexKeys(object) { var length = object ? object.length : undefined; - return (isLength(length) && (isArray(object) || isString(object) || isArguments(object))) - ? baseTimes(length, String) - : null; + if (isLength(length) && + (isArray(object) || isString(object) || isArguments(object))) { + return baseTimes(length, String); + } + return null; } /** @@ -6908,19 +6998,29 @@ * @returns {Object} Returns the new object. * @example * - * _.zipObject(['fred', 'barney'], [30, 40]); - * // => { 'fred': 30, 'barney': 40 } + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } */ function zipObject(props, values) { - var index = -1, - length = props ? props.length : 0, - valsLength = values ? values.length : 0, - result = {}; + return baseZipObject(props || [], values || [], assignValue); + } - while (++index < length) { - baseSet(result, props[index], index < valsLength ? values[index] : undefined); - } - return result; + /** + * This method is like `_.zipObject` except that it supports property paths. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} [props=[]] The property names. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + */ + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); } /** @@ -7651,17 +7751,17 @@ * @returns {Object} Returns the composed aggregate object. * @example * - * var keyData = [ + * var array = [ * { 'dir': 'left', 'code': 97 }, * { 'dir': 'right', 'code': 100 } * ]; * - * _.keyBy(keyData, function(o) { + * _.keyBy(array, function(o) { * return String.fromCharCode(o.code); * }); * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } * - * _.keyBy(keyData, 'dir'); + * _.keyBy(array, 'dir'); * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } */ var keyBy = createAggregator(function(result, value, key) { @@ -7820,7 +7920,7 @@ * * _.reduce([1, 2], function(sum, n) { * return sum + n; - * }); + * }, 0); * // => 3 * * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { @@ -9458,9 +9558,16 @@ * // => false */ function isEmpty(value) { - return (!isObjectLike(value) || isFunction(value.splice)) - ? !size(value) - : !keys(value).length; + if (isArrayLike(value) && + (isArray(value) || isString(value) || isFunction(value.splice) || isArguments(value))) { + return !value.length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; } /** @@ -9685,8 +9792,6 @@ * // => false */ function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. var type = typeof value; return !!value && (type == 'object' || type == 'function'); } @@ -10932,14 +11037,12 @@ /** * Creates an object composed of the inverted keys and values of `object`. * If `object` contains duplicate values, subsequent values overwrite property - * assignments of previous values unless `multiVal` is `true`. + * assignments of previous values. * * @static * @memberOf _ * @category Object * @param {Object} object The object to invert. - * @param {boolean} [multiVal] Allow multiple values per key. - * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`. * @returns {Object} Returns the new inverted object. * @example * @@ -10947,27 +11050,43 @@ * * _.invert(object); * // => { '1': 'c', '2': 'b' } - * - * // with `multiVal` - * _.invert(object, true); - * // => { '1': ['a', 'c'], '2': ['b'] } */ - function invert(object, multiVal, guard) { - return arrayReduce(keys(object), function(result, key) { - var value = object[key]; - if (multiVal && !guard) { - if (hasOwnProperty.call(result, value)) { - result[value].push(key); - } else { - result[value] = [key]; - } - } - else { - result[value] = key; - } - return result; - }, {}); - } + var invert = createInverter(function(result, value, key) { + result[value] = key; + }, constant(identity)); + + /** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` through `iteratee`. + * The corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to invert. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ + var invertBy = createInverter(function(result, value, key) { + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + }, getIteratee); /** * Invokes the method at `path` of `object`. @@ -11468,12 +11587,12 @@ * _.transform([2, 3, 4], function(result, n) { * result.push(n *= n); * return n % 2 == 0; - * }); + * }, []); * // => [4, 9] * * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { * (result[value] || (result[value] = [])).push(key); - * }); + * }, {}); * // => { '1': ['a', 'c'], '2': ['b'] } */ function transform(object, iteratee, accumulator) { @@ -13811,7 +13930,7 @@ function sum(array) { return (array && array.length) ? baseSum(array, identity) - : undefined; + : 0; } /** @@ -13839,7 +13958,7 @@ function sumBy(array, iteratee) { return (array && array.length) ? baseSum(array, getIteratee(iteratee)) - : undefined; + : 0; } /*------------------------------------------------------------------------*/ @@ -13928,6 +14047,7 @@ lodash.intersectionBy = intersectionBy; lodash.intersectionWith = intersectionWith; lodash.invert = invert; + lodash.invertBy = invertBy; lodash.invokeMap = invokeMap; lodash.iteratee = iteratee; lodash.keyBy = keyBy; @@ -14016,6 +14136,7 @@ lodash.xorWith = xorWith; lodash.zip = zip; lodash.zipObject = zipObject; + lodash.zipObjectDeep = zipObjectDeep; lodash.zipWith = zipWith; // Add aliases. diff --git a/lowerCase.js b/lowerCase.js index 31c142d5a..4222dcbad 100644 --- a/lowerCase.js +++ b/lowerCase.js @@ -1,4 +1,4 @@ -var createCompounder = require('./internal/createCompounder'); +var createCompounder = require('./_createCompounder'); /** * Converts `string`, as space separated words, to lower case. diff --git a/lowerFirst.js b/lowerFirst.js index 742947200..884ec2dec 100644 --- a/lowerFirst.js +++ b/lowerFirst.js @@ -1,4 +1,4 @@ -var createCaseFirst = require('./internal/createCaseFirst'); +var createCaseFirst = require('./_createCaseFirst'); /** * Converts the first character of `string` to lower case. diff --git a/map.js b/map.js index 31da57788..d41ef7041 100644 --- a/map.js +++ b/map.js @@ -1,6 +1,6 @@ -var arrayMap = require('./internal/arrayMap'), - baseIteratee = require('./internal/baseIteratee'), - baseMap = require('./internal/baseMap'), +var arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), + baseMap = require('./_baseMap'), isArray = require('./isArray'); /** diff --git a/mapKeys.js b/mapKeys.js index 608fdf704..aa3899fa5 100644 --- a/mapKeys.js +++ b/mapKeys.js @@ -1,5 +1,5 @@ -var baseForOwn = require('./internal/baseForOwn'), - baseIteratee = require('./internal/baseIteratee'); +var baseForOwn = require('./_baseForOwn'), + baseIteratee = require('./_baseIteratee'); /** * The opposite of `_.mapValues`; this method creates an object with the diff --git a/mapValues.js b/mapValues.js index 38ce272b7..b79dc7e56 100644 --- a/mapValues.js +++ b/mapValues.js @@ -1,5 +1,5 @@ -var baseForOwn = require('./internal/baseForOwn'), - baseIteratee = require('./internal/baseIteratee'); +var baseForOwn = require('./_baseForOwn'), + baseIteratee = require('./_baseIteratee'); /** * Creates an object with the same keys as `object` and values generated by diff --git a/matches.js b/matches.js index c69307fd3..5a2926ae5 100644 --- a/matches.js +++ b/matches.js @@ -1,5 +1,5 @@ -var baseClone = require('./internal/baseClone'), - baseMatches = require('./internal/baseMatches'); +var baseClone = require('./_baseClone'), + baseMatches = require('./_baseMatches'); /** * Creates a function that performs a deep partial comparison between a given diff --git a/matchesProperty.js b/matchesProperty.js index b9043ae20..d4356fb95 100644 --- a/matchesProperty.js +++ b/matchesProperty.js @@ -1,5 +1,5 @@ -var baseClone = require('./internal/baseClone'), - baseMatchesProperty = require('./internal/baseMatchesProperty'); +var baseClone = require('./_baseClone'), + baseMatchesProperty = require('./_baseMatchesProperty'); /** * Creates a function that performs a deep partial comparison between the diff --git a/max.js b/max.js index d9873ed7f..124b33127 100644 --- a/max.js +++ b/max.js @@ -1,4 +1,4 @@ -var baseExtremum = require('./internal/baseExtremum'), +var baseExtremum = require('./_baseExtremum'), gt = require('./gt'), identity = require('./identity'); diff --git a/maxBy.js b/maxBy.js index b5170ef30..b120030b9 100644 --- a/maxBy.js +++ b/maxBy.js @@ -1,5 +1,5 @@ -var baseExtremum = require('./internal/baseExtremum'), - baseIteratee = require('./internal/baseIteratee'), +var baseExtremum = require('./_baseExtremum'), + baseIteratee = require('./_baseIteratee'), gt = require('./gt'); /** diff --git a/memoize.js b/memoize.js index dd164edda..0c146f1e2 100644 --- a/memoize.js +++ b/memoize.js @@ -1,4 +1,4 @@ -var MapCache = require('./internal/MapCache'); +var MapCache = require('./_MapCache'); /** Used as the `TypeError` message for "Functions" methods. */ var FUNC_ERROR_TEXT = 'Expected a function'; diff --git a/merge.js b/merge.js index d22d9daeb..07625956a 100644 --- a/merge.js +++ b/merge.js @@ -1,5 +1,5 @@ -var baseMerge = require('./internal/baseMerge'), - createAssigner = require('./internal/createAssigner'); +var baseMerge = require('./_baseMerge'), + createAssigner = require('./_createAssigner'); /** * Recursively merges own and inherited enumerable properties of source diff --git a/mergeWith.js b/mergeWith.js index 2555741c6..27ea39a7b 100644 --- a/mergeWith.js +++ b/mergeWith.js @@ -1,5 +1,5 @@ -var baseMerge = require('./internal/baseMerge'), - createAssigner = require('./internal/createAssigner'); +var baseMerge = require('./_baseMerge'), + createAssigner = require('./_createAssigner'); /** * This method is like `_.merge` except that it accepts `customizer` which diff --git a/method.js b/method.js index 88a88d659..0095361b6 100644 --- a/method.js +++ b/method.js @@ -1,4 +1,4 @@ -var baseInvoke = require('./internal/baseInvoke'), +var baseInvoke = require('./_baseInvoke'), rest = require('./rest'); /** diff --git a/methodOf.js b/methodOf.js index 03202b166..8601ebaac 100644 --- a/methodOf.js +++ b/methodOf.js @@ -1,4 +1,4 @@ -var baseInvoke = require('./internal/baseInvoke'), +var baseInvoke = require('./_baseInvoke'), rest = require('./rest'); /** diff --git a/min.js b/min.js index 12da3e582..77dde9803 100644 --- a/min.js +++ b/min.js @@ -1,4 +1,4 @@ -var baseExtremum = require('./internal/baseExtremum'), +var baseExtremum = require('./_baseExtremum'), identity = require('./identity'), lt = require('./lt'); diff --git a/minBy.js b/minBy.js index cb90acec5..a8122e0bc 100644 --- a/minBy.js +++ b/minBy.js @@ -1,5 +1,5 @@ -var baseExtremum = require('./internal/baseExtremum'), - baseIteratee = require('./internal/baseIteratee'), +var baseExtremum = require('./_baseExtremum'), + baseIteratee = require('./_baseIteratee'), lt = require('./lt'); /** diff --git a/mixin.js b/mixin.js index 1e3c03603..02e2b6c27 100644 --- a/mixin.js +++ b/mixin.js @@ -1,7 +1,7 @@ -var arrayEach = require('./internal/arrayEach'), - arrayPush = require('./internal/arrayPush'), - baseFunctions = require('./internal/baseFunctions'), - copyArray = require('./internal/copyArray'), +var arrayEach = require('./_arrayEach'), + arrayPush = require('./_arrayPush'), + baseFunctions = require('./_baseFunctions'), + copyArray = require('./_copyArray'), isFunction = require('./isFunction'), isObject = require('./isObject'), keys = require('./keys'); diff --git a/object.js b/object.js index 6bd7cf071..aab1e8286 100644 --- a/object.js +++ b/object.js @@ -20,6 +20,7 @@ module.exports = { 'has': require('./has'), 'hasIn': require('./hasIn'), 'invert': require('./invert'), + 'invertBy': require('./invertBy'), 'invoke': require('./invoke'), 'keys': require('./keys'), 'keysIn': require('./keysIn'), diff --git a/omit.js b/omit.js index a6da3c1c0..dd3c70dc6 100644 --- a/omit.js +++ b/omit.js @@ -1,7 +1,7 @@ -var arrayMap = require('./internal/arrayMap'), - baseDifference = require('./internal/baseDifference'), - baseFlatten = require('./internal/baseFlatten'), - basePick = require('./internal/basePick'), +var arrayMap = require('./_arrayMap'), + baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + basePick = require('./_basePick'), keysIn = require('./keysIn'), rest = require('./rest'); diff --git a/omitBy.js b/omitBy.js index 1230d0149..d7d045354 100644 --- a/omitBy.js +++ b/omitBy.js @@ -1,5 +1,5 @@ -var baseIteratee = require('./internal/baseIteratee'), - basePickBy = require('./internal/basePickBy'); +var baseIteratee = require('./_baseIteratee'), + basePickBy = require('./_basePickBy'); /** * The opposite of `_.pickBy`; this method creates an object composed of the diff --git a/orderBy.js b/orderBy.js index c3cc84e0f..c027d85a1 100644 --- a/orderBy.js +++ b/orderBy.js @@ -1,4 +1,4 @@ -var baseOrderBy = require('./internal/baseOrderBy'), +var baseOrderBy = require('./_baseOrderBy'), isArray = require('./isArray'); /** diff --git a/over.js b/over.js index d4863d0ba..e2a8f45f5 100644 --- a/over.js +++ b/over.js @@ -1,5 +1,5 @@ -var arrayMap = require('./internal/arrayMap'), - createOver = require('./internal/createOver'); +var arrayMap = require('./_arrayMap'), + createOver = require('./_createOver'); /** * Creates a function that invokes `iteratees` with the arguments provided diff --git a/overArgs.js b/overArgs.js index a94c4e258..0bb760fde 100644 --- a/overArgs.js +++ b/overArgs.js @@ -1,7 +1,7 @@ -var apply = require('./internal/apply'), - arrayMap = require('./internal/arrayMap'), - baseFlatten = require('./internal/baseFlatten'), - baseIteratee = require('./internal/baseIteratee'), +var apply = require('./_apply'), + arrayMap = require('./_arrayMap'), + baseFlatten = require('./_baseFlatten'), + baseIteratee = require('./_baseIteratee'), rest = require('./rest'); /* Built-in method references for those with the same name as other `lodash` methods. */ diff --git a/overEvery.js b/overEvery.js index 6c7958e5c..bad7a5a72 100644 --- a/overEvery.js +++ b/overEvery.js @@ -1,5 +1,5 @@ -var arrayEvery = require('./internal/arrayEvery'), - createOver = require('./internal/createOver'); +var arrayEvery = require('./_arrayEvery'), + createOver = require('./_createOver'); /** * Creates a function that checks if **all** of the `predicates` return diff --git a/overSome.js b/overSome.js index 76b40f443..fb0001b76 100644 --- a/overSome.js +++ b/overSome.js @@ -1,5 +1,5 @@ -var arraySome = require('./internal/arraySome'), - createOver = require('./internal/createOver'); +var arraySome = require('./_arraySome'), + createOver = require('./_createOver'); /** * Creates a function that checks if **any** of the `predicates` return diff --git a/package.json b/package.json index 24f2c988a..e4c99f2a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lodash", - "version": "4.0.1", + "version": "4.1.0", "description": "Lodash modular utilities.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/pad.js b/pad.js index 5df849698..aaebdb6d1 100644 --- a/pad.js +++ b/pad.js @@ -1,5 +1,5 @@ -var createPadding = require('./internal/createPadding'), - stringSize = require('./internal/stringSize'), +var createPadding = require('./_createPadding'), + stringSize = require('./_stringSize'), toInteger = require('./toInteger'), toString = require('./toString'); diff --git a/padEnd.js b/padEnd.js index 3f5f88f09..a7240fd53 100644 --- a/padEnd.js +++ b/padEnd.js @@ -1,4 +1,4 @@ -var createPadding = require('./internal/createPadding'), +var createPadding = require('./_createPadding'), toString = require('./toString'); /** diff --git a/padStart.js b/padStart.js index 9a31d00c0..52188b17e 100644 --- a/padStart.js +++ b/padStart.js @@ -1,4 +1,4 @@ -var createPadding = require('./internal/createPadding'), +var createPadding = require('./_createPadding'), toString = require('./toString'); /** diff --git a/partial.js b/partial.js index a35438370..b91cacdfe 100644 --- a/partial.js +++ b/partial.js @@ -1,5 +1,5 @@ -var createWrapper = require('./internal/createWrapper'), - replaceHolders = require('./internal/replaceHolders'), +var createWrapper = require('./_createWrapper'), + replaceHolders = require('./_replaceHolders'), rest = require('./rest'); /** Used to compose bitmasks for wrapper metadata. */ diff --git a/partialRight.js b/partialRight.js index 9bad85732..e00578322 100644 --- a/partialRight.js +++ b/partialRight.js @@ -1,5 +1,5 @@ -var createWrapper = require('./internal/createWrapper'), - replaceHolders = require('./internal/replaceHolders'), +var createWrapper = require('./_createWrapper'), + replaceHolders = require('./_replaceHolders'), rest = require('./rest'); /** Used to compose bitmasks for wrapper metadata. */ diff --git a/partition.js b/partition.js index f33f13b2c..19f33e3c5 100644 --- a/partition.js +++ b/partition.js @@ -1,4 +1,4 @@ -var createAggregator = require('./internal/createAggregator'); +var createAggregator = require('./_createAggregator'); /** * Creates an array of elements split into two groups, the first of which diff --git a/pick.js b/pick.js index c39ff4e74..44745755f 100644 --- a/pick.js +++ b/pick.js @@ -1,5 +1,5 @@ -var baseFlatten = require('./internal/baseFlatten'), - basePick = require('./internal/basePick'), +var baseFlatten = require('./_baseFlatten'), + basePick = require('./_basePick'), rest = require('./rest'); /** diff --git a/pickBy.js b/pickBy.js index 5289d8757..2961d8940 100644 --- a/pickBy.js +++ b/pickBy.js @@ -1,5 +1,5 @@ -var baseIteratee = require('./internal/baseIteratee'), - basePickBy = require('./internal/basePickBy'); +var baseIteratee = require('./_baseIteratee'), + basePickBy = require('./_basePickBy'); /** * Creates an object composed of the `object` properties `predicate` returns diff --git a/plant.js b/plant.js index b6d0f7cbc..d01b191ce 100644 --- a/plant.js +++ b/plant.js @@ -1,5 +1,5 @@ -var baseLodash = require('./internal/baseLodash'), - wrapperClone = require('./internal/wrapperClone'); +var baseLodash = require('./_baseLodash'), + wrapperClone = require('./_wrapperClone'); /** * Creates a clone of the chained sequence planting `value` as the wrapped value. diff --git a/property.js b/property.js index 4585cbe26..54e95eb6a 100644 --- a/property.js +++ b/property.js @@ -1,6 +1,6 @@ -var baseProperty = require('./internal/baseProperty'), - basePropertyDeep = require('./internal/basePropertyDeep'), - isKey = require('./internal/isKey'); +var baseProperty = require('./_baseProperty'), + basePropertyDeep = require('./_basePropertyDeep'), + isKey = require('./_isKey'); /** * Creates a function that returns the value at `path` of a given object. diff --git a/propertyOf.js b/propertyOf.js index 5a8a2864a..667430e72 100644 --- a/propertyOf.js +++ b/propertyOf.js @@ -1,4 +1,4 @@ -var baseGet = require('./internal/baseGet'); +var baseGet = require('./_baseGet'); /** * The opposite of `_.property`; this method creates a function that returns diff --git a/pullAll.js b/pullAll.js index cf4020170..4eecae613 100644 --- a/pullAll.js +++ b/pullAll.js @@ -1,4 +1,4 @@ -var basePullAll = require('./internal/basePullAll'); +var basePullAll = require('./_basePullAll'); /** * This method is like `_.pull` except that it accepts an array of values to remove. diff --git a/pullAllBy.js b/pullAllBy.js index b90d10dbc..36864e351 100644 --- a/pullAllBy.js +++ b/pullAllBy.js @@ -1,5 +1,5 @@ -var baseIteratee = require('./internal/baseIteratee'), - basePullAllBy = require('./internal/basePullAllBy'); +var baseIteratee = require('./_baseIteratee'), + basePullAllBy = require('./_basePullAllBy'); /** * This method is like `_.pullAll` except that it accepts `iteratee` which is diff --git a/pullAt.js b/pullAt.js index 467cefa56..5938c0566 100644 --- a/pullAt.js +++ b/pullAt.js @@ -1,8 +1,8 @@ -var arrayMap = require('./internal/arrayMap'), - baseAt = require('./internal/baseAt'), - baseFlatten = require('./internal/baseFlatten'), - basePullAt = require('./internal/basePullAt'), - compareAscending = require('./internal/compareAscending'), +var arrayMap = require('./_arrayMap'), + baseAt = require('./_baseAt'), + baseFlatten = require('./_baseFlatten'), + basePullAt = require('./_basePullAt'), + compareAscending = require('./_compareAscending'), rest = require('./rest'); /** diff --git a/random.js b/random.js index 0ddc03a1d..e98c2931a 100644 --- a/random.js +++ b/random.js @@ -1,5 +1,5 @@ -var baseRandom = require('./internal/baseRandom'), - isIterateeCall = require('./internal/isIterateeCall'), +var baseRandom = require('./_baseRandom'), + isIterateeCall = require('./_isIterateeCall'), toNumber = require('./toNumber'); /** Built-in method references without a dependency on `global`. */ diff --git a/range.js b/range.js index f6528304e..231c2bc1d 100644 --- a/range.js +++ b/range.js @@ -1,4 +1,4 @@ -var createRange = require('./internal/createRange'); +var createRange = require('./_createRange'); /** * Creates an array of numbers (positive and/or negative) progressing from diff --git a/rangeRight.js b/rangeRight.js index ea0824823..67c2fffa0 100644 --- a/rangeRight.js +++ b/rangeRight.js @@ -1,4 +1,4 @@ -var createRange = require('./internal/createRange'); +var createRange = require('./_createRange'); /** * This method is like `_.range` except that it populates values in diff --git a/rearg.js b/rearg.js index aa45c820c..1fc204afd 100644 --- a/rearg.js +++ b/rearg.js @@ -1,5 +1,5 @@ -var baseFlatten = require('./internal/baseFlatten'), - createWrapper = require('./internal/createWrapper'), +var baseFlatten = require('./_baseFlatten'), + createWrapper = require('./_createWrapper'), rest = require('./rest'); /** Used to compose bitmasks for wrapper metadata. */ diff --git a/reduce.js b/reduce.js index 0ae8064ff..3f99c43e3 100644 --- a/reduce.js +++ b/reduce.js @@ -1,7 +1,7 @@ -var arrayReduce = require('./internal/arrayReduce'), - baseEach = require('./internal/baseEach'), - baseIteratee = require('./internal/baseIteratee'), - baseReduce = require('./internal/baseReduce'), +var arrayReduce = require('./_arrayReduce'), + baseEach = require('./_baseEach'), + baseIteratee = require('./_baseIteratee'), + baseReduce = require('./_baseReduce'), isArray = require('./isArray'); /** @@ -30,7 +30,7 @@ var arrayReduce = require('./internal/arrayReduce'), * * _.reduce([1, 2], function(sum, n) { * return sum + n; - * }); + * }, 0); * // => 3 * * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { diff --git a/reduceRight.js b/reduceRight.js index 2864c5fda..af62c6c19 100644 --- a/reduceRight.js +++ b/reduceRight.js @@ -1,7 +1,7 @@ -var arrayReduceRight = require('./internal/arrayReduceRight'), - baseEachRight = require('./internal/baseEachRight'), - baseIteratee = require('./internal/baseIteratee'), - baseReduce = require('./internal/baseReduce'), +var arrayReduceRight = require('./_arrayReduceRight'), + baseEachRight = require('./_baseEachRight'), + baseIteratee = require('./_baseIteratee'), + baseReduce = require('./_baseReduce'), isArray = require('./isArray'); /** diff --git a/reject.js b/reject.js index 45aa76a01..32059a34f 100644 --- a/reject.js +++ b/reject.js @@ -1,6 +1,6 @@ -var arrayFilter = require('./internal/arrayFilter'), - baseFilter = require('./internal/baseFilter'), - baseIteratee = require('./internal/baseIteratee'), +var arrayFilter = require('./_arrayFilter'), + baseFilter = require('./_baseFilter'), + baseIteratee = require('./_baseIteratee'), isArray = require('./isArray'); /** diff --git a/remove.js b/remove.js index a48bec4f5..bf5139067 100644 --- a/remove.js +++ b/remove.js @@ -1,5 +1,5 @@ -var baseIteratee = require('./internal/baseIteratee'), - basePullAt = require('./internal/basePullAt'); +var baseIteratee = require('./_baseIteratee'), + basePullAt = require('./_basePullAt'); /** * Removes all elements from `array` that `predicate` returns truthy for diff --git a/rest.js b/rest.js index 317b58e29..40856aeee 100644 --- a/rest.js +++ b/rest.js @@ -1,4 +1,4 @@ -var apply = require('./internal/apply'), +var apply = require('./_apply'), toInteger = require('./toInteger'); /** Used as the `TypeError` message for "Functions" methods. */ diff --git a/result.js b/result.js index 55a2ddb36..99b7f1bac 100644 --- a/result.js +++ b/result.js @@ -1,8 +1,8 @@ -var baseToPath = require('./internal/baseToPath'), +var baseToPath = require('./_baseToPath'), get = require('./get'), isFunction = require('./isFunction'), - isKey = require('./internal/isKey'), - parent = require('./internal/parent'); + isKey = require('./_isKey'), + parent = require('./_parent'); /** * This method is like `_.get` except that if the resolved value is a function diff --git a/round.js b/round.js index ecb49f913..c5f1f85e6 100644 --- a/round.js +++ b/round.js @@ -1,4 +1,4 @@ -var createRound = require('./internal/createRound'); +var createRound = require('./_createRound'); /** * Computes `number` rounded to `precision`. diff --git a/sample.js b/sample.js index bd49b906d..1a4d81369 100644 --- a/sample.js +++ b/sample.js @@ -1,4 +1,4 @@ -var baseRandom = require('./internal/baseRandom'), +var baseRandom = require('./_baseRandom'), isArrayLike = require('./isArrayLike'), values = require('./values'); diff --git a/sampleSize.js b/sampleSize.js index 947a28dc1..47e7b116e 100644 --- a/sampleSize.js +++ b/sampleSize.js @@ -1,5 +1,5 @@ -var baseClamp = require('./internal/baseClamp'), - baseRandom = require('./internal/baseRandom'), +var baseClamp = require('./_baseClamp'), + baseRandom = require('./_baseRandom'), toArray = require('./toArray'), toInteger = require('./toInteger'); diff --git a/set.js b/set.js index 671615300..c0095a990 100644 --- a/set.js +++ b/set.js @@ -1,4 +1,4 @@ -var baseSet = require('./internal/baseSet'); +var baseSet = require('./_baseSet'); /** * Sets the value at `path` of `object`. If a portion of `path` doesn't exist diff --git a/setWith.js b/setWith.js index c57be25bd..2ce1f5e63 100644 --- a/setWith.js +++ b/setWith.js @@ -1,4 +1,4 @@ -var baseSet = require('./internal/baseSet'); +var baseSet = require('./_baseSet'); /** * This method is like `_.set` except that it accepts `customizer` which is diff --git a/size.js b/size.js index 574218c5a..fbe2b3b66 100644 --- a/size.js +++ b/size.js @@ -1,7 +1,7 @@ var isArrayLike = require('./isArrayLike'), isString = require('./isString'), keys = require('./keys'), - stringSize = require('./internal/stringSize'); + stringSize = require('./_stringSize'); /** * Gets the size of `collection` by returning its length for array-like diff --git a/slice.js b/slice.js index 678e7c79d..324b8391a 100644 --- a/slice.js +++ b/slice.js @@ -1,5 +1,5 @@ -var baseSlice = require('./internal/baseSlice'), - isIterateeCall = require('./internal/isIterateeCall'), +var baseSlice = require('./_baseSlice'), + isIterateeCall = require('./_isIterateeCall'), toInteger = require('./toInteger'); /** diff --git a/snakeCase.js b/snakeCase.js index b756c4ab8..5bfafdf04 100644 --- a/snakeCase.js +++ b/snakeCase.js @@ -1,4 +1,4 @@ -var createCompounder = require('./internal/createCompounder'); +var createCompounder = require('./_createCompounder'); /** * Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case). diff --git a/some.js b/some.js index 2cef119c6..a88d4fea2 100644 --- a/some.js +++ b/some.js @@ -1,8 +1,8 @@ -var arraySome = require('./internal/arraySome'), - baseIteratee = require('./internal/baseIteratee'), - baseSome = require('./internal/baseSome'), +var arraySome = require('./_arraySome'), + baseIteratee = require('./_baseIteratee'), + baseSome = require('./_baseSome'), isArray = require('./isArray'), - isIterateeCall = require('./internal/isIterateeCall'); + isIterateeCall = require('./_isIterateeCall'); /** * Checks if `predicate` returns truthy for **any** element of `collection`. diff --git a/sortBy.js b/sortBy.js index 3be029b20..96cbdb2c6 100644 --- a/sortBy.js +++ b/sortBy.js @@ -1,6 +1,6 @@ -var baseFlatten = require('./internal/baseFlatten'), - baseOrderBy = require('./internal/baseOrderBy'), - isIterateeCall = require('./internal/isIterateeCall'), +var baseFlatten = require('./_baseFlatten'), + baseOrderBy = require('./_baseOrderBy'), + isIterateeCall = require('./_isIterateeCall'), rest = require('./rest'); /** diff --git a/sortedIndex.js b/sortedIndex.js index ee8750c7f..bdb217d81 100644 --- a/sortedIndex.js +++ b/sortedIndex.js @@ -1,4 +1,4 @@ -var baseSortedIndex = require('./internal/baseSortedIndex'); +var baseSortedIndex = require('./_baseSortedIndex'); /** * Uses a binary search to determine the lowest index at which `value` should diff --git a/sortedIndexBy.js b/sortedIndexBy.js index 7cf03ada5..67e78ab5a 100644 --- a/sortedIndexBy.js +++ b/sortedIndexBy.js @@ -1,5 +1,5 @@ -var baseIteratee = require('./internal/baseIteratee'), - baseSortedIndexBy = require('./internal/baseSortedIndexBy'); +var baseIteratee = require('./_baseIteratee'), + baseSortedIndexBy = require('./_baseSortedIndexBy'); /** * This method is like `_.sortedIndex` except that it accepts `iteratee` diff --git a/sortedIndexOf.js b/sortedIndexOf.js index d8064ff37..7a6caa120 100644 --- a/sortedIndexOf.js +++ b/sortedIndexOf.js @@ -1,4 +1,4 @@ -var baseSortedIndex = require('./internal/baseSortedIndex'), +var baseSortedIndex = require('./_baseSortedIndex'), eq = require('./eq'); /** diff --git a/sortedLastIndex.js b/sortedLastIndex.js index 62288ff0f..ee679af57 100644 --- a/sortedLastIndex.js +++ b/sortedLastIndex.js @@ -1,4 +1,4 @@ -var baseSortedIndex = require('./internal/baseSortedIndex'); +var baseSortedIndex = require('./_baseSortedIndex'); /** * This method is like `_.sortedIndex` except that it returns the highest diff --git a/sortedLastIndexBy.js b/sortedLastIndexBy.js index 14918f6f5..b3ad765f3 100644 --- a/sortedLastIndexBy.js +++ b/sortedLastIndexBy.js @@ -1,5 +1,5 @@ -var baseIteratee = require('./internal/baseIteratee'), - baseSortedIndexBy = require('./internal/baseSortedIndexBy'); +var baseIteratee = require('./_baseIteratee'), + baseSortedIndexBy = require('./_baseSortedIndexBy'); /** * This method is like `_.sortedLastIndex` except that it accepts `iteratee` diff --git a/sortedLastIndexOf.js b/sortedLastIndexOf.js index c09510f1e..560444883 100644 --- a/sortedLastIndexOf.js +++ b/sortedLastIndexOf.js @@ -1,4 +1,4 @@ -var baseSortedIndex = require('./internal/baseSortedIndex'), +var baseSortedIndex = require('./_baseSortedIndex'), eq = require('./eq'); /** diff --git a/sortedUniq.js b/sortedUniq.js index 3aa8850db..6d9b5ba17 100644 --- a/sortedUniq.js +++ b/sortedUniq.js @@ -1,4 +1,4 @@ -var baseSortedUniq = require('./internal/baseSortedUniq'); +var baseSortedUniq = require('./_baseSortedUniq'); /** * This method is like `_.uniq` except that it's designed and optimized diff --git a/sortedUniqBy.js b/sortedUniqBy.js index 95591aa8b..88bf52b7f 100644 --- a/sortedUniqBy.js +++ b/sortedUniqBy.js @@ -1,5 +1,5 @@ -var baseIteratee = require('./internal/baseIteratee'), - baseSortedUniqBy = require('./internal/baseSortedUniqBy'); +var baseIteratee = require('./_baseIteratee'), + baseSortedUniqBy = require('./_baseSortedUniqBy'); /** * This method is like `_.uniqBy` except that it's designed and optimized diff --git a/spread.js b/spread.js index f144434c2..a1b52fc06 100644 --- a/spread.js +++ b/spread.js @@ -1,4 +1,4 @@ -var apply = require('./internal/apply'); +var apply = require('./_apply'); /** Used as the `TypeError` message for "Functions" methods. */ var FUNC_ERROR_TEXT = 'Expected a function'; diff --git a/startCase.js b/startCase.js index 326b89996..33013357d 100644 --- a/startCase.js +++ b/startCase.js @@ -1,5 +1,5 @@ var capitalize = require('./capitalize'), - createCompounder = require('./internal/createCompounder'); + createCompounder = require('./_createCompounder'); /** * Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). diff --git a/startsWith.js b/startsWith.js index bf7b3cde9..a7c170e55 100644 --- a/startsWith.js +++ b/startsWith.js @@ -1,4 +1,4 @@ -var baseClamp = require('./internal/baseClamp'), +var baseClamp = require('./_baseClamp'), toInteger = require('./toInteger'), toString = require('./toString'); diff --git a/sum.js b/sum.js index f54054d01..339dd72cd 100644 --- a/sum.js +++ b/sum.js @@ -1,4 +1,4 @@ -var baseSum = require('./internal/baseSum'), +var baseSum = require('./_baseSum'), identity = require('./identity'); /** @@ -17,7 +17,7 @@ var baseSum = require('./internal/baseSum'), function sum(array) { return (array && array.length) ? baseSum(array, identity) - : undefined; + : 0; } module.exports = sum; diff --git a/sumBy.js b/sumBy.js index 5792a5552..e5d8f586a 100644 --- a/sumBy.js +++ b/sumBy.js @@ -1,5 +1,5 @@ -var baseIteratee = require('./internal/baseIteratee'), - baseSum = require('./internal/baseSum'); +var baseIteratee = require('./_baseIteratee'), + baseSum = require('./_baseSum'); /** * This method is like `_.sum` except that it accepts `iteratee` which is @@ -26,7 +26,7 @@ var baseIteratee = require('./internal/baseIteratee'), function sumBy(array, iteratee) { return (array && array.length) ? baseSum(array, baseIteratee(iteratee)) - : undefined; + : 0; } module.exports = sumBy; diff --git a/take.js b/take.js index 062523261..21b22a4e0 100644 --- a/take.js +++ b/take.js @@ -1,4 +1,4 @@ -var baseSlice = require('./internal/baseSlice'), +var baseSlice = require('./_baseSlice'), toInteger = require('./toInteger'); /** diff --git a/takeRight.js b/takeRight.js index 408aac6b7..c8deb057c 100644 --- a/takeRight.js +++ b/takeRight.js @@ -1,4 +1,4 @@ -var baseSlice = require('./internal/baseSlice'), +var baseSlice = require('./_baseSlice'), toInteger = require('./toInteger'); /** diff --git a/takeRightWhile.js b/takeRightWhile.js index c9e758142..20d57b7be 100644 --- a/takeRightWhile.js +++ b/takeRightWhile.js @@ -1,5 +1,5 @@ -var baseIteratee = require('./internal/baseIteratee'), - baseWhile = require('./internal/baseWhile'); +var baseIteratee = require('./_baseIteratee'), + baseWhile = require('./_baseWhile'); /** * Creates a slice of `array` with elements taken from the end. Elements are diff --git a/takeWhile.js b/takeWhile.js index 103cefe01..25f3d9c8f 100644 --- a/takeWhile.js +++ b/takeWhile.js @@ -1,5 +1,5 @@ -var baseIteratee = require('./internal/baseIteratee'), - baseWhile = require('./internal/baseWhile'); +var baseIteratee = require('./_baseIteratee'), + baseWhile = require('./_baseWhile'); /** * Creates a slice of `array` with elements taken from the beginning. Elements diff --git a/template.js b/template.js index 5706b7103..2bdeb4fa6 100644 --- a/template.js +++ b/template.js @@ -1,12 +1,12 @@ -var assignInDefaults = require('./internal/assignInDefaults'), +var assignInDefaults = require('./_assignInDefaults'), assignInWith = require('./assignInWith'), attempt = require('./attempt'), - baseValues = require('./internal/baseValues'), - escapeStringChar = require('./internal/escapeStringChar'), + baseValues = require('./_baseValues'), + escapeStringChar = require('./_escapeStringChar'), isError = require('./isError'), - isIterateeCall = require('./internal/isIterateeCall'), + isIterateeCall = require('./_isIterateeCall'), keys = require('./keys'), - reInterpolate = require('./internal/reInterpolate'), + reInterpolate = require('./_reInterpolate'), templateSettings = require('./templateSettings'), toString = require('./toString'); diff --git a/templateSettings.js b/templateSettings.js index dc8351350..67dc19b4c 100644 --- a/templateSettings.js +++ b/templateSettings.js @@ -1,7 +1,7 @@ var escape = require('./escape'), - reEscape = require('./internal/reEscape'), - reEvaluate = require('./internal/reEvaluate'), - reInterpolate = require('./internal/reInterpolate'); + reEscape = require('./_reEscape'), + reEvaluate = require('./_reEvaluate'), + reInterpolate = require('./_reInterpolate'); /** * By default, the template delimiters used by lodash are like those in diff --git a/times.js b/times.js index 1c0220c68..b7ede33bd 100644 --- a/times.js +++ b/times.js @@ -1,5 +1,5 @@ -var baseTimes = require('./internal/baseTimes'), - toFunction = require('./internal/toFunction'), +var baseTimes = require('./_baseTimes'), + toFunction = require('./_toFunction'), toInteger = require('./toInteger'); /** Used as references for various `Number` constants. */ diff --git a/toArray.js b/toArray.js index 582a0f629..c34228919 100644 --- a/toArray.js +++ b/toArray.js @@ -1,12 +1,12 @@ -var Symbol = require('./internal/Symbol'), - copyArray = require('./internal/copyArray'), - getTag = require('./internal/getTag'), +var Symbol = require('./_Symbol'), + copyArray = require('./_copyArray'), + getTag = require('./_getTag'), isArrayLike = require('./isArrayLike'), isString = require('./isString'), - iteratorToArray = require('./internal/iteratorToArray'), - mapToArray = require('./internal/mapToArray'), - setToArray = require('./internal/setToArray'), - stringToArray = require('./internal/stringToArray'), + iteratorToArray = require('./_iteratorToArray'), + mapToArray = require('./_mapToArray'), + setToArray = require('./_setToArray'), + stringToArray = require('./_stringToArray'), values = require('./values'); /** `Object#toString` result references. */ diff --git a/toLength.js b/toLength.js index d309e7ca5..c1d64ca2d 100644 --- a/toLength.js +++ b/toLength.js @@ -1,4 +1,4 @@ -var baseClamp = require('./internal/baseClamp'), +var baseClamp = require('./_baseClamp'), toInteger = require('./toInteger'); /** Used as references for the maximum length and index of an array. */ diff --git a/toPairs.js b/toPairs.js index 6ca4a0e0c..8c6e4d0b0 100644 --- a/toPairs.js +++ b/toPairs.js @@ -1,4 +1,4 @@ -var baseToPairs = require('./internal/baseToPairs'), +var baseToPairs = require('./_baseToPairs'), keys = require('./keys'); /** diff --git a/toPairsIn.js b/toPairsIn.js index 552f17348..a6f882bc4 100644 --- a/toPairsIn.js +++ b/toPairsIn.js @@ -1,4 +1,4 @@ -var baseToPairs = require('./internal/baseToPairs'), +var baseToPairs = require('./_baseToPairs'), keysIn = require('./keysIn'); /** diff --git a/toPath.js b/toPath.js index 242b8bcaa..270698def 100644 --- a/toPath.js +++ b/toPath.js @@ -1,6 +1,6 @@ -var arrayMap = require('./internal/arrayMap'), +var arrayMap = require('./_arrayMap'), isArray = require('./isArray'), - stringToPath = require('./internal/stringToPath'); + stringToPath = require('./_stringToPath'); /** * Converts `value` to a property path array. diff --git a/toPlainObject.js b/toPlainObject.js index d1dfd4f61..ec6eb699f 100644 --- a/toPlainObject.js +++ b/toPlainObject.js @@ -1,4 +1,4 @@ -var copyObject = require('./internal/copyObject'), +var copyObject = require('./_copyObject'), keysIn = require('./keysIn'); /** diff --git a/toSafeInteger.js b/toSafeInteger.js index 854e19e17..6350b76e9 100644 --- a/toSafeInteger.js +++ b/toSafeInteger.js @@ -1,4 +1,4 @@ -var baseClamp = require('./internal/baseClamp'), +var baseClamp = require('./_baseClamp'), toInteger = require('./toInteger'); /** Used as references for various `Number` constants. */ diff --git a/toString.js b/toString.js index a9beaf9d7..1e1d2d8f4 100644 --- a/toString.js +++ b/toString.js @@ -1,4 +1,4 @@ -var Symbol = require('./internal/Symbol'), +var Symbol = require('./_Symbol'), isSymbol = require('./isSymbol'); /** Used as references for various `Number` constants. */ diff --git a/transform.js b/transform.js index 0173263e7..3aa48edb4 100644 --- a/transform.js +++ b/transform.js @@ -1,7 +1,7 @@ -var arrayEach = require('./internal/arrayEach'), - baseCreate = require('./internal/baseCreate'), - baseForOwn = require('./internal/baseForOwn'), - baseIteratee = require('./internal/baseIteratee'), +var arrayEach = require('./_arrayEach'), + baseCreate = require('./_baseCreate'), + baseForOwn = require('./_baseForOwn'), + baseIteratee = require('./_baseIteratee'), isArray = require('./isArray'), isFunction = require('./isFunction'), isObject = require('./isObject'), @@ -27,12 +27,12 @@ var arrayEach = require('./internal/arrayEach'), * _.transform([2, 3, 4], function(result, n) { * result.push(n *= n); * return n % 2 == 0; - * }); + * }, []); * // => [4, 9] * * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { * (result[value] || (result[value] = [])).push(key); - * }); + * }, {}); * // => { '1': ['a', 'c'], '2': ['b'] } */ function transform(object, iteratee, accumulator) { diff --git a/trim.js b/trim.js index 6dd971ca5..47f73b686 100644 --- a/trim.js +++ b/trim.js @@ -1,6 +1,6 @@ -var charsEndIndex = require('./internal/charsEndIndex'), - charsStartIndex = require('./internal/charsStartIndex'), - stringToArray = require('./internal/stringToArray'), +var charsEndIndex = require('./_charsEndIndex'), + charsStartIndex = require('./_charsStartIndex'), + stringToArray = require('./_stringToArray'), toString = require('./toString'); /** Used to match leading and trailing whitespace. */ diff --git a/trimEnd.js b/trimEnd.js index af1bfbabb..743dc41c9 100644 --- a/trimEnd.js +++ b/trimEnd.js @@ -1,5 +1,5 @@ -var charsEndIndex = require('./internal/charsEndIndex'), - stringToArray = require('./internal/stringToArray'), +var charsEndIndex = require('./_charsEndIndex'), + stringToArray = require('./_stringToArray'), toString = require('./toString'); /** Used to match leading and trailing whitespace. */ diff --git a/trimStart.js b/trimStart.js index 0b46da4a3..cdd3b6a99 100644 --- a/trimStart.js +++ b/trimStart.js @@ -1,5 +1,5 @@ -var charsStartIndex = require('./internal/charsStartIndex'), - stringToArray = require('./internal/stringToArray'), +var charsStartIndex = require('./_charsStartIndex'), + stringToArray = require('./_stringToArray'), toString = require('./toString'); /** Used to match leading and trailing whitespace. */ diff --git a/truncate.js b/truncate.js index 889101bc5..18b1c39c8 100644 --- a/truncate.js +++ b/truncate.js @@ -1,7 +1,7 @@ var isObject = require('./isObject'), isRegExp = require('./isRegExp'), - stringSize = require('./internal/stringSize'), - stringToArray = require('./internal/stringToArray'), + stringSize = require('./_stringSize'), + stringToArray = require('./_stringToArray'), toInteger = require('./toInteger'), toString = require('./toString'); diff --git a/unescape.js b/unescape.js index 8f1090305..046893366 100644 --- a/unescape.js +++ b/unescape.js @@ -1,5 +1,5 @@ var toString = require('./toString'), - unescapeHtmlChar = require('./internal/unescapeHtmlChar'); + unescapeHtmlChar = require('./_unescapeHtmlChar'); /** Used to match HTML entities and HTML characters. */ var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g, diff --git a/union.js b/union.js index aecfcb65d..0aabbfba3 100644 --- a/union.js +++ b/union.js @@ -1,5 +1,5 @@ -var baseFlatten = require('./internal/baseFlatten'), - baseUniq = require('./internal/baseUniq'), +var baseFlatten = require('./_baseFlatten'), + baseUniq = require('./_baseUniq'), rest = require('./rest'); /** diff --git a/unionBy.js b/unionBy.js index 386e6d064..785e9d96f 100644 --- a/unionBy.js +++ b/unionBy.js @@ -1,6 +1,6 @@ -var baseFlatten = require('./internal/baseFlatten'), - baseIteratee = require('./internal/baseIteratee'), - baseUniq = require('./internal/baseUniq'), +var baseFlatten = require('./_baseFlatten'), + baseIteratee = require('./_baseIteratee'), + baseUniq = require('./_baseUniq'), isArrayLikeObject = require('./isArrayLikeObject'), last = require('./last'), rest = require('./rest'); diff --git a/unionWith.js b/unionWith.js index b9cd3669c..1eca72906 100644 --- a/unionWith.js +++ b/unionWith.js @@ -1,5 +1,5 @@ -var baseFlatten = require('./internal/baseFlatten'), - baseUniq = require('./internal/baseUniq'), +var baseFlatten = require('./_baseFlatten'), + baseUniq = require('./_baseUniq'), isArrayLikeObject = require('./isArrayLikeObject'), last = require('./last'), rest = require('./rest'); diff --git a/uniq.js b/uniq.js index da0bbd1f9..fcaec4e4f 100644 --- a/uniq.js +++ b/uniq.js @@ -1,4 +1,4 @@ -var baseUniq = require('./internal/baseUniq'); +var baseUniq = require('./_baseUniq'); /** * Creates a duplicate-free version of an array, using diff --git a/uniqBy.js b/uniqBy.js index 71e21ed9d..4566e705f 100644 --- a/uniqBy.js +++ b/uniqBy.js @@ -1,5 +1,5 @@ -var baseIteratee = require('./internal/baseIteratee'), - baseUniq = require('./internal/baseUniq'); +var baseIteratee = require('./_baseIteratee'), + baseUniq = require('./_baseUniq'); /** * This method is like `_.uniq` except that it accepts `iteratee` which is diff --git a/uniqWith.js b/uniqWith.js index 6a47bd9a8..5bef15150 100644 --- a/uniqWith.js +++ b/uniqWith.js @@ -1,4 +1,4 @@ -var baseUniq = require('./internal/baseUniq'); +var baseUniq = require('./_baseUniq'); /** * This method is like `_.uniq` except that it accepts `comparator` which diff --git a/unset.js b/unset.js index 2fc0c41bb..63ac4368e 100644 --- a/unset.js +++ b/unset.js @@ -1,4 +1,4 @@ -var baseUnset = require('./internal/baseUnset'); +var baseUnset = require('./_baseUnset'); /** * Removes the property at `path` of `object`. diff --git a/unzip.js b/unzip.js index 6cd673f42..0dddd4447 100644 --- a/unzip.js +++ b/unzip.js @@ -1,7 +1,7 @@ -var arrayFilter = require('./internal/arrayFilter'), - arrayMap = require('./internal/arrayMap'), - baseProperty = require('./internal/baseProperty'), - baseTimes = require('./internal/baseTimes'), +var arrayFilter = require('./_arrayFilter'), + arrayMap = require('./_arrayMap'), + baseProperty = require('./_baseProperty'), + baseTimes = require('./_baseTimes'), isArrayLikeObject = require('./isArrayLikeObject'); /* Built-in method references for those with the same name as other `lodash` methods. */ diff --git a/unzipWith.js b/unzipWith.js index 55412d5c6..b8f5d5e7e 100644 --- a/unzipWith.js +++ b/unzipWith.js @@ -1,5 +1,5 @@ -var apply = require('./internal/apply'), - arrayMap = require('./internal/arrayMap'), +var apply = require('./_apply'), + arrayMap = require('./_arrayMap'), unzip = require('./unzip'); /** diff --git a/upperCase.js b/upperCase.js index 141ef178d..e09737ffc 100644 --- a/upperCase.js +++ b/upperCase.js @@ -1,4 +1,4 @@ -var createCompounder = require('./internal/createCompounder'); +var createCompounder = require('./_createCompounder'); /** * Converts `string`, as space separated words, to upper case. diff --git a/upperFirst.js b/upperFirst.js index eccc9da75..14d74d5c3 100644 --- a/upperFirst.js +++ b/upperFirst.js @@ -1,4 +1,4 @@ -var createCaseFirst = require('./internal/createCaseFirst'); +var createCaseFirst = require('./_createCaseFirst'); /** * Converts the first character of `string` to upper case. diff --git a/values.js b/values.js index 2c42a0a03..70915b595 100644 --- a/values.js +++ b/values.js @@ -1,4 +1,4 @@ -var baseValues = require('./internal/baseValues'), +var baseValues = require('./_baseValues'), keys = require('./keys'); /** diff --git a/valuesIn.js b/valuesIn.js index e00a34438..2e8b8ba8e 100644 --- a/valuesIn.js +++ b/valuesIn.js @@ -1,4 +1,4 @@ -var baseValues = require('./internal/baseValues'), +var baseValues = require('./_baseValues'), keysIn = require('./keysIn'); /** diff --git a/without.js b/without.js index c75232da2..8ff1bf22d 100644 --- a/without.js +++ b/without.js @@ -1,4 +1,4 @@ -var baseDifference = require('./internal/baseDifference'), +var baseDifference = require('./_baseDifference'), isArrayLikeObject = require('./isArrayLikeObject'), rest = require('./rest'); diff --git a/wrapperAt.js b/wrapperAt.js index 4ef911742..ce06e72b9 100644 --- a/wrapperAt.js +++ b/wrapperAt.js @@ -1,8 +1,8 @@ -var LazyWrapper = require('./internal/LazyWrapper'), - LodashWrapper = require('./internal/LodashWrapper'), - baseAt = require('./internal/baseAt'), - baseFlatten = require('./internal/baseFlatten'), - isIndex = require('./internal/isIndex'), +var LazyWrapper = require('./_LazyWrapper'), + LodashWrapper = require('./_LodashWrapper'), + baseAt = require('./_baseAt'), + baseFlatten = require('./_baseFlatten'), + isIndex = require('./_isIndex'), rest = require('./rest'), thru = require('./thru'); diff --git a/wrapperLodash.js b/wrapperLodash.js index 77cb92e43..769b160d4 100644 --- a/wrapperLodash.js +++ b/wrapperLodash.js @@ -1,9 +1,9 @@ -var LazyWrapper = require('./internal/LazyWrapper'), - LodashWrapper = require('./internal/LodashWrapper'), - baseLodash = require('./internal/baseLodash'), +var LazyWrapper = require('./_LazyWrapper'), + LodashWrapper = require('./_LodashWrapper'), + baseLodash = require('./_baseLodash'), isArray = require('./isArray'), isObjectLike = require('./isObjectLike'), - wrapperClone = require('./internal/wrapperClone'); + wrapperClone = require('./_wrapperClone'); /** Used for built-in method references. */ var objectProto = global.Object.prototype; @@ -57,20 +57,21 @@ var hasOwnProperty = objectProto.hasOwnProperty; * `differenceBy`, `differenceWith`, `drop`, `dropRight`, `dropRightWhile`, * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flip`, `flow`, * `flowRight`, `fromPairs`, `functions`, `functionsIn`, `groupBy`, `initial`, - * `intersection`, `intersectionBy`, `intersectionWith`, `invert`, `invokeMap`, - * `iteratee`, `keyBy`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, - * `matches`, `matchesProperty`, `memoize`, `merge`, `mergeWith`, `method`, - * `methodOf`, `mixin`, `negate`, `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, - * `over`, `overArgs`, `overEvery`, `overSome`, `partial`, `partialRight`, - * `partition`, `pick`, `pickBy`, `plant`, `property`, `propertyOf`, `pull`, - * `pullAll`, `pullAllBy`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, - * `reject`, `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, - * `shuffle`, `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, - * `takeRight`, `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, - * `toArray`, `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, - * `unary`, `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, - * `unset`, `unshift`, `unzip`, `unzipWith`, `values`, `valuesIn`, `without`, - * `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, `zipObject`, and `zipWith` + * `intersection`, `intersectionBy`, `intersectionWith`, `invert`, `invertBy`, + * `invokeMap`, `iteratee`, `keyBy`, `keys`, `keysIn`, `map`, `mapKeys`, + * `mapValues`, `matches`, `matchesProperty`, `memoize`, `merge`, `mergeWith`, + * `method`, `methodOf`, `mixin`, `negate`, `nthArg`, `omit`, `omitBy`, `once`, + * `orderBy`, `over`, `overArgs`, `overEvery`, `overSome`, `partial`, + * `partialRight`, `partition`, `pick`, `pickBy`, `plant`, `property`, + * `propertyOf`, `pull`, `pullAll`, `pullAllBy`, `pullAt`, `push`, `range`, + * `rangeRight`, `rearg`, `reject`, `remove`, `rest`, `reverse`, `sampleSize`, + * `set`, `setWith`, `shuffle`, `slice`, `sort`, `sortBy`, `splice`, `spread`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `tap`, `throttle`, + * `thru`, `toArray`, `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, + * `transform`, `unary`, `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, + * `uniqWith`, `unset`, `unshift`, `unzip`, `unzipWith`, `values`, `valuesIn`, + * `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, `zipObject`, + * `zipObjectDeep`, and `zipWith` * * The wrapper methods that are **not** chainable by default are: * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, diff --git a/wrapperReverse.js b/wrapperReverse.js index 346472481..51d44b9ba 100644 --- a/wrapperReverse.js +++ b/wrapperReverse.js @@ -1,5 +1,5 @@ -var LazyWrapper = require('./internal/LazyWrapper'), - LodashWrapper = require('./internal/LodashWrapper'), +var LazyWrapper = require('./_LazyWrapper'), + LodashWrapper = require('./_LodashWrapper'), reverse = require('./reverse'), thru = require('./thru'); diff --git a/wrapperValue.js b/wrapperValue.js index 2f7e908e1..e04329a03 100644 --- a/wrapperValue.js +++ b/wrapperValue.js @@ -1,4 +1,4 @@ -var baseWrapperValue = require('./internal/baseWrapperValue'); +var baseWrapperValue = require('./_baseWrapperValue'); /** * Executes the chained sequence to extract the unwrapped value. diff --git a/xor.js b/xor.js index 6e4936eee..05ae2f18c 100644 --- a/xor.js +++ b/xor.js @@ -1,5 +1,5 @@ -var arrayFilter = require('./internal/arrayFilter'), - baseXor = require('./internal/baseXor'), +var arrayFilter = require('./_arrayFilter'), + baseXor = require('./_baseXor'), isArrayLikeObject = require('./isArrayLikeObject'), rest = require('./rest'); diff --git a/xorBy.js b/xorBy.js index 52a09edd1..49831a505 100644 --- a/xorBy.js +++ b/xorBy.js @@ -1,6 +1,6 @@ -var arrayFilter = require('./internal/arrayFilter'), - baseIteratee = require('./internal/baseIteratee'), - baseXor = require('./internal/baseXor'), +var arrayFilter = require('./_arrayFilter'), + baseIteratee = require('./_baseIteratee'), + baseXor = require('./_baseXor'), isArrayLikeObject = require('./isArrayLikeObject'), last = require('./last'), rest = require('./rest'); diff --git a/xorWith.js b/xorWith.js index 11a143e9d..f35bc7abd 100644 --- a/xorWith.js +++ b/xorWith.js @@ -1,5 +1,5 @@ -var arrayFilter = require('./internal/arrayFilter'), - baseXor = require('./internal/baseXor'), +var arrayFilter = require('./_arrayFilter'), + baseXor = require('./_baseXor'), isArrayLikeObject = require('./isArrayLikeObject'), last = require('./last'), rest = require('./rest'); diff --git a/zipObject.js b/zipObject.js index fd5c10395..11c160ff6 100644 --- a/zipObject.js +++ b/zipObject.js @@ -1,4 +1,5 @@ -var baseSet = require('./internal/baseSet'); +var assignValue = require('./_assignValue'), + baseZipObject = require('./_baseZipObject'); /** * This method is like `_.fromPairs` except that it accepts two arrays, @@ -12,19 +13,11 @@ var baseSet = require('./internal/baseSet'); * @returns {Object} Returns the new object. * @example * - * _.zipObject(['fred', 'barney'], [30, 40]); - * // => { 'fred': 30, 'barney': 40 } + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } */ function zipObject(props, values) { - var index = -1, - length = props ? props.length : 0, - valsLength = values ? values.length : 0, - result = {}; - - while (++index < length) { - baseSet(result, props[index], index < valsLength ? values[index] : undefined); - } - return result; + return baseZipObject(props || [], values || [], assignValue); } module.exports = zipObject; diff --git a/zipObjectDeep.js b/zipObjectDeep.js new file mode 100644 index 000000000..09eb541c5 --- /dev/null +++ b/zipObjectDeep.js @@ -0,0 +1,22 @@ +var baseSet = require('./_baseSet'), + baseZipObject = require('./_baseZipObject'); + +/** + * This method is like `_.zipObject` except that it supports property paths. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} [props=[]] The property names. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + */ +function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); +} + +module.exports = zipObjectDeep;