xlsx-write-stream
Advanced tools
Comparing version 1.0.1-beta.4 to 1.0.1-beta.5
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1
60327
417
- Removedlodash@^4.17.4
- Removedlodash@4.17.21(transitive)