hasWord

1.0.1 • Public • Published

hasWord()

** A string method to check to see if a string contains a word. **

'this is a test string'.hasWord('test'); returns true

'this is a test string'.hasWord('node'); returns false

Of course this works with variables as well:

let string = 'this is a test';

string.hasWord('test'); returns true

string.hasWord('node'); returns false

Package Sidebar

Install

npm i hasWord

Weekly Downloads

1

Version

1.0.1

License

ISC

Last publish

Collaborators

  • glensargent