Updated and add readme with custom props
This commit is contained in:
parent
9fd46088d5
commit
350823ec40
13
README.md
13
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
|
||||
|
10
index.js
10
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);
|
||||
|
Loading…
Reference in New Issue
Block a user