ranges-sort 3.11.3 → 3.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ranges-sort.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ranges-sort
|
|
3
3
|
* Sort natural number index ranges [ [5, 6], [1, 3] ] => [ [1, 3], [5, 6] ]
|
|
4
|
-
* Version: 3.11.
|
|
4
|
+
* Version: 3.11.4
|
|
5
5
|
* Author: Roy Revelt, Codsen Ltd
|
|
6
6
|
* License: MIT
|
|
7
7
|
* Homepage: https://gitlab.com/codsen/codsen/tree/master/packages/ranges-sort
|
|
@@ -85,7 +85,7 @@ function rangesSort(arrOfRanges, originalOptions) {
|
|
|
85
85
|
strictlyTwoElementsInRangeArrays: false,
|
|
86
86
|
progressFn: null
|
|
87
87
|
};
|
|
88
|
-
var opts = _objectSpread2({}, defaults,
|
|
88
|
+
var opts = _objectSpread2(_objectSpread2({}, defaults), originalOptions);
|
|
89
89
|
var culpritsIndex;
|
|
90
90
|
var culpritsLen;
|
|
91
91
|
if (opts.strictlyTwoElementsInRangeArrays && !arrOfRanges.every(function (rangeArr, indx) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ranges-sort
|
|
3
3
|
* Sort natural number index ranges [ [5, 6], [1, 3] ] => [ [1, 3], [5, 6] ]
|
|
4
|
-
* Version: 3.11.
|
|
4
|
+
* Version: 3.11.4
|
|
5
5
|
* Author: Roy Revelt, Codsen Ltd
|
|
6
6
|
* License: MIT
|
|
7
7
|
* Homepage: https://gitlab.com/codsen/codsen/tree/master/packages/ranges-sort
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
progressFn: null
|
|
106
106
|
}; // fill any settings with defaults if missing:
|
|
107
107
|
|
|
108
|
-
var opts = _objectSpread2({}, defaults,
|
|
108
|
+
var opts = _objectSpread2(_objectSpread2({}, defaults), originalOptions); // arrOfRanges validation
|
|
109
109
|
|
|
110
110
|
|
|
111
111
|
var culpritsIndex;
|
package/dist/ranges-sort.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ranges-sort
|
|
3
3
|
* Sort natural number index ranges [ [5, 6], [1, 3] ] => [ [1, 3], [5, 6] ]
|
|
4
|
-
* Version: 3.11.
|
|
4
|
+
* Version: 3.11.4
|
|
5
5
|
* Author: Roy Revelt, Codsen Ltd
|
|
6
6
|
* License: MIT
|
|
7
7
|
* Homepage: https://gitlab.com/codsen/codsen/tree/master/packages/ranges-sort
|
package/dist/ranges-sort.umd.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ranges-sort
|
|
3
3
|
* Sort natural number index ranges [ [5, 6], [1, 3] ] => [ [1, 3], [5, 6] ]
|
|
4
|
-
* Version: 3.11.
|
|
4
|
+
* Version: 3.11.4
|
|
5
5
|
* Author: Roy Revelt, Codsen Ltd
|
|
6
6
|
* License: MIT
|
|
7
7
|
* Homepage: https://gitlab.com/codsen/codsen/tree/master/packages/ranges-sort
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(r=r||self).rangesSort=e()}(this,(function(){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function e(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function t(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}
|
|
10
|
+
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(r=r||self).rangesSort=e()}(this,(function(){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function e(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function t(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function n(r){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?t(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}return function(e,t){if(!Array.isArray(e))throw new TypeError("ranges-sort: [THROW_ID_01] Input must be an array, consisting of range arrays! Currently its type is: ".concat(r(e),", equal to: ").concat(JSON.stringify(e,null,4)));if(0===e.length)return e;var o,s,i=n(n({},{strictlyTwoElementsInRangeArrays:!1,progressFn:null}),t);if(i.strictlyTwoElementsInRangeArrays&&!e.every((function(r,e){return 2===r.length||(o=e,s=r.length,!1)})))throw new TypeError("ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ".concat(o,"th range (").concat(JSON.stringify(e[o],null,4),") has not two but ").concat(s," elements!"));if(!e.every((function(r,e){return!(!Number.isInteger(r[0])||r[0]<0||!Number.isInteger(r[1])||r[1]<0)||(o=e,!1)})))throw new TypeError("ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ".concat(o,"th range (").concat(JSON.stringify(e[o],null,4),") does not consist of only natural numbers!"));var a=e.length*e.length,u=0;return Array.from(e).sort((function(r,e){return i.progressFn&&(u+=1,i.progressFn(Math.floor(100*u/a))),r[0]===e[0]?r[1]<e[1]?-1:r[1]>e[1]?1:0:r[0]<e[0]?-1:1}))}}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ranges-sort",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.4",
|
|
4
4
|
"description": "Sort natural number index ranges [ [5, 6], [1, 3] ] => [ [1, 3], [5, 6] ]",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://gitlab.com/codsen/codsen/",
|
|
@@ -117,16 +117,16 @@
|
|
|
117
117
|
"timeout": 0
|
|
118
118
|
},
|
|
119
119
|
"devDependencies": {
|
|
120
|
-
"@babel/core": "^7.9.
|
|
121
|
-
"@babel/preset-env": "^7.9.
|
|
120
|
+
"@babel/core": "^7.9.6",
|
|
121
|
+
"@babel/preset-env": "^7.9.6",
|
|
122
|
+
"@rollup/plugin-babel": "^5.0.0",
|
|
122
123
|
"@rollup/plugin-commonjs": "^11.1.0",
|
|
123
124
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
124
125
|
"@rollup/plugin-strip": "^1.3.2",
|
|
125
126
|
"benchmark": "^2.1.4",
|
|
126
|
-
"lect": "^0.
|
|
127
|
-
"rollup": "^2.
|
|
127
|
+
"lect": "^0.13.0",
|
|
128
|
+
"rollup": "^2.8.0",
|
|
128
129
|
"rollup-plugin-ascii": "^0.0.3",
|
|
129
|
-
"rollup-plugin-babel": "^4.4.0",
|
|
130
130
|
"rollup-plugin-banner": "^0.2.1",
|
|
131
131
|
"rollup-plugin-cleanup": "^3.1.1",
|
|
132
132
|
"rollup-plugin-terser": "^5.3.0",
|