npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

begins-with

1.1.0

@kevva

npmHomeRepoSnykSocket
Downloads:11
$ npm install begins-with
DailyWeeklyMonthlyYearly

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