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 2.1.2 to 2.1.3

2

dist/sort.min.js

@@ -1,1 +0,1 @@

!function(r,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(r=r||self)["fast-sort"]=n()}(this,function(){"use strict";function u(t){return function(r,n,e){return t(r,n,e)*e}}function f(r){throw Error("Invalid sort config: "+r)}function l(r){var n=r||{},e=n.asc,t=n.desc,o=e?1:-1,i=e||t;if(e&&t)throw f("Ambiguous object with `asc` and `desc` config properties");return i||f("Expected `asc` or `desc` property"),{order:o,sortBy:i,comparer:r.comparer&&u(r.comparer)}}var c=function(e,r,t,o){var n,p;if(!Array.isArray(r))return r;if(Array.isArray(t)&&t.length<2&&(t=t[0]),void 0===t||!0===t)n=function(r,n){return o(r,n,e)};else if("string"==typeof t){if(t.includes("."))throw f("String syntax not allowed for nested properties.");n=function(r,n){return o(r[t],n[t],e)}}else if("function"==typeof t)n=function(r,n){return o(t(r),t(n),e)};else{if(!Array.isArray(t)){var i=l(t);return c(i.order,r,i.sortBy,i.comparer||o)}n=(p=o,function r(n,e,t,o,i,u,f){var c,s;if("string"==typeof n)c=u[n],s=f[n];else{if("function"!=typeof n){var a=l(n);return r(a.sortBy,e,t,a.order,a.comparer||p,u,f)}c=n(u),s=n(f)}var d=i(c,s,o);return e.length>t&&(0===d||null==c&&null==s)?r(e[t],e,t+1,o,i,u,f):d}).bind(void 0,t[0],t,1,e,o)}return r.sort(n)};function r(r){var e=u(r.comparer);return function(n){return{asc:function(r){return c(1,n,r,e)},desc:function(r){return c(-1,n,r,e)},by:function(r){return c(1,n,r,e)}}}}var n=r({comparer:function(r,n,e){return null==r?e:null==n?-e:r<n?-1:r===n?0:1}});return n.createNewInstance=r,n});
!function(r,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(r=r||self)["fast-sort"]=n()}(this,function(){"use strict";function u(t){return function(r,n,e){return t(r,n,e)*e}}function f(r){throw Error("Invalid sort config: "+r)}function l(r){var n=r||{},e=n.asc,t=n.desc,o=e?1:-1,i=e||t;if(e&&t)throw f("Ambiguous object with `asc` and `desc` config properties");return i||f("Expected `asc` or `desc` property"),{order:o,sortBy:i,comparer:r.comparer&&u(r.comparer)}}var c=function(e,r,t,o){var n,p;if(!Array.isArray(r))return r;if(Array.isArray(t)&&t.length<2&&(t=t[0]),void 0===t||!0===t)n=function(r,n){return o(r,n,e)};else if("string"==typeof t){if(t.includes("."))throw f("String syntax not allowed for nested properties.");n=function(r,n){return o(r[t],n[t],e)}}else if("function"==typeof t)n=function(r,n){return o(t(r),t(n),e)};else{if(!Array.isArray(t)){var i=l(t);return c(i.order,r,i.sortBy,i.comparer||o)}p=o,n=function r(n,e,t,o,i,u,f){var c,s;if("string"==typeof n)c=u[n],s=f[n];else{if("function"!=typeof n){var a=l(n);return r(a.sortBy,e,t,a.order,a.comparer||p,u,f)}c=n(u),s=n(f)}var d=i(c,s,o);return e.length>t&&(0===d||null==c&&null==s)?r(e[t],e,t+1,o,i,u,f):d}.bind(void 0,t[0],t,1,e,o)}return r.sort(n)};function r(r){var e=u(r.comparer);return function(n){return{asc:function(r){return c(1,n,r,e)},desc:function(r){return c(-1,n,r,e)},by:function(r){return c(1,n,r,e)}}}}var n=r({comparer:function(r,n,e){return null==r?e:null==n?-e:r<n?-1:r===n?0:1}});return n.createNewInstance=r,n});
{
"name": "fast-sort",
"version": "2.1.2",
"version": "2.1.3",
"description": "Fast and powerful array sorting. Sort by any property in any direction with easy to read syntax.",

@@ -40,18 +40,18 @@ "main": "dist/sort.js",

"devDependencies": {
"@types/chai": "^4.2.5",
"@types/mocha": "^5.2.7",
"@typescript-eslint/eslint-plugin": "^2.10.0",
"@typescript-eslint/parser": "^2.10.0",
"@types/chai": "^4.2.11",
"@types/mocha": "^7.0.2",
"@typescript-eslint/eslint-plugin": "^2.31.0",
"@typescript-eslint/parser": "^2.31.0",
"chai": "^4.2.0",
"eslint": "^6.7.1",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-plugin-import": "^2.18.2",
"mocha": "^6.2.2",
"rollup": "^1.27.5",
"rollup-plugin-typescript2": "^0.25.2",
"rollup-plugin-uglify": "^6.0.3",
"ts-node": "^8.5.4",
"typescript": "^3.7.3",
"eslint": "^6.8.0",
"eslint-config-airbnb-base": "^14.1.0",
"eslint-plugin-import": "^2.20.2",
"mocha": "^7.1.2",
"rollup": "^2.8.0",
"rollup-plugin-typescript2": "^0.27.0",
"rollup-plugin-uglify": "^6.0.4",
"ts-node": "^8.10.1",
"typescript": "^3.8.3",
"watch": "^1.0.2"
}
}
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