@balena/sbvr-types
Advanced tools
Comparing version
@@ -7,2 +7,7 @@ # Change Log | ||
# v3.4.6 | ||
## (2021-09-21) | ||
* Avoid creating a new Date object when we already have one [Pagan Gazzard] | ||
# v3.4.5 | ||
@@ -9,0 +14,0 @@ ## (2021-09-07) |
@@ -14,6 +14,6 @@ "use strict"; | ||
const fetchProcessing = (data) => { | ||
if (data != null) { | ||
return new Date(data); | ||
if (data == null || data instanceof Date) { | ||
return data; | ||
} | ||
return data; | ||
return new Date(data); | ||
}; | ||
@@ -20,0 +20,0 @@ exports.fetchProcessing = fetchProcessing; |
@@ -14,6 +14,6 @@ "use strict"; | ||
const fetchProcessing = (data) => { | ||
if (data != null) { | ||
return new Date(data); | ||
if (data == null || data instanceof Date) { | ||
return data; | ||
} | ||
return data; | ||
return new Date(data); | ||
}; | ||
@@ -20,0 +20,0 @@ exports.fetchProcessing = fetchProcessing; |
{ | ||
"name": "@balena/sbvr-types", | ||
"version": "3.4.5", | ||
"version": "3.4.6-avoid-unneccessary-objects-07eb756eca00a506b618dc197b67dcc7a9ea3733", | ||
"description": "SBVR type definitions.", | ||
@@ -66,4 +66,4 @@ "main": "out", | ||
"versionist": { | ||
"publishedAt": "2021-09-07T16:49:19.957Z" | ||
"publishedAt": "2021-09-21T14:01:00.652Z" | ||
} | ||
} |
@@ -13,6 +13,6 @@ import * as TypeUtils from '../type-utils'; | ||
export const fetchProcessing = (data: any) => { | ||
if (data != null) { | ||
return new Date(data); | ||
if (data == null || data instanceof Date) { | ||
return data; | ||
} | ||
return data; | ||
return new Date(data); | ||
}; | ||
@@ -19,0 +19,0 @@ |
@@ -13,6 +13,6 @@ import * as TypeUtils from '../type-utils'; | ||
export const fetchProcessing = (data: any) => { | ||
if (data != null) { | ||
return new Date(data); | ||
if (data == null || data instanceof Date) { | ||
return data; | ||
} | ||
return data; | ||
return new Date(data); | ||
}; | ||
@@ -19,0 +19,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
102759
0.59%2
100%