serialize-query-params
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -50,2 +50,12 @@ import * as Serialize from './serialize'; | ||
decode: Serialize.decodeDate, | ||
equals: function (valueA, valueB) { | ||
if (valueA === valueB) | ||
return true; | ||
if (valueA == null || valueB == null) | ||
return valueA === valueB; | ||
// ignore time of day | ||
return (valueA.getFullYear() === valueB.getFullYear() && | ||
valueA.getMonth() === valueB.getMonth() && | ||
valueA.getDate() === valueB.getDate()); | ||
}, | ||
}; | ||
@@ -58,2 +68,9 @@ /** | ||
decode: Serialize.decodeDateTime, | ||
equals: function (valueA, valueB) { | ||
if (valueA === valueB) | ||
return true; | ||
if (valueA == null || valueB == null) | ||
return valueA === valueB; | ||
return valueA.valueOf() === valueB.valueOf(); | ||
}, | ||
}; | ||
@@ -60,0 +77,0 @@ /** |
@@ -20,2 +20,4 @@ /** | ||
decode: (value: string | (string | null)[] | null | undefined) => D2; | ||
/** Checks if two values are equal (otherwise typically shallowEqual will be used) */ | ||
equals?: (valueA: D | D2, valueB: D | D2) => boolean; | ||
} | ||
@@ -22,0 +24,0 @@ /** |
@@ -52,2 +52,12 @@ "use strict"; | ||
decode: Serialize.decodeDate, | ||
equals: function (valueA, valueB) { | ||
if (valueA === valueB) | ||
return true; | ||
if (valueA == null || valueB == null) | ||
return valueA === valueB; | ||
// ignore time of day | ||
return (valueA.getFullYear() === valueB.getFullYear() && | ||
valueA.getMonth() === valueB.getMonth() && | ||
valueA.getDate() === valueB.getDate()); | ||
}, | ||
}; | ||
@@ -60,2 +70,9 @@ /** | ||
decode: Serialize.decodeDateTime, | ||
equals: function (valueA, valueB) { | ||
if (valueA === valueB) | ||
return true; | ||
if (valueA == null || valueB == null) | ||
return valueA === valueB; | ||
return valueA.valueOf() === valueB.valueOf(); | ||
}, | ||
}; | ||
@@ -62,0 +79,0 @@ /** |
@@ -20,2 +20,4 @@ /** | ||
decode: (value: string | (string | null)[] | null | undefined) => D2; | ||
/** Checks if two values are equal (otherwise typically shallowEqual will be used) */ | ||
equals?: (valueA: D | D2, valueB: D | D2) => boolean; | ||
} | ||
@@ -22,0 +24,0 @@ /** |
{ | ||
"name": "serialize-query-params", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "A library for simplifying encoding and decoding URL query parameters.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
92410
2235