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

cheerio-tableparser

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cheerio-tableparser - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

2

package.json
{
"name": "cheerio-tableparser",
"version": "0.0.5",
"version": "0.0.6",
"description": "table parser plugin for cheerio",

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

@@ -36,9 +36,9 @@ # cheerio-tableparser

## Features
__Easy to use:__
You just need cheerio and cheerio-tablerparser to parse complex tables. As easy as JSON.parse(). You get array of columns.
⏎ __Easy to use:__
You just need cheerio and cheerio-tablerparser to parse complex tables, as easy as JSON.parse(). You get array of columns.
__Configurable:__
Cheerio-tableparser can duplicate empty cells in rows or coloumns or even both. Result can be text or html.
⚙ __Configurable:__
Cheerio-tableparser can duplicate empty cells in rows or columns or even both. Result can be text or html.
__Fast:__
ϟ __Fast:__
As fast as cheerio is.

@@ -48,3 +48,3 @@

Cheerio-tableparser used only for tables created with “table” tag. In other unusual situations you should use other solutions. For example css or div formated text looks like table is not affordable.
Cheerio-tableparser used only for tables created with “table” tag. In other unusual situations you should use other solutions. For example css formated text looks like table is not affordable.

@@ -70,17 +70,16 @@ ## How it works

### Example table:
```
|-------------------|
| A | B | C | D | E |
|-------------------|
| | 2 | 3 | 4 | 5 |
| |---------------|
| | | 4b| 5b|
| | 2b |-------|
| 1 | | | 5c|
| |-------| 4c|---|
| | | 3d| | 5d|
| | 2d|-----------|
| | | 3e| 4e| 5e|
|-------------------|
```
|-------------------|
| A | B | C | D | E |
|-------------------|
| | 2 | 3 | 4 | 5 |
| |---------------|
| | | 4b| 5b|
| | 2b |-------|
| 1 | | | 5c|
| |-------| 4c|---|
| | | 3d| | 5d|
| | 2d|-----------|
| | | 3e| 4e| 5e|
|-------------------|
#### Load data and add plugin

@@ -102,2 +101,14 @@ ```js

#### Copy empty cells from data in columns
```js
var data = $("#complex").parsetable(false, true, false);
//data = >
//[ [ 'A', '1', '1', '1', '1', '1' ],
// [ 'B', '2', '2b', '2b', '2d', '2d' ],
// [ 'C', '3', '', '', '3d', '3e' ],
// [ 'D', '4', '4b', '4c', '4c', '4e' ],
// [ 'E', '5', '5b', '5c', '5d', '5e' ] ]
```
#### Copy empty cells from data in rows

@@ -115,14 +126,2 @@

#### Copy empty cells from data in columns
```js
var data = $("#complex").parsetable(false, true, false);
//data = >
//[ [ 'A', '1', '1', '1', '1', '1' ],
// [ 'B', '2', '2b', '2b', '2d', '2d' ],
// [ 'C', '3', '', '', '3d', '3e' ],
// [ 'D', '4', '4b', '4c', '4c', '4e' ],
// [ 'E', '5', '5b', '5c', '5d', '5e' ] ]
```
#### Copy empty cells from data in rows AND columns

@@ -151,10 +150,10 @@

### Example HTML table:
```
|-------------------------------------------------------------------|
| <strong>A</strong> | <strong>B</strong> |
|-------------------------------------------------------------------|
| <div class='table-text'>1</div> | <div class='table-text'>2</div> |
|-------------------------------------------------------------------|
```
|-------------------------------------------------------------------|
| <strong>A</strong> | <strong>B</strong> |
|-------------------------------------------------------------------|
| <div class='table-text'>1</div> | <div class='table-text'>2</div> |
|-------------------------------------------------------------------|
#### Load data and add plugin

@@ -161,0 +160,0 @@ ```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