Skip to content

Instantly share code, notes, and snippets.

View ferruzzi's full-sized avatar

D. Ferruzzi ferruzzi

  • AWS
  • Vancouver, BC
View GitHub Profile
function setProtection(msg, location) {
/** *******************************************
- check if new base is already protected
- if timer remaining is within reup time, then
- cancel old timers
- set new timers
**********************************************/
const ensureLocation = new Promise((resolve, reject) => {
if (location) {
resolve(location);