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

google-finance-data

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-finance-data - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

7

index.js
'use strict';
const puppeteer = require('puppeteer');
const NestedError = require('nested-error-stacks');

@@ -24,2 +25,3 @@ function getTextContent(element) {

symbol = symbol.toUpperCase();
let fetchError = null;

@@ -91,3 +93,3 @@ for (let prefix of symbolPrefix) {

catch (err) {
console.error(err.stack ? err.stack : err)
fetchError = err;
}

@@ -97,6 +99,5 @@ }

browser.close();
throw new Error(`unable to fetch data for ${symbol}`);
throw new NestedError(`unable to fetch data for ${symbol}`, fetchError);
};
exports.getSymbol = getSymbol;
{
"name": "google-finance-data",
"version": "0.0.3",
"description": "Real-time stock quotes and data from Google Finance for Node.js",
"version": "0.0.4",
"description": "Google Finance API for real-time stock quotes and company data from Google Finance",
"main": "index.js",

@@ -28,4 +28,5 @@ "scripts": {

"dependencies": {
"nested-error-stacks": "2.1.0",
"puppeteer": "1.3.0"
}
}

@@ -1,3 +0,8 @@

getSymbol("msft")
var google = require("./index.js");
google.getSymbol("burp")
.then(data => console.log(JSON.stringify(data, null, 2)))
.catch(err => console.error(err.stack ? err.stack : err));
.catch(err => {
const errorMessage = err.stack ? err.stack : err;
console.error(errorMessage)
});
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