Checks if string begins with the given target string
$ npm install --save begins-with
var beginsWith = require('begins-with');
beginsWith('foo bar cat', 'foo');
//=> true
beginsWith('123foobar', '123foo');
//=> true
beginsWith('+lol+foo+bar', '+lol');
//=> true
beginsWith('foobar', 'cat');
//=> false
Checks if string
begins with match
Required
Type: string
String to be tested against.
Required
Type: string
String to test with.
MIT © Kevin Mårtensson