yahoo-finance2
Advanced tools
Comparing version 2.3.2 to 2.3.3
{ | ||
"name": "yahoo-finance2", | ||
"version": "2.3.2", | ||
"version": "2.3.3", | ||
"description": "JS API for Yahoo Finance", | ||
@@ -76,5 +76,5 @@ "type:": "commonjs", | ||
"@types/node-fetch": "2.6.1", | ||
"@typescript-eslint/eslint-plugin": "5.19.0", | ||
"@typescript-eslint/parser": "5.19.0", | ||
"eslint": "8.13.0", | ||
"@typescript-eslint/eslint-plugin": "5.21.0", | ||
"@typescript-eslint/parser": "5.21.0", | ||
"eslint": "8.14.0", | ||
"eslint-config-prettier": "8.5.0", | ||
@@ -90,4 +90,4 @@ "globby": "13.1.1", | ||
"ts-node": "10.7.0", | ||
"typescript": "4.6.3" | ||
"typescript": "4.6.4" | ||
} | ||
} |
module.exports = { | ||
"name": "yahoo-finance2", | ||
"version": "2.3.2", | ||
"version": "2.3.3", | ||
"description": "JS API for Yahoo Finance", | ||
@@ -76,5 +76,5 @@ "type:": "commonjs", | ||
"@types/node-fetch": "2.6.1", | ||
"@typescript-eslint/eslint-plugin": "5.19.0", | ||
"@typescript-eslint/parser": "5.19.0", | ||
"eslint": "8.13.0", | ||
"@typescript-eslint/eslint-plugin": "5.21.0", | ||
"@typescript-eslint/parser": "5.21.0", | ||
"eslint": "8.14.0", | ||
"eslint-config-prettier": "8.5.0", | ||
@@ -90,4 +90,4 @@ "globby": "13.1.1", | ||
"ts-node": "10.7.0", | ||
"typescript": "4.6.3" | ||
"typescript": "4.6.4" | ||
} | ||
} |
@@ -30,3 +30,3 @@ import type { ModuleOptionsWithValidateTrue, ModuleOptionsWithValidateFalse, ModuleThis } from "../lib/moduleCommon.js"; | ||
instrumentType: string; | ||
firstTradeDate: Date; | ||
firstTradeDate: Date | null; | ||
regularMarketTime: Date; | ||
@@ -37,3 +37,3 @@ gmtoffset: number; | ||
regularMarketPrice: number; | ||
chartPreviousClose: number; | ||
chartPreviousClose?: number; | ||
previousClose?: number; | ||
@@ -109,3 +109,3 @@ scale?: number; | ||
[key: string]: any; | ||
adjclose: Array<number>; | ||
adjclose?: Array<number>; | ||
} | ||
@@ -112,0 +112,0 @@ export interface ChartOptions { |
@@ -26,4 +26,12 @@ "use strict"; | ||
queryOptions[fieldName] = Math.floor(value.getTime() / 1000); | ||
else if (typeof value === "string") | ||
queryOptions[fieldName] = Math.floor(new Date(value).getTime() / 1000); | ||
else if (typeof value === "string") { | ||
const timestamp = new Date(value).getTime(); | ||
if (isNaN(timestamp)) | ||
throw new Error("yahooFinance.historical() option '" + | ||
fieldName + | ||
"' invalid date provided: '" + | ||
value + | ||
"'"); | ||
queryOptions[fieldName] = Math.floor(timestamp / 1000); | ||
} | ||
} | ||
@@ -30,0 +38,0 @@ if (queryOptions.period1 === queryOptions.period2) { |
@@ -133,3 +133,3 @@ import type { ModuleOptionsWithValidateTrue, ModuleOptionsWithValidateFalse, ModuleThis } from "../lib/moduleCommon.js"; | ||
msBullishBearishSummariesPublishDate?: DateInMs; | ||
companyName: string; | ||
companyName?: string; | ||
upsellReportType?: string; | ||
@@ -136,0 +136,0 @@ } |
@@ -725,7 +725,7 @@ export interface QuoteSummaryResult { | ||
priceHint: number; | ||
previousClose: number; | ||
previousClose?: number; | ||
open?: number; | ||
dayLow?: number; | ||
dayHigh?: number; | ||
regularMarketPreviousClose: number; | ||
regularMarketPreviousClose?: number; | ||
regularMarketOpen?: number; | ||
@@ -732,0 +732,0 @@ regularMarketDayLow?: number; |
{ | ||
"name": "yahoo-finance2", | ||
"version": "2.3.2", | ||
"version": "2.3.3", | ||
"description": "JS API for Yahoo Finance", | ||
@@ -76,5 +76,5 @@ "type": "module", | ||
"@types/node-fetch": "2.6.1", | ||
"@typescript-eslint/eslint-plugin": "5.19.0", | ||
"@typescript-eslint/parser": "5.19.0", | ||
"eslint": "8.13.0", | ||
"@typescript-eslint/eslint-plugin": "5.21.0", | ||
"@typescript-eslint/parser": "5.21.0", | ||
"eslint": "8.14.0", | ||
"eslint-config-prettier": "8.5.0", | ||
@@ -90,4 +90,4 @@ "globby": "13.1.1", | ||
"ts-node": "10.7.0", | ||
"typescript": "4.6.3" | ||
"typescript": "4.6.4" | ||
} | ||
} |
export default { | ||
"name": "yahoo-finance2", | ||
"version": "2.3.2", | ||
"version": "2.3.3", | ||
"description": "JS API for Yahoo Finance", | ||
@@ -76,5 +76,5 @@ "type": "module", | ||
"@types/node-fetch": "2.6.1", | ||
"@typescript-eslint/eslint-plugin": "5.19.0", | ||
"@typescript-eslint/parser": "5.19.0", | ||
"eslint": "8.13.0", | ||
"@typescript-eslint/eslint-plugin": "5.21.0", | ||
"@typescript-eslint/parser": "5.21.0", | ||
"eslint": "8.14.0", | ||
"eslint-config-prettier": "8.5.0", | ||
@@ -90,4 +90,4 @@ "globby": "13.1.1", | ||
"ts-node": "10.7.0", | ||
"typescript": "4.6.3" | ||
"typescript": "4.6.4" | ||
} | ||
} |
@@ -30,3 +30,3 @@ import type { ModuleOptionsWithValidateTrue, ModuleOptionsWithValidateFalse, ModuleThis } from "../lib/moduleCommon.js"; | ||
instrumentType: string; | ||
firstTradeDate: Date; | ||
firstTradeDate: Date | null; | ||
regularMarketTime: Date; | ||
@@ -37,3 +37,3 @@ gmtoffset: number; | ||
regularMarketPrice: number; | ||
chartPreviousClose: number; | ||
chartPreviousClose?: number; | ||
previousClose?: number; | ||
@@ -109,3 +109,3 @@ scale?: number; | ||
[key: string]: any; | ||
adjclose: Array<number>; | ||
adjclose?: Array<number>; | ||
} | ||
@@ -112,0 +112,0 @@ export interface ChartOptions { |
@@ -24,4 +24,12 @@ const queryOptionsDefaults = { | ||
queryOptions[fieldName] = Math.floor(value.getTime() / 1000); | ||
else if (typeof value === "string") | ||
queryOptions[fieldName] = Math.floor(new Date(value).getTime() / 1000); | ||
else if (typeof value === "string") { | ||
const timestamp = new Date(value).getTime(); | ||
if (isNaN(timestamp)) | ||
throw new Error("yahooFinance.historical() option '" + | ||
fieldName + | ||
"' invalid date provided: '" + | ||
value + | ||
"'"); | ||
queryOptions[fieldName] = Math.floor(timestamp / 1000); | ||
} | ||
} | ||
@@ -28,0 +36,0 @@ if (queryOptions.period1 === queryOptions.period2) { |
@@ -133,3 +133,3 @@ import type { ModuleOptionsWithValidateTrue, ModuleOptionsWithValidateFalse, ModuleThis } from "../lib/moduleCommon.js"; | ||
msBullishBearishSummariesPublishDate?: DateInMs; | ||
companyName: string; | ||
companyName?: string; | ||
upsellReportType?: string; | ||
@@ -136,0 +136,0 @@ } |
@@ -725,7 +725,7 @@ export interface QuoteSummaryResult { | ||
priceHint: number; | ||
previousClose: number; | ||
previousClose?: number; | ||
open?: number; | ||
dayLow?: number; | ||
dayHigh?: number; | ||
regularMarketPreviousClose: number; | ||
regularMarketPreviousClose?: number; | ||
regularMarketOpen?: number; | ||
@@ -732,0 +732,0 @@ regularMarketDayLow?: number; |
{ | ||
"name": "yahoo-finance2", | ||
"version": "2.3.2", | ||
"version": "2.3.3", | ||
"description": "JS API for Yahoo Finance", | ||
@@ -76,5 +76,5 @@ "type": "module", | ||
"@types/node-fetch": "2.6.1", | ||
"@typescript-eslint/eslint-plugin": "5.19.0", | ||
"@typescript-eslint/parser": "5.19.0", | ||
"eslint": "8.13.0", | ||
"@typescript-eslint/eslint-plugin": "5.21.0", | ||
"@typescript-eslint/parser": "5.21.0", | ||
"eslint": "8.14.0", | ||
"eslint-config-prettier": "8.5.0", | ||
@@ -90,4 +90,4 @@ "globby": "13.1.1", | ||
"ts-node": "10.7.0", | ||
"typescript": "4.6.3" | ||
"typescript": "4.6.4" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
1553951
49195