@gatekeeper_technology/excel-utils 1.0.5 → 1.0.6

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,6 +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
7
  ### [1.00.05] 18-03-2022
5
8
  ### Changed
6
9
  - Fixed import bug
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
- const workbookCreator = require("./workbook_creator.js");
2
- const utils = require("./utils.js");
1
+ const utils = require("./utils");
2
+ const WorkbookCreator = require("./workbook_creator");
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.5",
3
+ "version": "1.0.6",
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.js");
1
+ const WorkbookCreator = require("./workbook_creator");
2
2
 
3
3
  async function generateXLSXBuffer(data, sheet_name) {
4
- const workbook_creator = new WorkbookCreator();
4
+ const workbook_creator = new WorkbookCreator.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();
16
+ const workbook_creator = new WorkbookCreator.WorkbookCreator();
17
17
  let _workbook = await workbook_creator.loadXLSX(data);
18
18
  let _worksheet = _workbook.worksheets[0];
19
19
 
@@ -25,7 +25,7 @@ async function getWorkbookData(data) {
25
25
  return rows_data;
26
26
  }
27
27
 
28
- modules.export = {
28
+ module.exports = {
29
29
  generateXLSXBuffer,
30
30
  getWorkbookData
31
- }
31
+ }
@@ -1,9 +1,7 @@
1
1
  const ExcelJS = require("exceljs");
2
2
 
3
3
  class WorkbookCreator {
4
- constructor() {
5
-
6
- }
4
+ constructor() { }
7
5
  /**
8
6
  * Create a new workbook
9
7
  * @returns {ExcelJS.Workbook} The created workbook
@@ -125,3 +123,7 @@ class WorkbookCreator {
125
123
  }
126
124
 
127
125
  }
126
+
127
+ module.exports = {
128
+ WorkbookCreator
129
+ }