UNPKG

@flex-development/pathe

Version:

Universal drop-in replacement for node:path

10 lines (9 loc) 337 B
import { DRIVE_PATH_REGEX } from "#internal/constants"; import isSep from "#lib/is-sep"; function isDeviceRoot(value) { return typeof value === "string" && value.length === 3 && DRIVE_PATH_REGEX.test(value) && isSep(value[value.length - 1]); } var is_device_root_default = isDeviceRoot; export { is_device_root_default as default };