Skip to content

Commit 61155cd

Browse files
authored
Replace lodash identity with native code (#2829)
1 parent a14e76c commit 61155cd

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.changeset/dry-peas-stare.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"victory-core": patch
3+
---
4+
5+
Replace lodash identity with native code

packages/victory-core/src/victory-util/axis.tsx

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
import React from "react";
2-
import { defaults, identity, isObject, uniq, orderBy } from "lodash";
2+
import { defaults, isObject, uniq, orderBy } from "lodash";
33
import * as Collection from "./collection";
44
import * as Domain from "./domain";
55
import * as Helpers from "./helpers";
66
import { D3Scale } from "../types/prop-types";
77

8+
/**
9+
* Returns the first argument it receives
10+
* @param value The value to return
11+
* @returns The value given
12+
*/
13+
function identity<T>(value: T): T {
14+
return value;
15+
}
16+
817
/**
918
* Returns the axis (x or y) of a particular axis component
1019
* @param {Object} props: the props object.

0 commit comments

Comments
 (0)