Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
gpx-parser-lite
Advanced tools
A lightweight GPX parser
Can either parse a file given a file path or can parse a GPX string. A GPX file is essentially XML.
npm install --save gpx-parser-lite
There are two main functions parseGPXString
and parseGPXFile
. The output for both is the same:
interface Activity {
name: string;
date: string; // an ISO DATE
type: number; // 9 is run 🤷♂️
activityDataPoints: Array<{
latitude: number | null;
longitude: number | null;
timestamp: string | undefined;
elevation: number | null;
heartRate: number | null;
cadence: number | null;
}>
}
The context for usage would be along the lines of a perhaps form submittal, where a FileReader
can get the file as a string and POST
it to an express app:
import { parseGPXString, Activity } from "gpx-parser-lite";
const activity: Activity = parseGPXString(GPX_STRING);
The environment here would be node, possibly where the file path could be passed in as a command line argument
import { parseGPXString, Activity } from "gpx-parser-lite";
parseGPXString(GPX_FILE_PATH, (err, activity) => {
// do something with activity
});
FAQs
Parses GPX files to JSON
We found that gpx-parser-lite demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.