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

tabletojson

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tabletojson - npm Package Compare versions

Comparing version 0.9.4 to 0.9.5

20

lib/tabletojson.js
'use strict';
const AbstractToJson = require('pagetojson').AbstractToJson;
const cheerio = require('cheerio');
const request = require('request');
class tabletojson {
class tabletojson extends AbstractToJson {
/**

@@ -180,3 +180,3 @@ * Static conversion of a given HTML Page

// Use a callback (if passed)
const html = await tabletojson.fetchUrl(url, requestOptions);
const html = await AbstractToJson.fetchUrl(url, requestOptions);
return callback.call(this, tabletojson.convert(html, options));

@@ -188,3 +188,3 @@ } else if (typeof arg1 === 'function') {

// Use a callback (if passed)
const html = await tabletojson.fetchUrl(url);
const html = await AbstractToJson.fetchUrl(url);
return callback.call(this, tabletojson.convert(html, options));

@@ -197,3 +197,3 @@ } else {

requestOptions = options.request || {};
const html = await tabletojson.fetchUrl(url, requestOptions);
const html = await AbstractToJson.fetchUrl(url, requestOptions);
return tabletojson.convert(html, options);

@@ -203,12 +203,2 @@ }

static fetchUrl(url, options) {
return new Promise((resolve, reject) => {
request(url, options, function(error, response, body) {
if (error) {
reject(error);
}
resolve(body);
});
});
}
}

@@ -215,0 +205,0 @@

@@ -9,3 +9,3 @@ {

"description": "Converts HTML tables to JSON objects",
"version": "0.9.4",
"version": "0.9.5",
"main": "./lib/tabletojson.js",

@@ -22,7 +22,7 @@ "keywords": [

"type": "git",
"url": "git://github.com/iaincollins/tabletojson.git"
"url": "git://github.com/maugenst/tabletojson.git"
},
"dependencies": {
"cheerio": "^1.0.0-rc.2",
"request": "^2.85.0"
"pagetojson": "^0.0.2"
},

@@ -41,4 +41,4 @@ "engines": {

"mocha-lcov-reporter": "^1.3.0",
"nyc": "^11.7.1",
"prettier": "^1.12.1",
"nyc": "^11.9.0",
"prettier": "^1.13.5",
"should": "^13.2.1"

@@ -45,0 +45,0 @@ },

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