Hey there! Seems like you found me. Perhaps you came from uses? This is my stuff.
- Macbook Pro 2021
- Windows PC
- Core: AMD
- GPU: NVIDIA 3600ti
Hey there! Seems like you found me. Perhaps you came from uses? This is my stuff.
/** | |
* Decorates a function so that it console logs how long it takes to run. | |
* @example | |
* // import {timed} | |
* let functionToTime = () => {...does something} | |
* functionToTime = timed(functionToTime) | |
* functionToTime() // use as normal | |
* @param func | |
* @returns | |
*/ |
/** | |
* Add days to given Date | |
* @param {Date} | |
* @param {number} | |
* @returns {Date} | |
* | |
* @example | |
* addDaysToDate(new Date(), 7) // date for 7 days from now | |
*/ | |
export const addDaysToDate = (date: Date, days: number): Date => { |
/** | |
* Return black or white, whichever has higher contrast given the input color. | |
* | |
* @param {string} n - Input hexcolor without # | |
* @return {string} – white or black hex value with # | |
* | |
* @example | |
* | |
* getMaxContrast('FFFFFF') // #000000 | |
*/ |