nameKeyfunction
A text folded to compare, as findName does: lower case, no accents, Greek letters spelt out and one space, a superscript as its digit; M 31, Messier 31 and m31 give m31, NGC 0224 gives ngc224, HR 2061 and hr2061 give hr2061.
Import it
import { nameKey } from "@johnmorrisdotca/hoshi-stars/names";
Also exported from: @johnmorrisdotca/hoshi-stars/names/named, @johnmorrisdotca/hoshi-stars/names/ngc-ic
Definition
function nameKey(text: string): string
Parameters
| Name | Type | Description |
|---|---|---|
text | string | Any text. |
Returns
string
The key.
Examples
import { nameKey } from "@johnmorrisdotca/hoshi-stars/names";
console.log(nameKey("Messier 31"), nameKey("α Ori"), nameKey("NGC 0224"));m31 alpha ori ngc224What it prints (run when this page was built)