1.1.0 • Published 9 years ago
begins-with v1.1.0
begins-with
Checks if string begins with the given target string
Install
$ npm install --save begins-with
Usage
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
API
beginsWith(string, match)
Checks if string
begins with match
string
Required
Type: string
String to be tested against.
match
Required
Type: string
String to test with.
License
MIT © Kevin Mårtensson