Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
wordfest
Advanced tools
Readme
WordFest is a npm package to create word clouds. However, unlike most word clouds, Wordfest does not rotate the words but aligns them in reading direction. Thereby it appears similar to festival lineups.
You can install WordFest using npm:
npm install wordfest
import { wordfest } from "wordfest";
const data = [
{ text: "apple", value: 10 },
{ text: "banana", value: 8 },
{ text: "orange", value: 6 },
{ text: "cherry", value: 3 },
{ text: "blueberry", value: 2 },
];
const wordCloudDiv = wordfest(data);
document.getElementById('wordCloudContainer').appendChild(wordCloudDiv);
Result:
WordFest provides flexibility through configuration options:
import { wordfest } from "wordfest";
const data = [
{ fruit: "apple", quantity: 10, fruitColor: 'green' },
{ fruit: "banana", quantity: 8, fruitColor: 'gold' },
{ fruit: "orange", quantity: 6, fruitColor: 'orange' },
{ fruit: "cherry", quantity: 3, fruitColor: 'red' },
{ fruit: "blueberry", quantity: 2, fruitColor: 'darkslateblue' },
];
const fruitConfig = {
textProperty: 'fruit',
valueProperty: 'quantity',
colorProperty: 'fruitColor',
};
const wordCloudDiv = wordfest(data, fruitConfig);
document.getElementById('wordCloudContainer').appendChild(wordCloudDiv);
Result:
Wordfest's output is pure HTML and can therefore be styled via CSS.
import { wordfest } from "wordfest";
const data = [
{ text: "apple", value: 10 },
{ text: "banana", value: 8 },
{ text: "orange", value: 6 },
{ text: "cherry", value: 3 },
{ text: "blueberry", value: 2 },
];
const wordCloudDiv = wordfest(data);
const container = document.getElementById('wordCloudContainer')
container.appendChild(wordCloudDiv);
container.style.background = "linear-gradient(0deg, #00DBDE 0%, #FC00FF 100%)";
container.style.webkitTextFillColor = "transparent";
container.style.backgroundClip = "text";
container.style.width = "25em";
Result:
wordfest(data: DataItem[], config?: WordFestConfig): HTMLDivElement
Generates a word cloud visualization from the provided input data.
data
: An array of JavaScript objects containing word data.config
(optional): An object that customizes word cloud behavior. Available options:
textProperty
: Specifies the name of the property in data objects to use as word text (default: 'text').valueProperty
: Specifies the name of the property to use for scaling word sizes (default: 'value').colorProperty
: Specifies the name of the property for individual text colors (default: 'color'). If no color is specified, the the default text color is used.FAQs
HTML word clouds with frequency.
The npm package wordfest receives a total of 0 weekly downloads. As such, wordfest popularity was classified as not popular.
We found that wordfest 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.