Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Replace lodash isString with native equivalent
  • Loading branch information
carbonrobot committed Mar 12, 2024
commit cbc1d354d66b34cc2aed77075ca50cab47dee97a
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