Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@wordpress/wordcount
Advanced tools
WordPress word count utility.
Install the module
npm install @wordpress/wordcount --save
This package assumes that your code will run in an ES2015+ environment. If you're using an environment that has limited or no support for such language features and APIs, you should include the polyfill shipped in @wordpress/babel-preset-default
in your code.
Count some words.
Usage
import { count } from '@wordpress/wordcount';
const numberOfWords = count( 'Words to count', 'words', {} );
Parameters
string
: The text being processedWPWordCountStrategy
: The type of count. Accepts 'words', 'characters_excluding_spaces', or 'characters_including_spaces'.WPWordCountUserSettings
: Custom settings object.Returns
number
: The word or character count.This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to npm and used by WordPress as well as other software projects.
To find out more about contributing to this package or Gutenberg as a whole, please read the project's main contributor guide.
FAQs
WordPress word count utility.
The npm package @wordpress/wordcount receives a total of 38,048 weekly downloads. As such, @wordpress/wordcount popularity was classified as popular.
We found that @wordpress/wordcount demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 23 open source maintainers 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.