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.
@@ -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.3
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, {}, originalOptions);
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.3
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, {}, originalOptions); // arrOfRanges validation
108
+ var opts = _objectSpread2(_objectSpread2({}, defaults), originalOptions); // arrOfRanges validation
109
109
 
110
110
 
111
111
  var culpritsIndex;
@@ -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.3
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
@@ -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.3
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}return function(n,o){if(!Array.isArray(n))throw new TypeError("ranges-sort: [THROW_ID_01] Input must be an array, consisting of range arrays! Currently its type is: ".concat(r(n),", equal to: ").concat(JSON.stringify(n,null,4)));if(0===n.length)return n;var s,i,a=function(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}({},{strictlyTwoElementsInRangeArrays:!1,progressFn:null},{},o);if(a.strictlyTwoElementsInRangeArrays&&!n.every((function(r,e){return 2===r.length||(s=e,i=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(s,"th range (").concat(JSON.stringify(n[s],null,4),") has not two but ").concat(i," elements!"));if(!n.every((function(r,e){return!(!Number.isInteger(r[0])||r[0]<0||!Number.isInteger(r[1])||r[1]<0)||(s=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(s,"th range (").concat(JSON.stringify(n[s],null,4),") does not consist of only natural numbers!"));var u=n.length*n.length,c=0;return Array.from(n).sort((function(r,e){return a.progressFn&&(c+=1,a.progressFn(Math.floor(100*c/u))),r[0]===e[0]?r[1]<e[1]?-1:r[1]>e[1]?1:0:r[0]<e[0]?-1:1}))}}));
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",
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.0",
121
- "@babel/preset-env": "^7.9.5",
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.12.8",
127
- "rollup": "^2.7.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",