Skip to content

Commit

Permalink
Replace lodash isString with native equivalent (#2827)
Browse files Browse the repository at this point in the history
  • Loading branch information
carbonrobot authored Mar 12, 2024
1 parent 6f24b89 commit 3d6f8ad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/gorgeous-pianos-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"victory-voronoi-container": patch
---

Replace lodash isString with native equivalent
6 changes: 4 additions & 2 deletions packages/victory-voronoi-container/src/voronoi-helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Collection, Selection, Data, Helpers } from "victory-core";
import { isEmpty, isString, isRegExp, throttle } from "lodash";
import { isEmpty, isRegExp, throttle } from "lodash";
import isEqual from "react-fast-compare";
import Delaunay from "delaunay-find/lib/index.js";
import React from "react";
Expand Down Expand Up @@ -66,7 +66,9 @@ class VoronoiHelpersClass {
const childProps = child.props || {};
const name = childProps.name || childName;
const blacklist = props.voronoiBlacklist || [];
const blacklistStr = blacklist.filter(isString);
const blacklistStr = blacklist.filter(
(value) => !!value && typeof value.valueOf() === "string",
);
const blacklistRegExp = blacklist.filter(isRegExp);
const isRegExpMatch = blacklistRegExp.some((regExp) => regExp.test(name));
if (
Expand Down

0 comments on commit 3d6f8ad

Please sign in to comment.