<commit_before>import * as Alexa from "alexa-sdk";
import * as requester from "request";
const geolib: any = require("geolib");
// For more precise locations
const usZips: any = require("us-zips");
// For more zip code information
const zipcodes: any = require("zipcodes");

const APP_ID: string = "amzn1.ask.skill.d6f99fe1-708e-46a1-b88d-c965145e5d76";
const DYNAMO_TABLE: string = "NearbyAircraftUsers";
const USER_AGENT: string = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36";
const API_OPTIONS = {
    "url": "https://opensky-network.org/api/states/all",
    "headers": {
        "User-Agent": USER_AGENT,
        "Cache-Control": "no-cache"
    }
};

interface Location {
    "latitude": number;
    "longitude": number;
    "city": string;
    "state": string;
}
const states = {
    GETLOCATION: "_GETLOCATION"
};

function mainAircraftHandler (zipCode: string, cityName: string, stateName: string, shouldFollowUp: boolean = false) {
    if (!cityName && stateName.toLowerCase() === "new york")
        cityName = "new york";
    if (!stateName) {
        switch (cityName.toLowerCase()) {
            case "new york":
            case "new york city":
                stateName = "NY";
                break;
            case "los angeles":
            case "san diego":
            case "san francisco":
            case "san jose":
                stateName = "CA";
                break;<commit_msg>Fix calling toLowerCase() on undefined<commit_after>import * as Alexa from "alexa-sdk";
import * as requester from "request";
const geolib: any = require("geolib");
// For more precise locations
const usZips: any = require("us-zips");
// For more zip code information
const zipcodes: any = require("zipcodes");

const APP_ID: string = "amzn1.ask.skill.d6f99fe1-708e-46a1-b88d-c965145e5d76";
const DYNAMO_TABLE: string = "NearbyAircraftUsers";
const USER_AGENT: string = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36";
const API_OPTIONS = {
    "url": "https://opensky-network.org/api/states/all",
    "headers": {
        "User-Agent": USER_AGENT,
        "Cache-Control": "no-cache"
    }
};

interface Location {
    "latitude": number;
    "longitude": number;
    "city": string;
    "state": string;
}
const states = {
    GETLOCATION: "_GETLOCATION"
};

function mainAircraftHandler (zipCode: string, cityName: string, stateName: string, shouldFollowUp: boolean = false) {
    if (!cityName && stateName && stateName.toLowerCase() === "new york")
        cityName = "new york";
    if (!stateName && cityName) {
        switch (cityName.toLowerCase()) {
            case "new york":
            case "new york city":
                stateName = "NY";
                break;
            case "los angeles":
            case "san diego":
            case "san francisco":
            case "san jose":
                stateName = "CA";
                break;
{'fraction_non_alphanumeric': 0.13745019920318724, 'fraction_numerical': 0.033200531208499334, 'mean_word_length': 2.724351050679852, 'pattern_counts': {'":': 28, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2792105', 'n_tokens_mistral': 1037, 'n_tokens_neox': 980, 'n_words': 255}