@js-joda/core
Advanced tools
Comparing version 4.3.1 to 5.0.0
@@ -6,2 +6,7 @@ Changelog | ||
### 5.0.0 | ||
* [#574](https://github.com/js-joda/js-joda/pull/574) Reverting babel targets for UMD ([@pithu](https://github.com/pithu)) | ||
* [#548](https://github.com/js-joda/js-joda/pull/548) Disallowing implicit conversion of Temporal/TemporalAmount to numeric values ([@InExtremaRes](https://github.com/InExtremaRes)) | ||
### 4.3.0 | ||
@@ -8,0 +13,0 @@ |
{ | ||
"name": "@js-joda/core", | ||
"version": "4.3.1", | ||
"version": "5.0.0", | ||
"description": "a date and time library for javascript", | ||
@@ -51,3 +51,3 @@ "repository": { | ||
}, | ||
"gitHead": "d3c951d04f2c8a162e0592a808e65648e8d5f2b6" | ||
"gitHead": "03943ccba7dab0178e3a112bce8a251410f89fe7" | ||
} |
@@ -354,1 +354,17 @@ /* | ||
} | ||
if (typeof Symbol !== 'undefined' && Symbol.toPrimitive) { | ||
Temporal.prototype[Symbol.toPrimitive] = function (hint) { | ||
// hint could be 'number', 'string' or 'default'. Only 'number' | ||
// should throw and 'default' is treated as 'string'. | ||
if (hint !== 'number') { | ||
return this.toString(); | ||
} | ||
throw new TypeError( | ||
'A conversion from Temporal to a number is not allowed. ' + | ||
'To compare use the methods .equals(), .compareTo(), .isBefore() ' + | ||
'or one that is more suitable to your use case.' | ||
); | ||
}; | ||
} |
@@ -167,1 +167,17 @@ /* | ||
} | ||
if (typeof Symbol !== 'undefined' && Symbol.toPrimitive) { | ||
TemporalAmount.prototype[Symbol.toPrimitive] = function (hint) { | ||
// hint could be 'number', 'string' or 'default'. Only 'number' | ||
// should throw and 'default' is treated as 'string'. | ||
if (hint !== 'number') { | ||
return this.toString(); | ||
} | ||
throw new TypeError( | ||
'A conversion from TemporalAmount to a number is not allowed. ' + | ||
'To compare use the methods .equals(), .compareTo(), .isBefore() ' + | ||
'or one that is more suitable to your use case.' | ||
); | ||
}; | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
3908995
50999