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
import { WebServiceClient } from "@maxmind/geoip2-node"; | |
import zipState from "zip-state"; | |
const { MAXMIND_APP_ID, MAXMIND_APP_KEY } = process.env; | |
const DEFAULT_REGION = "NY"; | |
export async function getUSAStateFromZipOrIp({ | |
ip, | |
zip, |
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
import { initializeApp } from 'firebase/app'; | |
import { getAnalytics, logEvent } from 'firebase/analytics'; | |
import { firebaseConfig } from '../store/environment'; | |
/** | |
* It's important to double-check event names | |
* cause it's crucial to have same namimg across platforms | |
*/ | |
const CUSTOM_TYPING = new Set([ | |
'session_started', |
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
// Functions: | |
function a(x, y, z) { | |
x[y] = z; | |
} | |
function b(x, p) { | |
for (let i in p) a(x, i, p[i]); | |
} | |
function c() { | |
let x = { foo: 'bar' }; |
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
// https://browser.primatelabs.com/ios-benchmarks | |
// https://mydevice.io/devices/ | |
// http://vizdevices.yesviz.com/devices.php | |
const IPHONE5_SIZE = 568 | |
const IPAD_SIZE = 1024 | |
const MIN_OPS = 165 /* Upper limit cpu for iPad4 */ | |
const CACHE_KEY = 'anim' | |
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(console){ | |
console.save = function(data, filename){ | |
if(!data) { | |
console.error('Console.save: No data') | |
return; | |
} | |
if(!filename) filename = 'console.json' |
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 fillStyles(el, sel, styles, type){ | |
el[sel] = el[sel] || {} | |
for (var key in styles) { | |
if (!isNaN(key)) { | |
if (el[sel][styles[key]]) { | |
let selector | |
if (type === 'id') selector = '#'+sel | |
else if (type === 'class') selector = '.'+sel | |
else selector = '<'+sel+'>' | |
return { |