UNPKG

mstr-report-data-service

Version:

A Node function for calling Microstrategy's reportDataService task and returning the payload as JSON.

20 lines (17 loc) 543 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = parseValue; var _lodash = require('lodash'); // custom parse value function function parseValue(input) { // handle dates if (typeof input === 'undefined') return null; if (input.indexOf('/') > -1) return input; // handle numbers as string var number = (0, _lodash.toNumber)(input.replace(',', '')); if (isNaN(number)) return input; // return input if string return number; } //# sourceMappingURL=parseValue.js.map