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

yfinance

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yfinance - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

32

dist/index.js

@@ -36,18 +36,22 @@ 'use strict';

self._request = function (query, callback) {
var url = getUrl(query);
try {
var url = getUrl(query);
http.get(url, function (res) {
res.setEncoding('utf8');
var data = '';
res.on('data', function (chunk) {
data += chunk;
http.get(url, function (res) {
res.setEncoding('utf8');
var data = '';
res.on('data', function (chunk) {
data += chunk;
});
res.on('end', function () {
callback(null, convertResult(data));
});
// consume response body
res.resume();
}).on('error', function (e) {
throw e;
});
res.on('end', function () {
callback(convertResult(data));
});
// consume response body
res.resume();
}).on('error', function (e) {
throw e;
});
} catch (e) {
callback(e);
}
};

@@ -54,0 +58,0 @@

{
"name": "yfinance",
"version": "0.0.2",
"version": "0.0.3",
"description": "Yahoo Finance API for NodeJs.",

@@ -56,3 +56,3 @@ "homepage": "https://github.com/johancn87/yf",

},
"repository": "johancn87/yfinance",
"repository": "johancn87/yf",
"scripts": {

@@ -59,0 +59,0 @@ "prepublish": "gulp prepublish",

@@ -15,11 +15,14 @@ # yfinance [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url]

yfinance.getQuotes('JNJ', function (data) {
yfinance.getQuotes('JNJ', function (err, data) {
if(err) console.log(err);
//...
});
yfinance.getHistorical('JNJ', '2016-08-01', '2016-08-05', function (data) {
yfinance.getHistorical('JNJ', '2016-08-01', '2016-08-05', function (err, data) {
if(err) console.log(err);
//...
});
yfinance.getDividendHistory('JNJ', '2015-01-01', '2015-12-31', function (data) {
yfinance.getDividendHistory('JNJ', '2015-01-01', '2015-12-31', function (err, data) {
if(err) console.log(err);
//... endDate not working!

@@ -26,0 +29,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