Skip to content
This repository has been archived by the owner on Dec 30, 2023. It is now read-only.

strong-roots-capital/new-session-emitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

new-session-emitter Build status npm version codecov

Emit a signal on conclusion of desired session (UTC)

Install

npm install @strong-roots-capital/new-session-emitter

Use

import NewSessionEmitter from '@strong-roots-capital/new-session-emitter'

let sessionEmitter = new NewSessionEmitter(['1', '5', '15', '1H'])
sessionEmitter.on('newSession', ISR)

function ISR(timeframes: string[]) {
    console.log('New sessions:', new Date(), timeframes)
}

Related