csvCell関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One cell of CSV. Quoted when it holds a comma, a quote or a line break. A
cell that a spreadsheet would run as a formula (one starting with =, +,
-, @, a tab or a carriage return) is given a leading apostrophe, unless
it is simply a number, so that opening an export can never run anything.
インポート
import { csvCell } from "@johnmorrisdotca/korokoro";
定義
function csvCell(value: string | number): string
引数
| 名前 | 型 | 説明 |
|---|---|---|
value | string | number | The candidate face, value or name to check. |
戻り値
string
One cell of CSV. Quoted when it holds a comma, a quote or a line break. A cell that a spreadsheet would run as a formula (one starting with =, +, -, @, a tab or a carriage return) is given a leading apostrophe, unless it is simply a number, so that opening an export can never run anything.
例
import { csvCell } from "@johnmorrisdotca/korokoro";
console.log(csvCell("A quote: \" and a comma, here"));"A quote: "" and a comma, here"出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。