goods-exporter
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -522,3 +522,3 @@ interface Product { | ||
abstract fileExtension: Extension; | ||
abstract format(products: Product[], categories?: Category[], option?: FormatterOptions): Promise<string>; | ||
abstract format(products: Product[], categories?: Category[], option?: FormatterOptions): Promise<Buffer | string>; | ||
} | ||
@@ -566,3 +566,3 @@ interface FormatterOptions { | ||
fileExtension: Extension; | ||
format(products: Product[], categories?: Category[], option?: FormatterOptions): Promise<string>; | ||
format(products: Product[], categories?: Category[], option?: FormatterOptions): Promise<Buffer>; | ||
} | ||
@@ -581,3 +581,3 @@ | ||
fileExtension: Extension; | ||
format(products: Product[], categories?: Category[], option?: FormatterOptions): Promise<string>; | ||
format(products: Product[], categories?: Category[], option?: FormatterOptions): Promise<Buffer>; | ||
} | ||
@@ -588,3 +588,3 @@ | ||
fileExtension: Extension; | ||
format(products: Product[], categories?: Category[], option?: FormatterOptions): Promise<string>; | ||
format(products: Product[], categories?: Category[], option?: FormatterOptions): Promise<Buffer>; | ||
} | ||
@@ -591,0 +591,0 @@ |
@@ -14,3 +14,3 @@ { | ||
"name": "goods-exporter", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "A versatile JavaScript library for exporting goods data to various formats such as YML, CSV, and Excel. Simplify data export tasks with ease.", | ||
@@ -31,3 +31,3 @@ "main": "./dist/cjs/index.cjs", | ||
"test": "vitest --typecheck", | ||
"lint": "eslint --ext .ts,.tsx ./{src,test}/ --fix", | ||
"lint": "eslint --ext .ts --fix", | ||
"test-ui": "vitest --ui", | ||
@@ -34,0 +34,0 @@ "coverage": "vitest run --coverage" |
# goods-exporter | ||
[![npm version](https://badge.fury.io/js/goods-exporter.svg)](https://badge.fury.io/js/goods-exporter) | ||
![License](https://img.shields.io/badge/license-MIT-green) | ||
[![License](https://img.shields.io/badge/license-MIT-green)](https://github.com/Bagi4-source/goods-converter/blob/main/LICENSE) | ||
@@ -40,3 +40,3 @@ A versatile JavaScript library for exporting goods data to various formats such as YML, CSV, and Excel. Simplify data | ||
```typescript | ||
import { GoodsExporter, Product, Category, YMLFormatter } from '../src' | ||
import { GoodsExporter, Product, Category, Formatters } from '../src' | ||
@@ -74,3 +74,3 @@ // Create an instance of the GoodsExporter class. | ||
// Set the formatter for exporting data to YML. | ||
exporter.setFormatter(new YMLFormatter()) // or your own Formatter; | ||
exporter.setFormatter(new Formatters.YMLFormatter()) // or your own Formatter; | ||
@@ -77,0 +77,0 @@ // Set transformers based on the specified keys. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
170194
8
1389