isCustomId関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
True for a string written as a custom flag's id, custom: and a slug; it says nothing of whether such a flag is registered (customFlag does).
インポート
import { isCustomId } from "@johnmorrisdotca/hata/custom";
定義
function isCustomId(value: unknown): boolean
引数
| 名前 | 型 | 説明 |
|---|---|---|
value | unknown | Anything. |
戻り値
boolean
true for "custom:harbour-fc", false for anything else, never throwing.
例
import { isCustomId } from "@johnmorrisdotca/hata/custom";
console.log(isCustomId("custom:harbour-fc")); // true
console.log(isCustomId("JP")); // false
console.log(isCustomId("org:eu")); // falsetrue
false
false出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。