Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace lodash isString with native equivalent #2827

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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