gpx-builder
Advanced tools
Comparing version 5.1.1 to 5.2.0
# Change Log | ||
All notable changes to this project will be documented in this file. | ||
## v5.2.0 (2022-12-31) | ||
### Changed | ||
- [e60c7ed](https://github.com/fabulator/gpx-builder/commit/e60c7edad874fe0d4556ccb02b8ffbf22e4e5b90) Added new properties for waypoint experimental parsing. | ||
## v5.1.1 (2022-12-25) | ||
@@ -5,0 +9,0 @@ |
@@ -9,3 +9,3 @@ import { Link as LinkData } from '../../../types'; | ||
*/ | ||
constructor(href: string, { text, type, }: { | ||
constructor(href: string, { text, type, }?: { | ||
text?: string; | ||
@@ -12,0 +12,0 @@ type?: string; |
@@ -10,3 +10,3 @@ 'use strict'; | ||
type | ||
}) { | ||
} = {}) { | ||
this.href = href; | ||
@@ -13,0 +13,0 @@ this.text = text; |
@@ -7,2 +7,3 @@ 'use strict'; | ||
var BaseBuilder = require('../builder/BaseBuilder/BaseBuilder.js'); | ||
var Link = require('../builder/BaseBuilder/models/Link.js'); | ||
var Route = require('../builder/BaseBuilder/models/Route.js'); | ||
@@ -30,3 +31,16 @@ var Point = require('../builder/BaseBuilder/models/Point.js'); | ||
sym: item.sym, | ||
type: item.type | ||
type: item.type, | ||
fix: item.fix != null ? Number(item.fix) : undefined, | ||
cmt: item.cmt, | ||
desc: item.desc, | ||
src: item.src, | ||
dgpsid: item.dgpsid != null ? Number(item.dgpsid) : undefined, | ||
ageofdgpsdata: item.ageofdgpsdata != null ? Number(item.ageofdgpsdata) : undefined, | ||
hdop: item.hdop != null ? Number(item.hdop) : undefined, | ||
sat: item.sat != null ? Number(item.sat) : undefined, | ||
pdop: item.pdop != null ? Number(item.pdop) : undefined, | ||
magvar: item.magvar != null ? Number(item.magvar) : undefined, | ||
vdop: item.vdop != null ? Number(item.vdop) : undefined, | ||
geoidheight: item.geoidheight != null ? Number(item.geoidheight) : undefined, | ||
link: item.link ? new Link(item.link['@href']) : undefined | ||
}); | ||
@@ -33,0 +47,0 @@ }) || []; |
@@ -8,3 +8,3 @@ class Link { | ||
type | ||
}) { | ||
} = {}) { | ||
this.href = href; | ||
@@ -11,0 +11,0 @@ this.text = text; |
import { create } from 'xmlbuilder2'; | ||
import BaseBuilder from '../builder/BaseBuilder/BaseBuilder.js'; | ||
import Link from '../builder/BaseBuilder/models/Link.js'; | ||
import Route from '../builder/BaseBuilder/models/Route.js'; | ||
@@ -25,3 +26,16 @@ import Point from '../builder/BaseBuilder/models/Point.js'; | ||
sym: item.sym, | ||
type: item.type | ||
type: item.type, | ||
fix: item.fix != null ? Number(item.fix) : undefined, | ||
cmt: item.cmt, | ||
desc: item.desc, | ||
src: item.src, | ||
dgpsid: item.dgpsid != null ? Number(item.dgpsid) : undefined, | ||
ageofdgpsdata: item.ageofdgpsdata != null ? Number(item.ageofdgpsdata) : undefined, | ||
hdop: item.hdop != null ? Number(item.hdop) : undefined, | ||
sat: item.sat != null ? Number(item.sat) : undefined, | ||
pdop: item.pdop != null ? Number(item.pdop) : undefined, | ||
magvar: item.magvar != null ? Number(item.magvar) : undefined, | ||
vdop: item.vdop != null ? Number(item.vdop) : undefined, | ||
geoidheight: item.geoidheight != null ? Number(item.geoidheight) : undefined, | ||
link: item.link ? new Link(item.link['@href']) : undefined | ||
}); | ||
@@ -28,0 +42,0 @@ }) || []; |
{ | ||
"name": "gpx-builder", | ||
"version": "5.1.1", | ||
"version": "5.2.0", | ||
"description": "Builder of GPX files", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -21,3 +21,3 @@ import { Link as LinkData } from '../../../types'; | ||
type?: string; | ||
}, | ||
} = {}, | ||
) { | ||
@@ -24,0 +24,0 @@ this.href = href; |
/* eslint-disable @typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-return,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-argument */ | ||
import { create } from 'xmlbuilder2'; | ||
import BaseBuilder from '../builder/BaseBuilder'; | ||
import { Point, Route, Segment, Track } from '../builder/BaseBuilder/models'; | ||
import { Link, Point, Route, Segment, Track } from '../builder/BaseBuilder/models'; | ||
@@ -25,2 +25,15 @@ const getArrayOrNothing = (source: any): any[] | undefined => { | ||
type: item.type, | ||
fix: item.fix != null ? Number(item.fix) : undefined, | ||
cmt: item.cmt, | ||
desc: item.desc, | ||
src: item.src, | ||
dgpsid: item.dgpsid != null ? Number(item.dgpsid) : undefined, | ||
ageofdgpsdata: item.ageofdgpsdata != null ? Number(item.ageofdgpsdata) : undefined, | ||
hdop: item.hdop != null ? Number(item.hdop) : undefined, | ||
sat: item.sat != null ? Number(item.sat) : undefined, | ||
pdop: item.pdop != null ? Number(item.pdop) : undefined, | ||
magvar: item.magvar != null ? Number(item.magvar) : undefined, | ||
vdop: item.vdop != null ? Number(item.vdop) : undefined, | ||
geoidheight: item.geoidheight != null ? Number(item.geoidheight) : undefined, | ||
link: item.link ? new Link(item.link['@href']) : undefined, | ||
}); | ||
@@ -27,0 +40,0 @@ }) || [] |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
119843
3230