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
// http://blog.vjeux.com/2011/javascript/cyclic-object-detection.html. | |
function isCyclic (obj) { | |
var seenObjects = []; | |
function detect (obj) { | |
if (obj && typeof obj === 'object') { | |
if (seenObjects.indexOf(obj) !== -1) { | |
return true; | |
} | |
seenObjects.push(obj); |
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 { createClient, GoogleMapsClient } from '@google/maps'; | |
export class GeoCodingService { | |
private geoCoder: GoogleMapsClient; | |
public constructor() { | |
this.geoCoder = createClient({ | |
key: 'YOUR-API-KEY', | |
}); |