2.0.0 • Published 3 years ago
detectword.js v2.0.0
detectword.js
A Package for Detecting a word in a string for beginners
installation
npm i detectword.js
or
npm i -g detectword.js
Usage
To detect a word, Use this method
const detectword = require('detectword.js');
const word = detectword('Im Proggramming right now.', 'right'); // Detect word "right" on "Im Proggramming right now."
console.log(word); // this will output true because theres "right" on "Im Proggramming right now."
Another examples of returning False
const detectword = require('detectword.js');
const word = detectword('Im Proggramming right now.', 'coding'); // Detect word "coding" on "Im Proggramming right now."
console.log(word); // this will output false because theres no "coding" on "Im Proggramming right now."
Another Examples one of the most Common issues
const detectword = require('detectword.js');
const word = detectword('Im Proggramming right now.', 'rIGhT'); // as you can see, the word includes an uppercase and lowercase in this issue
console.log(word); // this will output true because theres "right" on "Im Proggramming right now."
Support And Sponsor
If You Need Support Please DM ME (0L_0V2)#2021, My Website is here. Sponsored By Shidqie bot.