Skip to content

Commit

Permalink
v1.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
oceanroleplay committed Sep 6, 2021
1 parent ae8ff1d commit efba6b3
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aviationweather",
"version": "1.1.6",
"version": "1.1.7",
"description": "Node.js wrapper for aviation weather, written in TypeScript",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down
20 changes: 10 additions & 10 deletions src/Identifiers.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { IDef } from ".";
import { IMetaSkyCondition } from ".";

export const skyConditions: IDef[] = [
{ code: "BKN", meaning: "Broken cloud layer 5/8ths to 7/8ths" },
{ code: "CB", meaning: "Cumulonimbus" },
{ code: "CLR", meaning: "Sky clear at or below 12,000AGL" },
{ code: "FEW", meaning: "Few cloud layer 0/8ths to 2/8ths" },
{ code: "OVC", meaning: "Overcast cloud layer 8/8ths coverage" },
{ code: "SCT", meaning: "Scattered cloud layer 3/8ths to 4/8ths" },
{ code: "SKC", meaning: "Sky Clear" },
{ code: "TCU", meaning: "Towering Cumulus" },
export const skyConditions: IMetaSkyCondition[] = [
{ code: "BKN", description: "Broken cloud layer 5/8ths to 7/8ths" },
{ code: "CB", description: "Cumulonimbus" },
{ code: "CLR", description: "Sky clear at or below 12,000AGL" },
{ code: "FEW", description: "Few cloud layer 0/8ths to 2/8ths" },
{ code: "OVC", description: "Overcast cloud layer 8/8ths coverage" },
{ code: "SCT", description: "Scattered cloud layer 3/8ths to 4/8ths" },
{ code: "SKC", description: "Sky Clear" },
{ code: "TCU", description: "Towering Cumulus" },
];
6 changes: 3 additions & 3 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {
IAircraftReportsOptions,
IClientOptions,
IDatasourceType,
IDef,
IGAirMet,
IGAirmetOptions,
IMetaSkyCondition,
IMetar,
IMetarOptions,
IOptions,
Expand All @@ -32,9 +32,9 @@ export class Client {
this.options = options;
}

getDef(identifier: string): IDef {
getSkyCondition(identifier: string): IMetaSkyCondition {
const search = skyConditions.find((s) => s.code === identifier);
if (!search) return { code: identifier, meaning: "unknown" };
if (!search) return { code: identifier, description: "unknown" };
return search;
}

Expand Down
4 changes: 2 additions & 2 deletions src/types/common.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export interface IDef {
export interface IMetaSkyCondition {
code: string;
meaning: string;
description: string;
}

0 comments on commit efba6b3

Please sign in to comment.