Socket
Socket
Sign inDemoInstall

js-downloadexcel

Package Overview
Dependencies
10
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.4 to 0.0.5

19

index.js

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

exports.getColorPosition = (json, cb, regEx) => {
exports.setColorPosition = (json, cb, regEx) => {
let temp = json[getMaxLenObj(json)], keyMap = [], newArr = [{}]

@@ -156,8 +156,15 @@ for (var k in temp) {

newArr = newArr.concat(json)
let arr = newArr.map((v, i) => keyMap.map((k, j) => Object.assign({}, {
v: v[k],
position: regEx.test(v[k]) ? (j > 25 ? getCharCol(j) : String.fromCharCode(65 + j)) + (i + 1) : '',
...cb(v[k])
}))).reduce((prev, next) => prev.concat(next))
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))
return arr
}
{
"name": "js-downloadexcel",
"version": "0.0.4",
"version": "0.0.5",
"description": "下载excel",

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc