Skip to content

Commit

Permalink
chore: update dep
Browse files Browse the repository at this point in the history
  • Loading branch information
oceanroleplay committed Jan 6, 2022
1 parent 261caa4 commit f873ccd
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ import {
ITafOptions,
} from "./index.js";
import axios from "axios";
import { parse } from "fast-xml-parser";
import { XMLParser } from "fast-xml-parser";
import { skyConditions } from "./Identifiers.js";

const parser = new XMLParser({
ignoreAttributes: false,
attributeNamePrefix: "",
});

export class Client {
private options?: IClientOptions;
static api = {
Expand Down Expand Up @@ -151,10 +156,7 @@ export class Client {
}

// parse xml
const parsedData = parse(res.data, {
ignoreAttributes: false,
attributeNamePrefix: "",
});
const parsedData = parser.parse(res.data);

const finalData =
parsedData?.response?.data?.[this.selectField(options.datasource)];
Expand Down

0 comments on commit f873ccd

Please sign in to comment.