Comparing version 2.0.0 to 3.0.0
@@ -17,2 +17,3 @@ 'use strict'; | ||
date: Symbol('date'), | ||
set: Symbol('set'), | ||
array: Symbol('array'), | ||
@@ -27,2 +28,3 @@ object: Symbol('object') | ||
[types.array]: compareArray, | ||
[types.set]: (a, b) => compareArray([...a], [...b]), | ||
[types.number]: standardCompare, | ||
@@ -63,2 +65,5 @@ [types.object]: compareObject, | ||
} | ||
if (value instanceof Set) { | ||
return types.set; | ||
} | ||
if (Array.isArray(value)) { | ||
@@ -65,0 +70,0 @@ return types.array; |
{ | ||
"name": "sort-any", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "Sorts any JavaScript array in a predictable way (deep equal arrays are always sorted in the same order)", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -112,2 +112,3 @@ # sort-any | ||
- date | ||
- set | ||
- array | ||
@@ -138,1 +139,3 @@ - object (all the objects except of arrays, dates and null) | ||
- if all the keys are the same, the objects are equal | ||
- rules of sets sorting: | ||
- the set is converted to an array and the array sorting rules apply |
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
10009
147
140