UNPKG

safers

Version:

Safely convert to the desired data and error-free refine values.

16 lines (15 loc) 319 B
import { isRegExp as m } from "../utils/isRegExp.js"; import { isString as n } from "../utils/isString.js"; import "../../lib/identifyType-d39b7385.js"; function u(r, t, i = []) { if (!r || !n(r) || !n(t) && !m(t)) return i; try { return r.split(t); } catch { return i; } } export { u as split };