Skip to content

Instantly share code, notes, and snippets.

View lukas-zech-software's full-sized avatar

Lukas Zech lukas-zech-software

  • Lukas Zech Software
  • Augsburg
View GitHub Profile
@lukas-zech-software
lukas-zech-software / circular.js
Last active July 9, 2019 11:04
Detect circular references in objects
// 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);
@lukas-zech-software
lukas-zech-software / GeoCodingService.ts
Last active April 9, 2021 21:56
Typescript Definitions for official GoogleMaps API for Node.js (https://github.com/googlemaps/google-maps-services-js)
import { createClient, GoogleMapsClient } from '@google/maps';
export class GeoCodingService {
private geoCoder: GoogleMapsClient;
public constructor() {
this.geoCoder = createClient({
key: 'YOUR-API-KEY',
});