UNPKG

bbo

Version:

bbo is a utility library of zero dependencies for javascript.

10 lines (8 loc) 247 B
/** * Item is the beginning of the target */ function startsWith(target, item, ignore) { var str = String(target).slice(0, item.length); return ignore ? str.toLowerCase() === item.toLowerCase() : str === item; } export default startsWith;