DIRECTIONAL_MAP定数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Each directional word, in English or French, in lower case, to its abbreviation (northwest and nord-ouest to
NW and NO).
インポート
import { DIRECTIONAL_MAP } from "@johnmorrisdotca/address-plus";
定義
const DIRECTIONAL_MAP: Record<string, string> = {
east: "E",
north: "N",
northeast: "NE",
northwest: "NW",
south: "S",
southeast: "SE",
southwest: "SW",
west: "W",
e: "E",
n: "N",
ne: "NE",
nw: "NW",
s: "S",
se: "SE",
sw: "SW",
w: "W",
"e.": "E",
"n.": "N",
"n.e.": "NE",
"ne.": "NE",
"n.w.": "NW",
"nw.": "NW",
"s.": "S",
"s.e.": "SE",
"se.": "SE",
"s.w.": "SW",
"sw.": "SW",
"w.": "W",
"E.": "E",
"N.": "N",
"S.": "S",
"W.": "W",
"S.E.": "SE",
"S.W.": "SW",
"N.E.": "NE",
"N.W.": "NW",
est: "E",
nord: "N",
"nord-est": "NE",
"nord-ouest": "NO",
ouest: "O",
o: "O",
sud: "S",
"sud-est": "SE",
"sud-ouest": "SO",
"o.": "O",
"n.-o.": "NO",
"n.-e.": "NE",
"s.-o.": "SO",
"s.-e.": "SE",
"N.-O.": "NO",
"N.-E.": "NE",
"S.-O.": "SO",
"S.-E.": "SE",
}
例
import { DIRECTIONAL_MAP } from "@johnmorrisdotca/address-plus";
console.log(DIRECTIONAL_MAP["northwest"]);
// → "NW"NW出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。