exampleCredit関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The credit an example carries, as a line to show with it: the Tatoeba sentence, the authors of the Japanese and of the English, and the licence.
インポート
import { exampleCredit } from "@johnmorrisdotca/jisho/examples";
定義
function exampleCredit(example: Pick<Example, "credit">): string
引数
| 名前 | 型 | 説明 |
|---|---|---|
example | Pick<Example, "credit"> | An example. |
戻り値
string
A line such as "Tatoeba #162365, Japanese by alice, English by bob (CC BY 2.0 FR)".
例
import { exampleCredit, readExamples } from "@johnmorrisdotca/jisho/examples";
const [one] = readExamples("0000z\t1¦走る¦I run.¦¦3fk¦alice¦bob¦走る").examples;
console.log(one === undefined ? "" : exampleCredit(one)); // Tatoeba #4448, Japanese by alice, English by bob (CC BY 2.0 FR)Tatoeba #4448, Japanese by alice, English by bob (CC BY 2.0 FR)出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。