UNPKG

@yookue/ts-lang-utils

Version:

Common lang utilities for typescript

4 lines 204 B
import { endsWithIgnoreCase } from "./endsWithIgnoreCase"; export function appendIfMissingIgnoreCase(text, suffix) { return !text || !suffix || endsWithIgnoreCase(text, suffix) ? text : text + suffix; }