This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const createSelectObservable = (() => { | |
let state; | |
let pReducer = (state, action) => state; | |
const subscribers = new Map(); | |
const addSubscriber = (selector) => { | |
subscribers.set(selector, selector); | |
//return unsubscribe function | |
return () => subscribers.delete(selector); | |
}; | |
const dispatch = (action) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pad(num: number) { | |
return `0000${num}`.slice(-2) | |
} | |
function time(hour: number) { | |
return new Date( | |
`Tue Aug 08 2023 ${pad(hour)}:00:00 GMT+0200 (Central European Summer Time)` | |
) | |
} | |
const times = [ |
OlderNewer