This package helps to remove unnecessary word from the string.
$ npm install jsmp-infra-mykyta-hotsak-remove-word
To use this function import this like that:
const removeWord = require('jsmp-infra-mykyta-hotsak-remove-word');
removeWord(string, word)
-
string
- The string, which you want to delete a word; -
word
- the word, which you want to remove;
Run "npm run test:unit" or "yarn test:unit" to check if everything works as expected.
removeWord('Hello world', 'world'); // 'Hello'