UNPKG

@yookue/ts-lang-utils

Version:

Common lang utilities for typescript

9 lines 229 B
export function endsWithIgnoreCase(text, suffix) { if (!text || !suffix) { return text === suffix; } if (text.length < suffix.length) { return false; } return text.toLowerCase().endsWith(suffix.toLowerCase()); }