UNPKG

@yookue/ts-lang-utils

Version:

Common lang utilities for typescript

4 lines 211 B
import { startsWithIgnoreCase } from "./startsWithIgnoreCase"; export function prependIfMissingIgnoreCase(text, prefix) { return !text || !prefix || startsWithIgnoreCase(text, prefix) ? text : prefix + text; }