From 350823ec4094287b7c48c3b622b8d563da314884 Mon Sep 17 00:00:00 2001 From: Sambo Chea Date: Tue, 30 Mar 2021 09:18:01 +0700 Subject: [PATCH] Updated and add readme with custom props --- README.md | 13 +++++++++++++ index.js | 10 +--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index aff9367..5168fd3 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,19 @@ docker run -v /home/sombochea/excel2json:/app/data -e APP_NAME="EXCEL 2 JSON" -e } ``` +# Custom Function Props +```javascript +{ + mappings: [ + { + "dataIndex": "Name", + "label": "Name" + } + ], + saveToOutput: false +} +``` + # Environment ```env diff --git a/index.js b/index.js index ffd8463..4bca17e 100644 --- a/index.js +++ b/index.js @@ -2,15 +2,7 @@ const excel2json = require("./excel2json"); // called function export excel2json -const exported = excel2json({ - mappings: [ - { - "dataIndex": "Name", - "label": "Name" - } - ], - "saveToOutput": false -}); +const exported = excel2json(); // output data from exported console.log("Output =>\n", exported);