
Security News
TC39 Advances 11 Proposals for Math Precision, Binary APIs, and More
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
check-english
Advanced tools
Determine if a string contains English words based on a list of 5,000 common words
A simple npm module to determine if a string contains English words, based on a list of 10,000 common English words. This tool is designed for basic language detection and works well in most cases, especially with longer texts.
Install the package using npm:
npm install check-english
Note: Requires Node.js version 14 or higher due to ES module support.
Import the isEnglish
function and check if a string contains English words:
import { isEnglish } from 'check-english';
console.log(isEnglish('Hello world')); // true
console.log(isEnglish('Hola mundo')); // false
isEnglish(text: string): boolean
This module is not 100% accurate but should be reliable for most pieces of text, particularly when longer. It uses a fixed list of 10,000 common English words, so:
Feel free to contribute or report issues at the GitHub repository.
Licensed under the MIT License.
FAQs
Determine if a string contains English words based on a list of 5,000 common words
The npm package check-english receives a total of 1 weekly downloads. As such, check-english popularity was classified as not popular.
We found that check-english demonstrated a healthy version release cadence and project activity because the last version was released less than 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
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.