UNPKG

bbo

Version:

bbo is a utility library of zero dependencies for javascript.

12 lines (9 loc) 264 B
'use strict'; /** * 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; } module.exports = startsWith;