Comparing version 1.1.9 to 1.1.10
@@ -1,1 +0,1 @@ | ||
{"name":"fast-sort","version":"1.1.9","description":"Blazing fast array sorting.","main":"sort.js","author":"Stefan Novakovic <stefan.novakovich@gmail.com>","license":"MIT","homepage":"https://github.com/snovakovic/fast-sort#readme","scripts":{"test":"node integration_test/index.js","publish":"node publish"},"repository":{"type":"git","url":"git+https://github.com/snovakovic/js-flock.git"},"bugs":{"url":"https://github.com/snovakovic/js-flock/issues"},"keywords":["sort","sortBy","order","orderBy"]} | ||
{"name":"fast-sort","version":"1.1.10","description":"Blazing fast array sorting.","main":"sort.js","author":"Stefan Novakovic <stefan.novakovich@gmail.com>","license":"MIT","homepage":"https://github.com/snovakovic/fast-sort#readme","scripts":{"test":"node integration_test/index.js","publish":"node publish"},"repository":{"type":"git","url":"git+https://github.com/snovakovic/js-flock.git"},"bugs":{"url":"https://github.com/snovakovic/js-flock/issues"},"keywords":["sort","sortBy","order","orderBy"]} |
@@ -73,3 +73,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 10); | ||
/******/ return __webpack_require__(__webpack_require__.s = 11); | ||
/******/ }) | ||
@@ -79,3 +79,3 @@ /************************************************************************/ | ||
/***/ 10: | ||
/***/ 11: | ||
/***/ (function(module, exports) { | ||
@@ -111,5 +111,3 @@ | ||
if (!Array.isArray(ctx)) { | ||
return ctx; | ||
} | ||
if (!Array.isArray(ctx)) return ctx; | ||
@@ -116,0 +114,0 @@ return Array.isArray(sortBy) ? ctx.sort(_sorter.bind(undefined, sortBy.shift(), sortBy, 0)) : ctx.sort(_sorter.bind(undefined, sortBy, undefined, 0)); |
@@ -1,1 +0,1 @@ | ||
!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("js-flock",[],t):"object"==typeof exports?exports["js-flock"]=t():n["js-flock"]=t()}(this,function(){return function(n){function t(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return n[e].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=n,t.c=r,t.d=function(n,r,e){t.o(n,r)||Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:e})},t.n=function(n){var r=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(r,"a",r),r},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=10)}({10:function(n,t){var r=function n(t,r,e,o,u,i){var f=r(u),c=r(i);return f===c?e&&e.length>o?n(t,e[o],e,o+1,u,i):0:f<c?-t:null==f?1:null==c?-1:t},e=r.bind(null,1),o=r.bind(null,-1),u=function(n){return n},i=function(n,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u;return Array.isArray(n)?Array.isArray(r)?n.sort(t.bind(void 0,r.shift(),r,0)):n.sort(t.bind(void 0,r,void 0,0)):n};n.exports=function(n){return{asc:function(t){return i(n,e,t)},desc:function(t){return i(n,o,t)}}}}})}); | ||
!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("js-flock",[],t):"object"==typeof exports?exports["js-flock"]=t():n["js-flock"]=t()}(this,function(){return function(n){function t(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return n[e].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=n,t.c=r,t.d=function(n,r,e){t.o(n,r)||Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:e})},t.n=function(n){var r=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(r,"a",r),r},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=11)}({11:function(n,t){var r=function n(t,r,e,o,u,i){var f=r(u),c=r(i);return f===c?e&&e.length>o?n(t,e[o],e,o+1,u,i):0:f<c?-t:null==f?1:null==c?-1:t},e=r.bind(null,1),o=r.bind(null,-1),u=function(n){return n},i=function(n,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u;return Array.isArray(n)?Array.isArray(r)?n.sort(t.bind(void 0,r.shift(),r,0)):n.sort(t.bind(void 0,r,void 0,0)):n};n.exports=function(n){return{asc:function(t){return i(n,e,t)},desc:function(t){return i(n,o,t)}}}}})}); |
12
sort.js
@@ -25,5 +25,3 @@ const sorter = function(direction, sortBy, thenBy, depth, a, b) { | ||
const sort = function(ctx, _sorter, sortBy = emptySortBy) { | ||
if (!Array.isArray(ctx)) { | ||
return ctx; | ||
} | ||
if (!Array.isArray(ctx)) return ctx; | ||
@@ -39,9 +37,5 @@ return Array.isArray(sortBy) | ||
return { | ||
asc(sortBy) { | ||
return sort(ctx, ascSorter, sortBy); | ||
}, | ||
desc(sortBy) { | ||
return sort(ctx, descSorter, sortBy); | ||
} | ||
asc: (sortBy) => sort(ctx, ascSorter, sortBy), | ||
desc: (sortBy) => sort(ctx, descSorter, sortBy) | ||
}; | ||
}; |
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
11952
145