Socket
Socket
Sign inDemoInstall

dji_srt_parser

Package Overview
Dependencies
3
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.4 to 1.3.5

12

index.js

@@ -35,2 +35,7 @@ const tzlookup = require('tz-lookup');

/(\d{4}[-.]\d{1,2}[-.]\d{1,2} \d{1,2}:\d{2}:\d{2})[,.](\w{3})/g;
// Identify DJI FPV for altitude fix
const isDJIFPV =
/font size="28"/.test(srt) &&
/\d{4}-\d{1,2}-\d{1,2} \d{1,2}:\d{2}:\d{2}.\d{3}/.test(srt) &&
/\[altitude: \d.*\]/.test(srt);
//Split difficult Phantom4Pro format

@@ -86,2 +91,7 @@ srt = srt

);
} else if (isDJIFPV && /\[altitude: \d.*\]/.test(line)) {
// Correct altitude divided by 10 problem in DJI FPV drone
converted[converted.length - 1].altitude = String(
+converted[converted.length - 1].altitude * 10
);
}

@@ -423,3 +433,3 @@ }

interpretedI = {
1: isNum(datum[1]) ? Number(datum[1]) : 'n/a', // For now, I don't know what the data means
1: isNum(datum[1]) ? Number(datum[1]) : 'n/a',
2: isNum(datum[0]) ? Number(datum[0]) : 'n/a',

@@ -426,0 +436,0 @@ 3: isNum(datum[2]) ? Number(datum[2]) : 'n/a'

2

package.json

@@ -9,3 +9,3 @@ {

},
"version": "1.3.4",
"version": "1.3.5",
"description": "Parses and interprets DJI's drones SRT metadata",

@@ -12,0 +12,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc