Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xlsx-write-stream

Package Overview
Dependencies
Maintainers
10
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xlsx-write-stream - npm Package Compare versions

Comparing version 1.0.1-beta.4 to 1.0.1-beta.5

9

dist/templates/cell.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const lodash_1 = require("lodash");
const utils_1 = require("../utils");

@@ -10,3 +9,3 @@ // 25569 = Days between 1970/01/01 and 1900/01/01 (min date in Windows Excel)

function default_1(value, cell, shouldFormat) {
if ((0, lodash_1.isDate)(value)) {
if (value instanceof Date) {
const unixTimestamp = value.getTime();

@@ -17,9 +16,9 @@ const officeTimestamp = (unixTimestamp / MILLISECONDS_IN_ONE_DAY) + OFFSET_DAYS;

}
else if ((0, lodash_1.isString)(value)) {
else if (typeof value === 'string') {
return `<c r="${cell}" t="inlineStr"><is><t>${(0, utils_1.sanitize)(value)}</t></is></c>`;
}
else if ((0, lodash_1.isBoolean)(value)) {
else if (typeof value === 'boolean') {
return `<c r="${cell}" t="inlineStr"><is><t>${value}</t></is></c>`;
}
else if ((0, lodash_1.isNumber)(value)) {
else if (typeof value === 'number') {
const maybeFormat = shouldFormat && (0, utils_1.getNumberFormat)(value);

@@ -26,0 +25,0 @@ return `<c r="${cell}" t="n"${maybeFormat ? ` s="${maybeFormat}"` : ''}><v>${value}</v></c>`;

{
"name": "xlsx-write-stream",
"version": "1.0.1-beta.4",
"version": "1.0.1-beta.5",
"description": "XLSX stream writer",

@@ -43,4 +43,3 @@ "main": "dist/index.js",

"dependencies": {
"archiver": "^5.3.0",
"lodash": "^4.17.4"
"archiver": "^5.3.0"
},

@@ -47,0 +46,0 @@ "devDependencies": {

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