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.9.0 to 0.10.0

test/fixtures/dateField.json

4

lib/helpers.js

@@ -39,4 +39,4 @@ 'use strict';

for (var R = 0; R !== data.length; ++R) {
for (var C = 0; C !== data[R].length; ++C) {
for (var R = 0; R !== data.length; R += 1) {
for (var C = 0; C !== data[R].length; C += 1) {
if (!Array.isArray(data[R])) throw new Error(R + 'th row data is not array');

@@ -43,0 +43,0 @@

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

var sheet = workSheet.Sheets[name];
return { name: name, data: _xlsx2.default.utils.sheet_to_json(sheet, { header: 1, raw: true }) };
return { name: name, data: _xlsx2.default.utils.sheet_to_json(sheet, { header: 1, raw: options.raw !== false }) };
});

@@ -30,0 +30,0 @@ }

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

@@ -9,7 +9,7 @@ "main": "lib/index.js",

"start": "npm run test:watch",
"test": "mocha",
"test": "NODE_ENV=test jest --runInBand",
"test:watch": "npm run test -- --watch",
"test:coverage": "nyc --reporter=lcov npm test -- --reporter dot && nyc report",
"lint": "eslint src/",
"compile": "rimraf lib/*; babel src/ -d lib/ -s",
"test:coverage": "npm run test -- --coverage",
"lint": "NODE_ENV=test eslint src/",
"compile": "rimraf lib/*; NODE_ENV=production babel src/ -d lib/ -s",
"compile:watch": "npm run compile -- -w",

@@ -21,21 +21,20 @@ "prepublish": "npm run compile"

"dependencies": {
"xlsx": "^0.9.2"
"xlsx": "^0.10.8"
},
"devDependencies": {
"babel-cli": "^6.16.0",
"babel-eslint": "^7.0.0",
"babel-plugin-transform-class-properties": "^6.16.0",
"babel-plugin-transform-function-bind": "^6.8.0",
"babel-plugin-transform-object-rest-spread": "^6.16.0",
"babel-preset-es2015": "^6.16.0",
"babel-register": "^6.16.3",
"codeclimate-test-reporter": "^0.4.0",
"eslint": "^3.8.1",
"eslint-config-airbnb-base": "^9.0.0",
"eslint-plugin-import": "^2.0.1",
"eslint-plugin-jsx-a11y": "^2.2.3",
"babel-cli": "^6.24.1",
"babel-eslint": "^7.2.3",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-function-bind": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-preset-es2015": "^6.24.1",
"babel-register": "^6.24.1",
"codacy-coverage": "^2.0.2",
"debug-utils": "^0.2.1",
"eslint": "^4.3.0",
"eslint-config-airbnb-base": "^11.2.0",
"eslint-plugin-import": "^2.7.0",
"expect": "^1.20.2",
"mocha": "^3.1.2",
"nyc": "^8.3.1",
"rimraf": "^2.5.4"
"jest": "^20.0.4",
"rimraf": "^2.6.1"
},

@@ -48,3 +47,6 @@ "keywords": [

"xls"
]
],
"jest": {
"testEnvironment": "node"
}
}

@@ -20,4 +20,4 @@ import XLSX from 'xlsx';

for (let R = 0; R !== data.length; ++R) {
for (let C = 0; C !== data[R].length; ++C) {
for (let R = 0; R !== data.length; R += 1) {
for (let C = 0; C !== data[R].length; C += 1) {
if (!Array.isArray(data[R])) throw new Error(`${R}th row data is not array`);

@@ -24,0 +24,0 @@

@@ -10,3 +10,3 @@

const sheet = workSheet.Sheets[name];
return {name, data: XLSX.utils.sheet_to_json(sheet, {header: 1, raw: true})};
return {name, data: XLSX.utils.sheet_to_json(sheet, {header: 1, raw: options.raw !== false})};
});

@@ -13,0 +13,0 @@ }

@@ -21,2 +21,8 @@ import fs from 'fs';

});
it('should properly parse an XLSX file with date field', () => {
const expected = JSON.parse(fs.readFileSync(`${__dirname}/../fixtures/dateField.json`));
const file = `${__dirname}/../fixtures/dateField.xlsx`;
const result = JSON.parse(JSON.stringify(parseXSLX(file, {raw: false})));
expect(result).toEqual(expected);
});
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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