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

stockshark-util

Package Overview
Dependencies
Maintainers
1
Versions
444
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stockshark-util - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

2

package.json
{
"name": "stockshark-util",
"version": "1.0.10",
"version": "1.0.11",
"description": "util",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

const util = require('./util');
const holidays = require('./holidays.json');
function willMarketOpen() {
if (!this.isTodayTradingDay()) return false
const dtNow = util.nowET()
const dtOpen = this.getTodayMarketOpenDateTime()
return (dtNow < dtOpen)
}
function isMarketOpen() {

@@ -12,2 +19,9 @@ if (!this.isTodayTradingDay()) return false

function wasMarketOpen() {
if (!this.isTodayTradingDay()) return false
const dtNow = util.nowET()
const dtClose = this.getTodayMarketCloseDateTime()
return (dtNow > dtClose)
}
function isTradingDay(dateStr) {

@@ -104,3 +118,5 @@ return !holidays.includes(dateStr) && !util.isWeekend(dateStr)

module.exports = {
willMarketOpen,
isMarketOpen,
wasMarketOpen,
isTradingDay,

@@ -107,0 +123,0 @@ isTodayTradingDay,

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