diff --git a/README.md b/README.md index 4c592a0..005fe32 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,38 @@ -# xlsx-to-csv -Fastest xlsx to csv converter based on Rust package [Calamine](https://github.com/tafia/calamine). It faster than [SheetJs][https://github.com/SheetJS/sheetjs] at least 3 times and eats 5 times smaller memory, +# XLSX-to-CSV Converter written in Rust -### Install -`npm install xlsx-to-csv` +The ultra-fast XLSX to CSV converter package, built leveraging the power of the Rust package - [Calamine](https://github.com/tafia/calamine). +It outperforms [SheetJs](https://github.com/SheetJS/sheetjs), +delivering **at least 3 times the speed** and **using only one-fifth of the memory**, making it ideal for processing large XLSX files. + +## Installation + +This package is available via NPM. To install, simply run the following command: + +``` +npm install xlsx-to-csv +``` + +## Usage + +The package accepts both .xlsx and .csv file types. Here's a quick example illustrating the usage: -### Usage -It accepts .xlsx and .csv file types. ```typescript import fs from 'fs' import { convertFile } from 'xlsx-to-csv' +// Convert your file const { filePath } = convertFile('./file.xlsx') + +// Output the path of the converted file console.log(filePath) +// Read the converted file const csvData = fs.readFileSync(filePath).toString() + +// Display the data console.log(csvData) ``` -### Licence -MIT \ No newline at end of file +## License + +This project is licensed under the MIT License, providing a high degree of freedom for both personal and commercial use. For more details, please refer to the LICENSE file in the repository. diff --git a/package-lock.json b/package-lock.json index b44b730..107aae5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "xlsx-to-csv", - "version": "1.0.0", + "version": "1.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "xlsx-to-csv", - "version": "1.0.0", + "version": "1.0.1", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index d9d242e..ef875f1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "xlsx-to-csv", - "version": "1.0.1", - "description": "Fastest xlsx to csv converter", + "version": "1.0.2", + "description": "Ultra-fast XLSX to CSV converter", "main": "dist/index.js", "bin": { "xlsx-to-csv": "./dist/npm/run.js" diff --git a/src/npm/get-binary.ts b/src/npm/get-binary.ts index e8f9c5a..fdbad24 100644 --- a/src/npm/get-binary.ts +++ b/src/npm/get-binary.ts @@ -4,7 +4,7 @@ import { spawnSync } from 'child_process' const NAME = 'xlsx-to-csv' -const VERSION = '1.0.1' +const VERSION = '1.0.2' function getPlatform() { const type = os.type() @@ -14,7 +14,7 @@ function getPlatform() { if ( type === 'Windows_NT' ) return 'win32' if ( type === 'Linux' && arch === 'x64' ) return 'linux' if ( type === 'Darwin' && arch === 'x64' ) return 'macos-x86_64' - if ( type === 'Darwin' && arch === 'arm64' ) return 'aarch64' + if ( type === 'Darwin' && arch === 'arm64' ) return 'macos-aarch64' throw new Error(`Unsupported platform: ${ type } ${ arch }`) }