proto3-json-serializer
Advanced tools
Comparing version 0.1.7 to 0.1.8
@@ -42,3 +42,7 @@ "use strict"; | ||
// To keep the precision, we extract the fractional seconds and append 0 until the length is equal to 9. | ||
const nanos = parseInt(json.split('.')[1].slice(0, -1).padEnd(9, '0')); | ||
let nanos = 0; | ||
const secondsFromDate = json.split('.')[1]; | ||
if (secondsFromDate) { | ||
nanos = parseInt(secondsFromDate.slice(0, -1).padEnd(9, '0')); | ||
} | ||
const result = {}; | ||
@@ -45,0 +49,0 @@ if (seconds !== 0) { |
# Changelog | ||
### [0.1.8](https://github.com/googleapis/proto3-json-serializer-nodejs/compare/v0.1.7...v0.1.8) (2022-01-21) | ||
### Bug Fixes | ||
* timestamp without millisecond ([#30](https://github.com/googleapis/proto3-json-serializer-nodejs/issues/30)) ([a55d0b6](https://github.com/googleapis/proto3-json-serializer-nodejs/commit/a55d0b6f98f6d1c8b7d971d0a583bbd82ea66983)) | ||
### [0.1.7](https://github.com/googleapis/proto3-json-serializer-nodejs/compare/v0.1.6...v0.1.7) (2022-01-14) | ||
@@ -4,0 +11,0 @@ |
{ | ||
"name": "proto3-json-serializer", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"repository": "googleapis/proto3-json-serializer-nodejs", | ||
@@ -5,0 +5,0 @@ "description": "Support for proto3 JSON serialiazation/deserialization for protobuf.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80697
933