@bbn/bbn 1.0.470 → 1.0.471

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/date.js CHANGED
@@ -491,7 +491,7 @@ class bbnDateTool {
491
491
  * @returns -1 if this < other, 0 if equal, 1 if this > other
492
492
  */
493
493
  compare(date, unit = '') {
494
- const d = new bbnDateTool(date);
494
+ const d = date instanceof bbnDateTool ? date : new bbnDateTool(date);
495
495
  const realUnit = unitsCorrespondence[unit] || null;
496
496
  // If no unit or unknown unit, fall back to timestamp comparison
497
497
  if (!realUnit) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "1.0.470",
3
+ "version": "1.0.471",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",