diff --git a/assignIn.js b/assignIn.js deleted file mode 100644 index a20b9e5b6..000000000 --- a/assignIn.js +++ /dev/null @@ -1,38 +0,0 @@ -import copyObject from './.internal/copyObject.js'; -import createAssigner from './.internal/createAssigner.js'; -import keysIn from './keysIn.js'; - -/** - * This method is like `assign` except that it iterates over own and - * inherited source properties. - * - * **Note:** This method mutates `object`. - * - * @since 4.0.0 - * @alias extend - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see assign - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } - * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; - * - * assignIn({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } - */ -const assignIn = createAssigner((object, source) => { - copyObject(source, keysIn(source), object); -}); - -export default assignIn; diff --git a/assignInWith.js b/assignInWith.js deleted file mode 100644 index 7eca9a6af..000000000 --- a/assignInWith.js +++ /dev/null @@ -1,36 +0,0 @@ -import copyObject from './.internal/copyObject.js'; -import createAssigner from './.internal/createAssigner.js'; -import keysIn from './keysIn.js'; - -/** - * This method is like `assignIn` except that it accepts `customizer` - * which is invoked to produce the assigned values. If `customizer` returns - * `undefined`, assignment is handled by the method instead. The `customizer` - * is invoked with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. - * - * @since 4.0.0 - * @alias extendWith - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @see assignWith - * @example - * - * function customizer(objValue, srcValue) { - * return isUndefined(objValue) ? srcValue : objValue; - * } - * - * const defaults = partialRight(assignInWith, customizer); - * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -const assignInWith = createAssigner((object, source, srcIndex, customizer) => { - copyObject(source, keysIn(source), object, customizer); -}); - -export default assignInWith; diff --git a/entriesIn.js b/entriesIn.js deleted file mode 100644 index 316ee4def..000000000 --- a/entriesIn.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './toPairsIn.js'; diff --git a/extend.js b/extend.js deleted file mode 100644 index ff80fb562..000000000 --- a/extend.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './assignIn.js'; diff --git a/extendWith.js b/extendWith.js deleted file mode 100644 index f94fd8fd9..000000000 --- a/extendWith.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './assignInWith.js'; diff --git a/forIn.js b/forIn.js deleted file mode 100644 index 879c4ba6e..000000000 --- a/forIn.js +++ /dev/null @@ -1,34 +0,0 @@ -import baseFor from './.internal/baseFor.js'; -import keysIn from './keysIn.js'; - -/** - * Iterates over own and inherited enumerable string keyed properties of an - * object and invokes `iteratee` for each property. The iteratee is invoked - * with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning `false`. - * - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see forEach, forEachRight, forInRight, forOwn, forOwnRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * forIn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). - */ -function forIn(object, iteratee) { - return object == null ? object : baseFor(object, iteratee, keysIn); -} - -export default forIn; diff --git a/forInRight.js b/forInRight.js deleted file mode 100644 index 923b8ff3c..000000000 --- a/forInRight.js +++ /dev/null @@ -1,32 +0,0 @@ -import baseForRight from './.internal/baseForRight.js'; -import keysIn from './keysIn.js'; - -/** - * This method is like `forIn` except that it iterates over properties of - * `object` in the opposite order. - * - * @since 2.0.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see forEach, forEachRight, forIn, forOwn, forOwnRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * forInRight(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'c', 'b', then 'a' assuming `forIn` logs 'a', 'b', then 'c'. - */ -function forInRight(object, iteratee) { - return object == null ? object : baseForRight(object, iteratee, keysIn); -} - -export default forInRight; diff --git a/functionsIn.js b/functionsIn.js deleted file mode 100644 index 9747534a7..000000000 --- a/functionsIn.js +++ /dev/null @@ -1,29 +0,0 @@ -import baseFunctions from './.internal/baseFunctions.js'; -import keysIn from './keysIn.js'; - -/** - * Creates an array of function property names from own and inherited - * enumerable properties of `object`. - * - * @since 4.0.0 - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the function names. - * @see functions - * @example - * - * function Foo() { - * this.a = constant('a'); - * this.b = constant('b'); - * } - * - * Foo.prototype.c = constant('c'); - * - * functionsIn(new Foo); - * // => ['a', 'b', 'c'] - */ -function functionsIn(object) { - return object == null ? [] : baseFunctions(object, keysIn(object)); -} - -export default functionsIn; diff --git a/keysIn.js b/keysIn.js deleted file mode 100644 index 90219685a..000000000 --- a/keysIn.js +++ /dev/null @@ -1,30 +0,0 @@ -import arrayLikeKeys from './.internal/arrayLikeKeys.js'; -import baseKeysIn from './.internal/baseKeysIn.js'; -import isArrayLike from './isArrayLike.js'; - -/** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ -function keysIn(object) { - return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); -} - -export default keysIn; diff --git a/toPairsIn.js b/toPairsIn.js deleted file mode 100644 index ab5ad8bb1..000000000 --- a/toPairsIn.js +++ /dev/null @@ -1,40 +0,0 @@ -import arrayMap from './.internal/arrayMap.js'; -import getTag from './.internal/getTag.js'; -import mapToArray from './.internal/mapToArray.js'; -import setToPairs from './.internal/setToPairs.js'; -import keysIn from './keysIn.js'; - -/** - * Creates an array of own and inherited enumerable string keyed-value pairs - * for `object` which can be consumed by `fromPairs`. If `object` is a map - * or set, its entries are returned. - * - * @since 4.0.0 - * @alias entriesIn - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the key-value pairs. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * toPairsIn(new Foo); - * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) - */ -function toPairsIn(object) { - const tag = getTag(object); - if (tag == '[object Map]') { - return mapToArray(object); - } - if (tag == '[object Set]') { - return setToPairs(object); - } - return arrayMap(keysIn(object), key => [key, object[key]]); -} - -export default toPairsIn; diff --git a/valuesIn.js b/valuesIn.js deleted file mode 100644 index 0a9f845a4..000000000 --- a/valuesIn.js +++ /dev/null @@ -1,30 +0,0 @@ -import baseValues from './.internal/baseValues.js'; -import keysIn from './keysIn.js'; - -/** - * Creates an array of the own and inherited enumerable string keyed property - * values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * valuesIn(new Foo); - * // => [1, 2, 3] (iteration order is not guaranteed) - */ -function valuesIn(object) { - return object == null ? [] : baseValues(object, keysIn(object)); -} - -export default valuesIn;