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

js-downloadexcel

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-downloadexcel - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

20

index.js

@@ -70,3 +70,3 @@ // import XLSX from "js-xlsxstyle"

val.fontSize && (s.font.sz = val.fontSize)
s.font.bold = val.bold
s.font.bold = val.isBold
val.borderColor && (s.border = {

@@ -149,3 +149,3 @@ right: { color: { rgb: val.borderColor } },

exports.setColorPosition = (json, cb, regEx) => {
exports.setColorPosition = (json, regEx, { color = "000000", backgroundColor = 'ffffff', fontSize = '14', isBold = false, borderColor = '' }) => {
let temp = json[getMaxLenObj(json)], keyMap = [], newArr = [{}]

@@ -157,15 +157,7 @@ for (var k in temp) {

newArr = newArr.concat(json)
let arr = newArr.map((v, i) => keyMap.map((k, j) => {
let obj = cb(v[k])
return obj ? Object.assign({}, {
v: v[k],
position: regEx.test(v[k]) ? (j > 25 ? getCharCol(j) : String.fromCharCode(65 + j)) + (i + 1) : '',
...obj
}) : Object.assign({}, {
v: v[k],
position: regEx.test(v[k]) ? (j > 25 ? getCharCol(j) : String.fromCharCode(65 + j)) + (i + 1) : '',
})
}
)).reduce((prev, next) => prev.concat(next))
let arr = newArr.map((v, i) => keyMap.map((k, j) => Object.assign({}, {
v: v[k], bold: isBold, color, backgroundColor, fontSize, borderColor,
position: regEx.test(v[k]) ? (j > 25 ? getCharCol(j) : String.fromCharCode(65 + j)) + (i + 1) : '',
}))).reduce((prev, next) => prev.concat(next))
return arr
}
{
"name": "js-downloadexcel",
"version": "0.0.5",
"version": "0.0.6",
"description": "下载excel",

@@ -5,0 +5,0 @@ "main": "index.js",

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