Skip to content

Commit

Permalink
4000 - getDiffAsPartialObject -> getDiff
Browse files Browse the repository at this point in the history
  • Loading branch information
sorja committed Oct 14, 2024
1 parent 78eeecc commit 4029e91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ const _traverseAndCompare = <T extends Record<string, unknown>>(
* @example
* const base = { a: 1, b: { c: 2 } };
* const compare = { a: 1, b: { c: 3, d: 4 } };
* const result = getDiffAsPartialObject(base, compare);
* const result = getDiff(base, compare);
* // result: { b: { c: 3, d: 4 } }
*/
export const getDiffAsPartialObject = <T extends Record<string, unknown>>(
export const getDiff = <T extends Record<string, unknown>>(
baseObject: T,
compareObject: T,
keysToIgnore?: Array<string>
Expand Down
6 changes: 3 additions & 3 deletions src/utils/objects/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import * as isNil from 'lodash.isnil'
import * as pick from 'lodash.pick'
// @ts-ignore
import * as unset from 'lodash.unset'
import { getInPath } from 'utils/objects/getInPath'

import { camelize } from './camelize'
import { getDiffAsPartialObject } from './getDiffAsPartialObject'
import { getDiff } from './getDiff'
import { getInPath } from './getInPath'
import { isEmpty } from './isEmpty'
import { mergePartial } from './mergePartial'
import { propertyOf } from './propertyOf'
Expand All @@ -22,7 +22,7 @@ import { setInPath } from './setInPath'
export const Objects = {
camelize,
cloneDeep,
getDiffAsPartialObject,
getDiff,
getInPath,
isEmpty,
isEqual,
Expand Down

0 comments on commit 4029e91

Please sign in to comment.