cheerio-tableparser
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "cheerio-tableparser", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "The tables parser plugin for cheerio", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -21,3 +21,3 @@ # cheerio-tableparser | ||
| 1a | | | 5c | | ||
| |-----------| 4c |---- | | ||
| |-----------| 4c |-----| | ||
| | | 3d | | 5d | | ||
@@ -43,3 +43,3 @@ | | 2d |-----------------| | ||
cheerioTableparser($); | ||
var data = $("#complex").parsetable(true, true, false); | ||
var data = $("#complex").parsetable(true, true, true); | ||
//data = > | ||
@@ -179,2 +179,13 @@ //[ [ 'A', '1a', '1a', '1a', '1a', '1a' ], | ||
// [ '<strong>B</strong>', '<div class="table-text">2a</div>' ] ] | ||
//To make jquery object from string use $('<div>' + data[0][0]+ '</div>'); | ||
//additional "div" needed if data[0][0] is not valid html string. | ||
//Example: | ||
var strong = $('<div>' + data[0][0] + '</div>').find('strong').text(); | ||
//strong = > 'A' | ||
var tableText = $('<div>' + data[0][1] + '</div>').find('.table-text').text(); | ||
//tableText = > '1a' | ||
``` | ||
@@ -181,0 +192,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11160
224