UNPKG

node-djiparsetxt

Version:

command-line application that reads a DJI '.txt' file and outputs a json.

34 lines 1.57 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.UnscrambleCommand = void 0; var ServiceManager_1 = require("../common/ServiceManager"); var Command_1 = require("./Command"); var UnscrambleCommand = /** @class */ (function (_super) { __extends(UnscrambleCommand, _super); function UnscrambleCommand() { return _super !== null && _super.apply(this, arguments) || this; } UnscrambleCommand.prototype.exec = function (options) { var serviceMan = this.serviceMan; var scrambleTableService = serviceMan.get_service(ServiceManager_1.ServiceTypes.ScrambleTable); var recordsCache = options.records; recordsCache.records = recordsCache.records.map(function (val) { return scrambleTableService.unscramble_record(val); }); return recordsCache; }; return UnscrambleCommand; }(Command_1.Command)); exports.UnscrambleCommand = UnscrambleCommand; //# sourceMappingURL=UnscrambleCommand.js.map