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

fast-sort

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-sort - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

2

package.json
{
"name": "fast-sort",
"version": "3.0.1",
"version": "3.0.2",
"description": "Fast and powerful array sorting. Sort by any property in any direction with easy to read syntax.",

@@ -5,0 +5,0 @@ "main": "dist/sort.min.js",

@@ -25,6 +25,6 @@ # fast-sort

// Sort users (array of objects) by firstName in descending order
sort(users).desc(u => u.firstName);
const sorted = sort(users).desc(u => u.firstName);
// Sort users in ascending order by firstName and lastName
sort(users).asc([
const sorted = sort(users).asc([
u => u.firstName,

@@ -35,3 +35,3 @@ u => u.lastName

// Sort users ascending by firstName and descending by city
sort(users).by([
const sorted = sort(users).by([
{ asc: u => u.firstName },

@@ -42,10 +42,10 @@ { desc: u => u.address.city }

// Sort based on computed property
sort(repositories).desc(r => r.openIssues + r.closedIssues);
const sorted = sort(repositories).desc(r => r.openIssues + r.closedIssues);
// Sort using string for object key
// Only available for root object properties
sort(users).asc('firstName');
const sorted = sort(users).asc('firstName');
```
Fore even more examples check [unit tests](https://github.com/snovakovic/fast-sort/blob/master/test/sort.spec.ts).
Fore more examples check [unit tests](https://github.com/snovakovic/fast-sort/blob/master/test/sort.spec.ts).

@@ -52,0 +52,0 @@ ## Highlights

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