Reference · Look words up by reading, written form, English meaning, kanji or romaji
withoutWordsfunction
The words with those named on a list left out. A list names a word by its reading or by a written form, and a kana in either is the same in hiragana and katakana. A reading that several words share names all of them.
Import it
import { withoutWords } from "@johnmorrisdotca/jisho/words";
Definition
function withoutWords(words: readonly Word[], list: readonly string[]): Word[]
Parameters
| Name | Type | Description |
|---|---|---|
words | readonly Word[] | The words a lookup returned. |
list | readonly string[] | Readings and written forms to leave out. |
Returns
Word[]
The words that are not named, in the same order.
Examples
import { loadWords, withoutWords, wordsOf } from "@johnmorrisdotca/jisho/words";
const words = await loadWords("かみ");
console.log(withoutWords(wordsOf(words, "かみ"), ["神"]).map((one) => one.written).slice(0, 2)); // ["紙", "髪"][ '紙', '髪' ]What it prints (run when this page was built)