Skip to content

Commit

Permalink
Replace lodash identity with native code (#2829)
Browse files Browse the repository at this point in the history
  • Loading branch information
carbonrobot authored Mar 12, 2024
1 parent a14e76c commit 61155cd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/dry-peas-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"victory-core": patch
---

Replace lodash identity with native code
11 changes: 10 additions & 1 deletion packages/victory-core/src/victory-util/axis.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
import React from "react";
import { defaults, identity, isObject, uniq, orderBy } from "lodash";
import { defaults, isObject, uniq, orderBy } from "lodash";
import * as Collection from "./collection";
import * as Domain from "./domain";
import * as Helpers from "./helpers";
import { D3Scale } from "../types/prop-types";

/**
* Returns the first argument it receives
* @param value The value to return
* @returns The value given
*/
function identity<T>(value: T): T {
return value;
}

/**
* Returns the axis (x or y) of a particular axis component
* @param {Object} props: the props object.
Expand Down

0 comments on commit 61155cd

Please sign in to comment.