
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
remove-words
Advanced tools
A node module that returns all words from a string not that were not in a specified list. By default will remove all pronouns and conjunctions
A node module that returns an array of all words in a string that are not a pronoun or generic words.
This can be used for storing just the keywords of a string in a database and not wasting space with words like 'and', 'to', 'the'... which are unlikely to be searched for in a query.
yarn add remove-words --save
var removeWords = require('remove-words');
removeWords("Today is sunny so we are going to go swimming at the seaside");
// Will return: ['today', 'sunny', 'swimming', 'seaside']
By default all duplicates will be removed. The second (optional) parameter is a boolean, specifiying weather of not to remove duplicates.
removeWords("Hello world hello hello", true); // ["hello", "world"]
removeWords("Hello world hello hello", false); // ["hello", "world", "hello", "hello"]
var names = ['jack', 'john', 'joe', 'james', 'jim']
removeWords("The winners are: Jack, John and Jim!!!", true, names)
// Will remove just all names
Run npm test
gulp build
- Lints and compiles CoffeeScriptgulp test
- Runs testsgulp
- Watches for changes, cleans working directory, builds and testsIf you find an issue:
git clone https://github.com/Lissy93/remove-words.git && cd $(basename $_ .git)
yarn install --production=false
npm run build
/ npm run watch
npm test
MIT © Alicia Sykes 2017. View licence.
FAQs
A node module that returns all words from a string not that were not in a specified list. By default will remove all pronouns and conjunctions
The npm package remove-words receives a total of 1,272 weekly downloads. As such, remove-words popularity was classified as popular.
We found that remove-words demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.