export function endsWith ( str , search ) { const strLength = str . length ; return str . substring ( strLength - search . length , strLength ) === search ; } export function startsWith ( str , search , pos ? ) { return str . substr ( ! pos || pos < 0 ? 0 : + pos , search . length ) === search ; }