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

thresher

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thresher - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

6

lib/dependencies.js

@@ -7,4 +7,5 @@ var deps = module.exports;

deps.getbinpath = function(module) {
var modpath = require.resolve(module).split('/');
var phantomidx = modpath.indexOf(module);
log.debug('function getbinpath: ' + module);
var modpath = require.resolve('shelljs').split('/');
var phantomidx = modpath.indexOf('shelljs');
var binpath = modpath.slice(0, phantomidx);

@@ -14,3 +15,4 @@ binpath.push('.bin');

binpath = binpath.join('/');
log.debug('path for module :' + module + ': ' + binpath);
return(binpath);
};
var thresher = module.exports;
var winston = require('winston');
log = new (winston.Logger)({
transports: [
new (winston.transports.Console)({ level: 'info' })
]
});
log.cli();
thresher.deps = require('./dependencies.js');

@@ -4,0 +12,0 @@ thresher.dom = require('./dom.js');

require('shelljs/global');
var deps = require('./dependencies.js');
env['PHANTOMJS_EXECUTABLE'] = deps.getbinpath('phantomjs');
// SpookyJS provides our bridge to CasperJS and PhantomJS

@@ -35,2 +33,3 @@ var Spooky = require('spooky');

var settings = function(loglevel) {
env['PHANTOMJS_EXECUTABLE'] = deps.getbinpath('phantomjs');
return {

@@ -68,2 +67,3 @@ child: {

scrape.scrape = function(scrapeUrl, definition, cb, loglevel) {
log.debug('function scrape: ' + scrapeUrl);

@@ -74,3 +74,5 @@ // validate arguments

// let's get our scrape on
log.debug('creating spooky instance');
var spooky = new Spooky(settings(loglevel), function() {
log.debug('spooky initialising');
spooky.start(scrapeUrl);

@@ -77,0 +79,0 @@

@@ -12,2 +12,3 @@ var url = module.exports;

url.checkUrl = function(theUrl) {
log.debug('function checkUrl: ' + theUrl);
var protocol = /^(f|ht)tps?:\/\//i.test(theUrl);

@@ -14,0 +15,0 @@ var domain = /:\/\/\w+\.\w+/i.test(theUrl);

{
"name": "thresher",
"description": "Headless ScraperJSON scraping for Node.js",
"version": "0.0.1",
"version": "0.0.2",
"homepage": "https://github.com/ContentMine/quickscrape",

@@ -6,0 +6,0 @@ "author": {

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