Huge News!Announcing our $40M Series B led by Abstract Ventures.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.11 to 1.0.12

2

dist/index.js

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

"use strict";function t(t){const e=t.match(/([A-Z]+)(\d+)/);if(!e)return[-1,-1];const[,n,r]=e,s=n.split("").reduce(((t,e)=>26*t+e.charCodeAt(0)-65),0);return[parseInt(r)-1,s]}function e(e){const r=function(e){const n=Object.entries(e).filter((([t])=>t.match(/^[A-Z]+[0-9]+$/))),[r,s]=n.reduce((([e,n],[r])=>{const[s,l]=t(r);return[Math.max(e,s),Math.max(n,l)]}),[-1,-1]),l=Array(r+1).fill().map((()=>Array(s+1).fill("")));return n.forEach((([e,n])=>{const[r,s]=t(e);l[r][s]=n.v||""})),l}(e);return function(t){const e=[];let r=null;for(let s=0;s<t.length;s++){t[s].some((t=>""!==t))?r?r.end=s:r={start:s,end:s}:r&&(e.push(n(t,r)),r=null)}r&&e.push(n(t,r));return e.flatMap((t=>{const e=[];for(let n=0;n<t[0].length-1;n++)t.every((t=>""===t[n]))&&e.push(n);if(!e.length)return[t];const n=[];let r=0;for(const s of e){if(s>r){const e=t.map((t=>t.slice(r,s))).filter((t=>t.some((t=>""!==t))));e.length&&n.push(e)}r=s+1}if(r<t[0].length){const e=t.map((t=>t.slice(r))).filter((t=>t.some((t=>""!==t))));e.length&&n.push(e)}return n}))}(r)}function n(t,{start:e,end:n}){let r=1/0,s=-1;for(let l=e;l<=n;l++)for(let e=0;e<t[l].length;e++)""!==t[l][e]&&(r=Math.min(r,e),s=Math.max(s,e));return t.slice(e,n+1).map((t=>t.slice(r,s+1)))}var r={parse:t=>e(t)};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=[];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;
{
"name": "@libs-jd/xlsx-parse-table",
"description": "Modern Excel/XLSX parser and streaming capabilities",
"version": "1.0.11",
"version": "1.0.12",
"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