ranges-sort 6.0.24 → 6.1.0
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/.eslintcache +1 -0
- package/CHANGELOG.md +6 -0
- package/LICENSE +2 -2
- package/README.md +2 -2
- package/dist/ranges-sort.esm.js +3 -3
- package/dist/ranges-sort.umd.js +3 -3
- package/package.json +2 -2
package/.eslintcache
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"/home/runner/work/codsen/codsen/packages/ranges-sort/examples/_quickTake.js":"1","/home/runner/work/codsen/codsen/packages/ranges-sort/perf/check.js":"2","/home/runner/work/codsen/codsen/packages/ranges-sort/rollup.config.js":"3","/home/runner/work/codsen/codsen/packages/ranges-sort/src/main.ts":"4","/home/runner/work/codsen/codsen/packages/ranges-sort/test/test.js":"5"},{"size":313,"mtime":1760566739132,"results":"6","hashOfConfig":"7"},{"size":293,"mtime":1760566739132,"results":"8","hashOfConfig":"9"},{"size":373,"mtime":1760566739132,"results":"10","hashOfConfig":"7"},{"size":3476,"mtime":1760566739132,"results":"11","hashOfConfig":"9"},{"size":6866,"mtime":1760566739133,"results":"12","hashOfConfig":"13"},{"filePath":"14","messages":"15","suppressedMessages":"16","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1nlhngw",{"filePath":"17","messages":"18","suppressedMessages":"19","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1xjytlu",{"filePath":"20","messages":"21","suppressedMessages":"22","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"23","messages":"24","suppressedMessages":"25","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","suppressedMessages":"28","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"nrihsz","/home/runner/work/codsen/codsen/packages/ranges-sort/examples/_quickTake.js",[],[],"/home/runner/work/codsen/codsen/packages/ranges-sort/perf/check.js",[],[],"/home/runner/work/codsen/codsen/packages/ranges-sort/rollup.config.js",[],[],"/home/runner/work/codsen/codsen/packages/ranges-sort/src/main.ts",[],[],"/home/runner/work/codsen/codsen/packages/ranges-sort/test/test.js",[],["29","30"],{"ruleId":"31","severity":2,"message":"32","line":3,"column":33,"nodeType":null,"messageId":"33","endLine":3,"endColumn":37,"suppressions":"34"},{"ruleId":"31","severity":2,"message":"35","line":3,"column":44,"nodeType":null,"messageId":"33","endLine":3,"endColumn":49,"suppressions":"36"},"@typescript-eslint/no-unused-vars","'type' is defined but never used.","unusedVar",["37"],"'match' is defined but never used.",["38"],{"kind":"39","justification":"40"},{"kind":"39","justification":"40"},"directive",""]
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 6.1.0 (2025-10-15)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- if value to be added is a number, keep it as is, don't stringify ([ce3e1a5](https://github.com/codsen/codsen/commit/ce3e1a525998ca3c0abf0142affef95b14cd1990))
|
|
11
|
+
|
|
6
12
|
## 6.0.0 (2022-12-01)
|
|
7
13
|
|
|
8
14
|
### BREAKING CHANGES
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright
|
|
3
|
+
Copyright © 2010-2025 Roy Revelt and other contributors
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
6
|
a copy of this software and associated documentation files (the
|
|
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
19
19
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
20
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
21
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -61,8 +61,8 @@ To report bugs or request features or assistance, [raise an issue](https://githu
|
|
|
61
61
|
|
|
62
62
|
## Licence
|
|
63
63
|
|
|
64
|
-
MIT License
|
|
64
|
+
MIT License
|
|
65
65
|
|
|
66
|
-
Copyright © 2010-2025 Roy Revelt and other contributors
|
|
66
|
+
Copyright © 2010-2025 Roy Revelt and other contributors
|
|
67
67
|
|
|
68
68
|
<p align="center"><img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center"></p>
|
package/dist/ranges-sort.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name ranges-sort
|
|
3
3
|
* @fileoverview Sort string index ranges
|
|
4
|
-
* @version 6.0
|
|
5
|
-
* @author Roy Revelt
|
|
4
|
+
* @version 6.1.0
|
|
5
|
+
* @author Roy Revelt
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/ranges-sort/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var l="6.0
|
|
10
|
+
var l="6.1.0";var y=l,c={strictlyTwoElementsInRangeArrays:!1,progressFn:null};function g(t,u){if(!Array.isArray(t)||!t.length)return t;let n={...c,...u},s,o;if(n.strictlyTwoElementsInRangeArrays&&!t.every((e,r)=>!Array.isArray(e)||e.length!==2?(s=r,o=e.length,!1):!0))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, ${s}th range (${JSON.stringify(t[s],null,4)}) has not two but ${o} elements!`);if(!t.every((e,r)=>!Array.isArray(e)||!Number.isInteger(e[0])||e[0]<0||!Number.isInteger(e[1])||e[1]<0?(s=r,!1):!0))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, ${s}th range (${JSON.stringify(t[s],null,4)}) does not consist of only natural numbers!`);let p=t.length**2,i=0;return Array.from(t).sort((e,r)=>(n.progressFn&&(i+=1,n.progressFn(Math.floor(i*100/p))),e[0]===r[0]?e[1]<r[1]?-1:e[1]>r[1]?1:0:e[0]<r[0]?-1:1))}export{c as defaults,g as rSort,y as version};
|
package/dist/ranges-sort.umd.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name ranges-sort
|
|
3
3
|
* @fileoverview Sort string index ranges
|
|
4
|
-
* @version 6.0
|
|
5
|
-
* @author Roy Revelt
|
|
4
|
+
* @version 6.1.0
|
|
5
|
+
* @author Roy Revelt
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/ranges-sort/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";var rangesSort=(()=>{var l=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols;var d=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var c=(e,t,r)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,
|
|
10
|
+
"use strict";var rangesSort=(()=>{var l=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols;var d=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var c=(e,t,r)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var r in t||(t={}))d.call(t,r)&&c(e,r,t[r]);if(a)for(var r of a(t))x.call(t,r)&&c(e,r,t[r]);return e};var b=(e,t)=>{for(var r in t)l(e,r,{get:t[r],enumerable:!0})},v=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of f(t))!d.call(e,o)&&o!==r&&l(e,o,{get:()=>t[o],enumerable:!(n=h(t,o))||n.enumerable});return e};var w=e=>v(l({},"__esModule",{value:!0}),e);var E={};b(E,{defaults:()=>y,rSort:()=>I,version:()=>j});var m="6.1.0";var j=m,y={strictlyTwoElementsInRangeArrays:!1,progressFn:null};function I(e,t){if(!Array.isArray(e)||!e.length)return e;let r=u(u({},y),t),n,o;if(r.strictlyTwoElementsInRangeArrays&&!e.every((s,i)=>!Array.isArray(s)||s.length!==2?(n=i,o=s.length,!1):!0))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(n,"th range (").concat(JSON.stringify(e[n],null,4),") has not two but ").concat(o," elements!"));if(!e.every((s,i)=>!Array.isArray(s)||!Number.isInteger(s[0])||s[0]<0||!Number.isInteger(s[1])||s[1]<0?(n=i,!1):!0))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(n,"th range (").concat(JSON.stringify(e[n],null,4),") does not consist of only natural numbers!"));let g=e.length**2,p=0;return Array.from(e).sort((s,i)=>(r.progressFn&&(p+=1,r.progressFn(Math.floor(p*100/g))),s[0]===i[0]?s[1]<i[1]?-1:s[1]>i[1]?1:0:s[0]<i[0]?-1:1))}return w(E);})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ranges-sort",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "Sort string index ranges",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"array",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"examples": "node '../../ops/scripts/run-examples.js'",
|
|
39
39
|
"lect": "node '../../ops/lect/lect.js' && npm run prettier -- 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
|
|
40
40
|
"letspublish": "npm publish --provenance || :",
|
|
41
|
-
"lint": "eslint . --fix",
|
|
41
|
+
"lint": "eslint . --fix --concurrency=auto --cache",
|
|
42
42
|
"perf": "node perf/check.js",
|
|
43
43
|
"prep": "echo 'ready'",
|
|
44
44
|
"prettier": "prettier",
|