word-vault
Version:
A lightweight JavaScript package for English word definitions and collections.
14 lines (13 loc) • 446 B
JavaScript
import { getAllCollections } from "./getAllCollections.js";
export function getAllCollectionCards() {
const collections = getAllCollections();
const allWords = new Set();
for (const collection of collections) {
for (const category of collection.categories) {
for (const challenge of category.cards) {
allWords.add(challenge);
}
}
}
return Array.from(allWords).sort();
}