This file has been truncated, but you can view the full file.
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
{ | |
"numTotalTestSuites": 911, | |
"numPassedTestSuites": 911, | |
"numFailedTestSuites": 0, | |
"numPendingTestSuites": 0, | |
"numTotalTests": 2245, | |
"numPassedTests": 2235, | |
"numFailedTests": 10, | |
"numPendingTests": 0, | |
"numTodoTests": 0, |
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 'dart:async'; | |
import 'package:google_maps_flutter/google_maps_flutter.dart'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatefulWidget { | |
@override | |
_MyAppState createState() => _MyAppState(); |
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 'dart:math'; | |
double calculateDifference(double lat1, double lon1, double lat2, double lon2) { | |
double radius = 6371; // km | |
double changeInLat = toRad(lat2 - lat1); | |
double changeInLong = toRad(lon2 - lon1); | |
double lat1Rad = toRad(lat1); | |
double lat2Rad = toRad(lat2); | |
double formula = sin(changeInLat / 2) * sin(changeInLat / 2) + |
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
{ | |
"env": { | |
"browser": true, | |
"es6": true | |
}, | |
"extends": ["eslint:recommended", "react-app", "prettier"], | |
"globals": { | |
"Atomics": "readonly", | |
"SharedArrayBuffer": "readonly" | |
}, |
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 { useEffect, useCallback } from "react"; | |
let debounceTimeout; | |
const useDebounce = (delay = 1000) => { | |
const debounceRequest = useCallback( | |
debounceFunction => { | |
clearTimeout(debounceTimeout); | |
debounceTimeout = setTimeout(() => { | |
debounceFunction(); | |
}, delay); |
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 getObjectProperty = (obj, path, defaultValue="", returnUndefined=true) => { | |
const checkForDefaultValue = value => | |
value !== undefined ? value : undefined; | |
if (path === undefined) { | |
return obj; | |
} | |
try { | |
const value = path.split('.').reduce((o, i) => o[i], obj); | |
if (value === undefined && returnUndefined) return value; |