Socket
Socket
Sign inDemoInstall

node-xlsx

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-xlsx - npm Package Compare versions

Comparing version 0.7.0 to 0.7.1

8

lib/helpers.js

@@ -32,2 +32,4 @@ 'use strict';

var buildSheetFromMatrix = function buildSheetFromMatrix(data) {
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
var workSheet = {};

@@ -63,2 +65,8 @@ var range = { s: { c: 1e7, r: 1e7 }, e: { c: 0, r: 0 } };

}
if (options['!cols']) {
workSheet['!cols'] = options['!cols'];
}
if (options['!merges']) {
workSheet['!merges'] = options['!merges'];
}
return workSheet;

@@ -65,0 +73,0 @@ };

2

lib/index.js

@@ -42,3 +42,3 @@ 'use strict';

var name = worksheet.name || 'Sheet';
var data = (0, _helpers.buildSheetFromMatrix)(worksheet.data || []);
var data = (0, _helpers.buildSheetFromMatrix)(worksheet.data || [], options);
workBook.SheetNames.push(name);

@@ -45,0 +45,0 @@ workBook.Sheets[name] = data;

{
"name": "node-xlsx",
"author": "Olivier Louvignes <olivier@mg-crea.com>",
"version": "0.7.0",
"version": "0.7.1",
"description": "NodeJS Excel files parser & builder",

@@ -6,0 +6,0 @@ "main": "lib/index.js",

@@ -14,3 +14,3 @@ import XLSX from 'xlsx';

const buildSheetFromMatrix = (data) => {
const buildSheetFromMatrix = (data, options = {}) => {
const workSheet = {};

@@ -46,2 +46,8 @@ const range = {s: {c: 1e7, r: 1e7}, e: {c: 0, r: 0}};

}
if (options['!cols']) {
workSheet['!cols'] = options['!cols'];
}
if (options['!merges']) {
workSheet['!merges'] = options['!merges'];
}
return workSheet;

@@ -48,0 +54,0 @@ };

@@ -23,3 +23,3 @@

const name = worksheet.name || 'Sheet';
const data = buildSheetFromMatrix(worksheet.data || []);
const data = buildSheetFromMatrix(worksheet.data || [], options);
workBook.SheetNames.push(name);

@@ -26,0 +26,0 @@ workBook.Sheets[name] = data;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc