@cubejs-backend/shared
Advanced tools
Comparing version
@@ -44,3 +44,5 @@ import type { unitOfTime } from 'moment-timezone'; | ||
export declare const utcToLocalTimeZone: (timezone: string, timestampFormat: string, timestamp?: string) => string | null; | ||
export declare const parseLocalDate: (data: any, timezone: string, timestampFormat?: string) => string | null; | ||
export declare const parseLocalDate: (data: { | ||
[key: string]: string; | ||
}[] | null | undefined, timezone: string, timestampFormat?: string) => string | null; | ||
export declare const addSecondsToLocalTimestamp: (timestamp: string, timezone: string, seconds: number) => Date; | ||
@@ -47,0 +49,0 @@ export declare const reformatInIsoLocal: (timestamp: string) => string; |
@@ -225,3 +225,3 @@ "use strict"; | ||
data = JSON.parse(JSON.stringify(data)); | ||
const value = data[0] && data[0][Object.keys(data[0])[0]]; | ||
const value = data?.[0]?.[Object.keys(data[0])[0]]; | ||
if (!value) { | ||
@@ -228,0 +228,0 @@ return null; |
{ | ||
"name": "@cubejs-backend/shared", | ||
"version": "1.2.24", | ||
"version": "1.2.25", | ||
"description": "Shared code for Cube.js backend packages", | ||
@@ -25,3 +25,3 @@ "main": "dist/src/index.js", | ||
"devDependencies": { | ||
"@cubejs-backend/linter": "1.2.24", | ||
"@cubejs-backend/linter": "1.2.25", | ||
"@types/bytes": "^3.1.5", | ||
@@ -67,2 +67,6 @@ "@types/cli-progress": "^3.9.1", | ||
"collectCoverage": false, | ||
"coverageReporters": [ | ||
"text", | ||
"html" | ||
], | ||
"coverageDirectory": "coverage/", | ||
@@ -77,3 +81,3 @@ "collectCoverageFrom": [ | ||
}, | ||
"gitHead": "abe830c39be3a52022506a1ae1d9c8598b0b4502" | ||
"gitHead": "a93ae853dfea6b8a863e3250d03954dc87b6aacb" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
218723
0.04%2841
0.07%