@gatekeeper_technology/excel-utils 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # Gatekeeper's Excel Utils
2
2
 
3
3
  ## Changelog
4
- ### [1.00.06] 18-03-2022
5
- ### Changed
6
- - Updated the structure of the package.
4
+ ### [1.00.07] 24-08-2022
5
+ ### Fixed
6
+ - Fixed bug where workbook_creator class was not exported properly.
7
7
  ### [1.00.05] 18-03-2022
8
8
  ### Changed
9
9
  - Fixed import bug
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
- const utils = require("./utils");
2
- const WorkbookCreator = require("./workbook_creator");
1
+ const workbookCreator = require("./workbook_creator.js");
2
+ const utils = require("./utils.js");
3
3
 
4
4
  module.exports = {
5
5
  utils,
6
- WorkbookCreator
6
+ workbookCreator
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gatekeeper_technology/excel-utils",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Gatekeeper's excel Utils - shared in NPM",
5
5
  "author": "David Holtzhausen",
6
6
  "main": "index.js",
package/utils.js CHANGED
@@ -1,7 +1,7 @@
1
- const WorkbookCreator = require("./workbook_creator");
1
+ const WorkbookCreator = require("./workbook_creator.js");
2
2
 
3
3
  async function generateXLSXBuffer(data, sheet_name) {
4
- const workbook_creator = new WorkbookCreator.WorkbookCreator();
4
+ const workbook_creator = new WorkbookCreator();
5
5
  let _workbook = workbook_creator.createWorkbook();
6
6
  let _worksheet = workbook_creator.createWorksheet(_workbook, sheet_name);
7
7
  workbook_creator.loadDataIntoWorksheet(_worksheet, data);
@@ -13,7 +13,7 @@ async function generateXLSXBuffer(data, sheet_name) {
13
13
  * Returns an array of all
14
14
  */
15
15
  async function getWorkbookData(data) {
16
- const workbook_creator = new WorkbookCreator.WorkbookCreator();
16
+ const workbook_creator = new WorkbookCreator();
17
17
  let _workbook = await workbook_creator.loadXLSX(data);
18
18
  let _worksheet = _workbook.worksheets[0];
19
19
 
@@ -28,4 +28,4 @@ async function getWorkbookData(data) {
28
28
  module.exports = {
29
29
  generateXLSXBuffer,
30
30
  getWorkbookData
31
- }
31
+ }
@@ -1,7 +1,9 @@
1
1
  const ExcelJS = require("exceljs");
2
2
 
3
- class WorkbookCreator {
4
- constructor() { }
3
+ let WorkbookCreator = class {
4
+ constructor() {
5
+
6
+ }
5
7
  /**
6
8
  * Create a new workbook
7
9
  * @returns {ExcelJS.Workbook} The created workbook
@@ -124,6 +126,4 @@ class WorkbookCreator {
124
126
 
125
127
  }
126
128
 
127
- module.exports = {
128
- WorkbookCreator
129
- }
129
+ module.exports = WorkbookCreator;