Socket
Socket
Sign inDemoInstall

@mosuke_mkii/csv-file

Package Overview
Dependencies
8
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "@mosuke_mkii/csv-file",
"version": "1.0.1",
"version": "1.0.2",
"description": "CSVファイルを操作するモジュール",

@@ -5,0 +5,0 @@ "main": "src/csv-file.js",

@@ -28,18 +28,27 @@ # CsvFile

// CSVファイルの新規作成とヘッダーの追加
const csvFile = new CsvFile({
headers: ['Name', 'Age', 'Gender'],
path: 'example.csv'
});
await csvFile.createOnlyHeader();
(async () => {
// CSVファイルの新規作成とヘッダーの追加
const csvFile = new CsvFile({
headers: ['Name', 'Age', 'Gender'],
path: 'example.csv'
});
await csvFile.createOnlyHeader();
// 既存のCSVファイルへの行の追加
await csvFile.append([
['John Doe', '30', 'Male'],
['Jane Doe', '25', 'Female']
]);
// 既存のCSVファイルへの行の追加
await csvFile.append([
['John Doe', '30', 'Male'],
['Jane Doe', '25', 'Female']
]);
// CSVファイルの読み込みとオブジェクトへの変換
const rows = await csvFile.convertCsvToArray();
console.log(rows);
// CSVファイルの読み込みとオブジェクトへの変換
const rows = await csvFile.convertCsvToArray();
console.log(rows);
/*
output:
[
{ Name: 'John Doe', Age: '30', Gender: 'Male' },
{ Name: 'Jane Doe', Age: '25', Gender: 'Female' }
]
*/
})();
```

@@ -46,0 +55,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc