New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@libs-jd/xlsx-parse-table

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libs-jd/xlsx-parse-table - npm Package Compare versions

Comparing version 1.0.12 to 1.0.13

2

dist/index.js

@@ -1,1 +0,1 @@

"use strict";function n(n){if(!n.length||!n[0].length)return[];const t=function(n){const t=Array(n.length).fill().map((()=>Array(n[0].length).fill(!1))),o=[];function r(o,e,l){if(!(o<0||o>=n.length||e<0||e>=n[0].length||t[o][e]||""===n[o][e])){t[o][e]=!0,l.cells.push([o,e]),l.bounds={minRow:Math.min(l.bounds.minRow,o),maxRow:Math.max(l.bounds.maxRow,o),minCol:Math.min(l.bounds.minCol,e),maxCol:Math.max(l.bounds.maxCol,e)};for(let n=-1;n<=1;n++)for(let t=-1;t<=1;t++)r(o+n,e+t,l)}}for(let e=0;e<n.length;e++)for(let l=0;l<n[0].length;l++)if(!t[e][l]&&""!==n[e][l]){const n={cells:[],bounds:{minRow:1/0,maxRow:-1/0,minCol:1/0,maxCol:-1/0}};r(e,l,n),o.push(n)}return o}(n);return t.map((t=>function(n,t){const{minRow:o,maxRow:r,minCol:e,maxCol:l}=t.bounds,a=[];for(let t=o;t<=r;t++){const o=[];for(let r=e;r<=l;r++)o.push(n[t][r]);a.push(o)}return a}(n,t)))}function t(n){const t=n.match(/([A-Z]+)(\d+)/);if(!t)return[-1,-1];const[,o,r]=t,e=o.split("").reduce(((n,t)=>26*n+t.charCodeAt(0)-65),0);return[parseInt(r)-1,e]}function o(o){const r=function(n){const o=Object.entries(n).filter((([n])=>n.match(/^[A-Z]+[0-9]+$/))),[r,e]=o.reduce((([n,o],[r])=>{const[e,l]=t(r);return[Math.max(n,e),Math.max(o,l)]}),[-1,-1]),l=Array(r+1).fill().map((()=>Array(e+1).fill("")));return o.forEach((([n,o])=>{const[r,e]=t(n);l[r][e]=o.v||""})),l}(o);return n(r)}var r={parse:n=>o(n)};module.exports=r;
"use strict";function n(n){if(!n.length||!n[0].length)return[];const t=function(n){const t=Array(n.length).fill().map((()=>Array(n[0].length).fill(!1))),o=[],r=[[-1,-1],[-1,0],[-1,1],[0,-1],[0,1],[1,-1],[1,0],[1,1]];function e(o,e){const l={cells:[],bounds:{minRow:1/0,maxRow:-1/0,minCol:1/0,maxCol:-1/0}},s=[[o,e]];for(;s.length>0;){const[o,e]=s.shift();if(!(o<0||o>=n.length||e<0||e>=n[0].length||t[o][e]||""===n[o][e])){t[o][e]=!0,l.cells.push([o,e]),l.bounds={minRow:Math.min(l.bounds.minRow,o),maxRow:Math.max(l.bounds.maxRow,o),minCol:Math.min(l.bounds.minCol,e),maxCol:Math.max(l.bounds.maxCol,e)};for(const[n,t]of r)s.push([o+n,e+t])}}return l}for(let r=0;r<n.length;r++)for(let l=0;l<n[0].length;l++)if(!t[r][l]&&""!==n[r][l]){const n=e(r,l);o.push(n)}return o}(n);return t.map((t=>function(n,t){const{minRow:o,maxRow:r,minCol:e,maxCol:l}=t.bounds,s=[];for(let t=o;t<=r;t++){const o=[];for(let r=e;r<=l;r++)o.push(n[t][r]);s.push(o)}return s}(n,t)))}function t(n){const t=n.match(/([A-Z]+)(\d+)/);if(!t)return[-1,-1];const[,o,r]=t,e=o.split("").reduce(((n,t)=>26*n+t.charCodeAt(0)-65),0);return[parseInt(r)-1,e]}function o(o){const r=function(n){const o=Object.entries(n).filter((([n])=>n.match(/^[A-Z]+[0-9]+$/))),[r,e]=o.reduce((([n,o],[r])=>{const[e,l]=t(r);return[Math.max(n,e),Math.max(o,l)]}),[-1,-1]),l=Array(r+1).fill().map((()=>Array(e+1).fill("")));return o.forEach((([n,o])=>{const[r,e]=t(n);l[r][e]=o.v||""})),l}(o);return n(r)}var r={parse:n=>o(n)};module.exports=r;
{
"name": "@libs-jd/xlsx-parse-table",
"description": "Modern Excel/XLSX parser and streaming capabilities",
"version": "1.0.12",
"version": "1.0.13",
"homepage": "https://github.com/jeet-dhandha/xlsx-parse-table",

@@ -6,0 +6,0 @@ "author": "Jeet Dhandha",

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