UNPKG

word-vault

Version:

A lightweight JavaScript package for English word definitions and collections.

12 lines (11 loc) 387 B
import { getAllCollections } from "./getAllCollections.js"; export function getCollectionsByStatus(status) { const allCollections = getAllCollections(); if (!allCollections) { return null; } return allCollections.filter((collection) => collection.status === status); } export function getPublishedCollections() { return getCollectionsByStatus("published"); }