Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sort-any

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sort-any - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

5

build/index.js

@@ -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;

2

package.json
{
"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
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc