Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 808 Bytes

README.md

File metadata and controls

46 lines (35 loc) · 808 Bytes

wordcloud-generator

A wordcloud generator for nodejs

Installation

npm

npm install wordcloud-generator

yarn

yarn add wordcloud-generator

Examples

alt text

Usage

String

import {generate} from "wordcloud-generator";

const wordstring = "The quick brown fox jumps over the lazy dog";
await generate(wordstring, true, "wordcloud.png")

Array of words

import {generate} from "wordcloud-generator";

const words = ["word1", "word2", "word3"];
await generate(words, true, "wordcloud.png")

Map of strings and frequencies

import {generate} from "wordcloud-generator";

const words = new Map()
words.set("abc",10)
words.set("def",20)
words.set("ghi",30)
await generate(words, true, "wordcloud.png")