0.1.0 • Published 4 years ago

builtinwordlist v0.1.0

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

Append It Word List

A built-in word list for word games.

Why?

I have a word game project written in Javascript. The hardest part of the project is finding a good word list that contains enough words to use in a word game. This task takes a lot of time and makes me feel boring. Without the list, my game can't be played, so I had to do that boring task and collected a good word list. I converted it into a Javascript module so I can use it for later projects. Anyone who hates that boring task can use this too.

What?

This list contains about 28.000 English words. It's not perfect, but it can save your time. You use the list through BuiltInWordList object.

How?

The main actor of the module is BuiltInWordList.

Methods

NameParametersReturnsDescription
hasword - stringbooleanCheck if the word is in the list, ignore case-sensitive
randomstringGet a random word from the list

Example

import BuiltInWordList from "builtinwordlist";

BuiltInWordList.has("good"); // true
BuiltInWordList.has("distroi"); // false

const randomWord = BuiltInWordList.random();
0.1.0

4 years ago