begins-with

1.1.0 • Public • Published

begins-with Build Status

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

Package Sidebar

Install

npm i begins-with

Weekly Downloads

1

Version

1.1.0

License

MIT

Last publish

Collaborators

  • kevva