metar-taf-parser 3.0.0 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@ export * from "./model/model";
9
9
  export * from "./model/enum";
10
10
  export { RemarkType, IBaseRemark, IUnknownRemark, Remark, ICeilingHeightRemark, ICeilingSecondLocationRemark, IHourlyMaximumMinimumTemperatureRemark, IHourlyMaximumTemperatureRemark, IHourlyMinimumTemperatureRemark, IHourlyPrecipitationAmountRemark, IHourlyPressureRemark, IHourlyTemperatureDewPointRemark, IIceAccretionRemark, IObscurationRemark, IPrecipitationAmount24HourRemark, IPrecipitationAmount36HourRemark, IPrecipitationBegEndRemark, IPrevailingVisibilityRemark, ISeaLevelPressureRemark, ISecondLocationVisibilityRemark, ISectorVisibilityRemark, ISmallHailSizeRemark, ISnowIncreaseRemark, ISnowPelletsRemark, ISunshineDurationRemark, ISurfaceVisibilityRemark, IThunderStormLocationRemark, IThunderStormLocationMovingRemark, ITornadicActivityBegRemark, ITornadicActivityBegEndRemark, ITornadicActivityEndRemark, ITowerVisibilityRemark, IVariableSkyRemark, IVariableSkyHeightRemark, IVirgaDirectionRemark, IWaterEquivalentSnowRemark, IWindPeakCommandRemark, IWindShiftFropaRemark, } from "./command/remark";
11
11
  export { getCompositeForecastForDate, IForecastContainer, ICompositeForecast, Forecast, TimestampOutOfBoundsError, } from "./forecast/forecast";
12
- export { TAFTrendDated } from "./dates/taf";
12
+ export { TAFTrendDated, ITAFDated } from "./dates/taf";
13
13
  export interface IMetarTAFParserOptions {
14
14
  locale?: Locale;
15
15
  }
@@ -311,9 +311,9 @@ class TAFParser extends AbstractParser {
311
311
  parse(input) {
312
312
  let amendment;
313
313
  const lines = this.extractLinesTokens(input);
314
- if (lines[0][0] !== this.TAF)
315
- throw new errors_1.InvalidWeatherStatementError('TAF report must begin with "TAF"');
316
- let index = 1;
314
+ let index = 0;
315
+ if (lines[0][0] === this.TAF)
316
+ index = 1;
317
317
  if (lines[0][1] === this.TAF)
318
318
  index = 2;
319
319
  if (lines[0][index] === "AMD") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "metar-taf-parser",
3
- "version": "3.0.0",
3
+ "version": "3.1.2",
4
4
  "description": "Parse METAR and TAF reports",
5
5
  "homepage": "https://aeharding.github.io/metar-taf-parser",
6
6
  "keywords": [