ranges-sort 3.13.0 → 3.13.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/LICENSE +1 -1
- package/README.md +44 -7
- package/dist/ranges-sort.cjs.js +1 -1
- package/dist/ranges-sort.dev.umd.js +1 -1
- package/dist/ranges-sort.esm.js +1 -1
- package/dist/ranges-sort.umd.js +1 -1
- package/examples/_quickTake.js +20 -0
- package/examples/api.json +1 -0
- package/package.json +35 -35
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2010-2020 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
|
package/README.md
CHANGED
|
@@ -2,7 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
> Sort string index ranges
|
|
4
4
|
|
|
5
|
-
<
|
|
5
|
+
<div class="package-badges">
|
|
6
|
+
<a href="https://www.npmjs.com/package/ranges-sort" rel="nofollow noreferrer noopener">
|
|
7
|
+
<img src="https://img.shields.io/badge/-npm-blue?style=flat-square" alt="page on npm">
|
|
8
|
+
</a>
|
|
9
|
+
<a href="https://codsen.com/os/ranges-sort" rel="nofollow noreferrer noopener">
|
|
10
|
+
<img src="https://img.shields.io/badge/-Codsen-blue?style=flat-square" alt="page on npm">
|
|
11
|
+
</a>
|
|
12
|
+
<a href="https://gitlab.com/codsen/codsen/tree/master/packages/ranges-sort" rel="nofollow noreferrer noopener">
|
|
13
|
+
<img src="https://img.shields.io/badge/-GitLab-blue?style=flat-square" alt="page on GitLab">
|
|
14
|
+
</a>
|
|
15
|
+
<a href="https://npmcharts.com/compare/ranges-sort?interval=30" rel="nofollow noreferrer noopener" target="_blank">
|
|
16
|
+
<img src="https://img.shields.io/npm/dm/ranges-sort.svg?style=flat-square" alt="Downloads per month">
|
|
17
|
+
</a>
|
|
18
|
+
<a href="https://prettier.io" rel="nofollow noreferrer noopener" target="_blank">
|
|
19
|
+
<img src="https://img.shields.io/badge/code_style-prettier-brightgreen.svg?style=flat-square" alt="Code style: prettier">
|
|
20
|
+
</a>
|
|
21
|
+
<img src="https://img.shields.io/badge/licence-MIT-brightgreen.svg?style=flat-square" alt="MIT License">
|
|
22
|
+
<a href="https://liberamanifesto.com" rel="nofollow noreferrer noopener" target="_blank">
|
|
23
|
+
<img src="https://img.shields.io/badge/libera-manifesto-lightgrey.svg?style=flat-square" alt="libera manifesto">
|
|
24
|
+
</a>
|
|
25
|
+
</div>
|
|
6
26
|
|
|
7
27
|
## Install
|
|
8
28
|
|
|
@@ -10,18 +30,35 @@
|
|
|
10
30
|
npm i ranges-sort
|
|
11
31
|
```
|
|
12
32
|
|
|
13
|
-
|
|
33
|
+
## Quick Take
|
|
14
34
|
|
|
15
|
-
|
|
35
|
+
```js
|
|
36
|
+
import { strict as assert } from "assert";
|
|
37
|
+
import rsort from "ranges-sort";
|
|
38
|
+
|
|
39
|
+
// Ranges (see codsen.com/ranges/) are sorted:
|
|
40
|
+
assert.deepEqual(
|
|
41
|
+
rsort([
|
|
42
|
+
[2, 3],
|
|
43
|
+
[9, 10, "bad grey wolf"],
|
|
44
|
+
[1, 2],
|
|
45
|
+
]),
|
|
46
|
+
[
|
|
47
|
+
[1, 2],
|
|
48
|
+
[2, 3],
|
|
49
|
+
[9, 10, "bad grey wolf"],
|
|
50
|
+
]
|
|
51
|
+
);
|
|
52
|
+
```
|
|
16
53
|
|
|
17
|
-
|
|
54
|
+
## Documentation
|
|
18
55
|
|
|
19
|
-
|
|
56
|
+
Please [visit codsen.com](https://codsen.com/os/ranges-sort/) for a full description of the API and examples.
|
|
20
57
|
|
|
21
58
|
## Licence
|
|
22
59
|
|
|
23
60
|
MIT License
|
|
24
61
|
|
|
25
|
-
Copyright (c)
|
|
62
|
+
Copyright (c) 2010-2020 Roy Revelt and other contributors
|
|
26
63
|
|
|
27
|
-
<img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center">
|
|
64
|
+
<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">
|
package/dist/ranges-sort.cjs.js
CHANGED
package/dist/ranges-sort.esm.js
CHANGED
package/dist/ranges-sort.umd.js
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* eslint import/extensions:0, no-unused-vars:0 */
|
|
2
|
+
|
|
3
|
+
// Quick Take
|
|
4
|
+
|
|
5
|
+
import { strict as assert } from "assert";
|
|
6
|
+
import rsort from "../dist/ranges-sort.esm.js";
|
|
7
|
+
|
|
8
|
+
// Ranges (see codsen.com/ranges/) are sorted:
|
|
9
|
+
assert.deepEqual(
|
|
10
|
+
rsort([
|
|
11
|
+
[2, 3],
|
|
12
|
+
[9, 10, "bad grey wolf"],
|
|
13
|
+
[1, 2],
|
|
14
|
+
]),
|
|
15
|
+
[
|
|
16
|
+
[1, 2],
|
|
17
|
+
[2, 3],
|
|
18
|
+
[9, 10, "bad grey wolf"],
|
|
19
|
+
]
|
|
20
|
+
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"_quickTake.js":{"title":"Quick Take","content":"import { strict as assert } from \"assert\";\nimport rsort from \"ranges-sort\";\n\n// Ranges (see codsen.com/ranges/) are sorted:\nassert.deepEqual(\n rsort([\n [2, 3],\n [9, 10, \"bad grey wolf\"],\n [1, 2],\n ]),\n [\n [1, 2],\n [2, 3],\n [9, 10, \"bad grey wolf\"],\n ]\n);"}}
|
package/package.json
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ranges-sort",
|
|
3
|
-
"version": "3.13.
|
|
3
|
+
"version": "3.13.4",
|
|
4
4
|
"description": "Sort string index ranges",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"repository": "https://gitlab.com/codsen/codsen/",
|
|
7
|
-
"homepage": "https://codsen.com/os/ranges-sort/",
|
|
8
|
-
"author": {
|
|
9
|
-
"email": "roy@codsen.com",
|
|
10
|
-
"name": "Roy Revelt",
|
|
11
|
-
"url": "codsen.com"
|
|
12
|
-
},
|
|
13
5
|
"keywords": [
|
|
14
6
|
"array",
|
|
15
7
|
"indexes",
|
|
@@ -17,6 +9,14 @@
|
|
|
17
9
|
"sort",
|
|
18
10
|
"string"
|
|
19
11
|
],
|
|
12
|
+
"homepage": "https://codsen.com/os/ranges-sort/",
|
|
13
|
+
"repository": "https://gitlab.com/codsen/codsen/",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "Roy Revelt",
|
|
17
|
+
"email": "roy@codsen.com",
|
|
18
|
+
"url": "https://codsen.com"
|
|
19
|
+
},
|
|
20
20
|
"main": "dist/ranges-sort.cjs.js",
|
|
21
21
|
"module": "dist/ranges-sort.esm.js",
|
|
22
22
|
"browser": "dist/ranges-sort.umd.js",
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
"republish": "npm publish || :",
|
|
36
36
|
"tap": "tap",
|
|
37
37
|
"pretest": "npm run build",
|
|
38
|
-
"test": "npm run lint && npm run unittest && npm run clean_cov && npm run format",
|
|
38
|
+
"test": "npm run lint && npm run unittest && npm run test:examples && npm run clean_cov && npm run format",
|
|
39
|
+
"test:examples": "../../scripts/test-examples.js && npm run lect && npm run prettier",
|
|
39
40
|
"tsd": "tsd",
|
|
40
41
|
"unittest": "./node_modules/.bin/tap --no-only --output-file=testStats.md && npm run clean_cov && npm run perf",
|
|
41
42
|
"version": "npm run build && git add ."
|
|
@@ -45,6 +46,17 @@
|
|
|
45
46
|
"pre-commit": "npm run format && npm test"
|
|
46
47
|
}
|
|
47
48
|
},
|
|
49
|
+
"tap": {
|
|
50
|
+
"coverage-report": [
|
|
51
|
+
"json-summary",
|
|
52
|
+
"text"
|
|
53
|
+
],
|
|
54
|
+
"nyc-arg": [
|
|
55
|
+
"--exclude=**/*.cjs.js",
|
|
56
|
+
"--exclude=**/*.umd.js"
|
|
57
|
+
],
|
|
58
|
+
"timeout": 0
|
|
59
|
+
},
|
|
48
60
|
"lect": {
|
|
49
61
|
"defaultExported": true,
|
|
50
62
|
"files": {
|
|
@@ -74,40 +86,28 @@
|
|
|
74
86
|
"goodFolders": []
|
|
75
87
|
},
|
|
76
88
|
"req": "rsort",
|
|
77
|
-
"typeSriptDefinitions": false,
|
|
78
89
|
"various": {
|
|
79
90
|
"devDependencies": []
|
|
80
91
|
}
|
|
81
92
|
},
|
|
82
|
-
"tap": {
|
|
83
|
-
"coverage-report": [
|
|
84
|
-
"json-summary",
|
|
85
|
-
"text"
|
|
86
|
-
],
|
|
87
|
-
"nyc-arg": [
|
|
88
|
-
"--exclude=**/*.cjs.js",
|
|
89
|
-
"--exclude=**/*.umd.js"
|
|
90
|
-
],
|
|
91
|
-
"timeout": 0
|
|
92
|
-
},
|
|
93
93
|
"devDependencies": {
|
|
94
|
-
"@babel/core": "^7.
|
|
95
|
-
"@babel/plugin-proposal-class-properties": "^7.
|
|
96
|
-
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.
|
|
97
|
-
"@babel/plugin-proposal-object-rest-spread": "^7.
|
|
98
|
-
"@babel/plugin-proposal-optional-chaining": "^7.
|
|
99
|
-
"@babel/preset-env": "^7.
|
|
100
|
-
"@rollup/plugin-babel": "^5.2.
|
|
101
|
-
"@rollup/plugin-commonjs": "^
|
|
102
|
-
"@rollup/plugin-node-resolve": "^
|
|
94
|
+
"@babel/core": "^7.12.3",
|
|
95
|
+
"@babel/plugin-proposal-class-properties": "^7.12.1",
|
|
96
|
+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1",
|
|
97
|
+
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
|
|
98
|
+
"@babel/plugin-proposal-optional-chaining": "^7.12.1",
|
|
99
|
+
"@babel/preset-env": "^7.12.1",
|
|
100
|
+
"@rollup/plugin-babel": "^5.2.1",
|
|
101
|
+
"@rollup/plugin-commonjs": "^16.0.0",
|
|
102
|
+
"@rollup/plugin-node-resolve": "^10.0.0",
|
|
103
103
|
"@rollup/plugin-strip": "^2.0.0",
|
|
104
104
|
"benchmark": "^2.1.4",
|
|
105
|
-
"eslint": "^7.
|
|
106
|
-
"lect": "^0.
|
|
107
|
-
"rollup": "^2.
|
|
105
|
+
"eslint": "^7.13.0",
|
|
106
|
+
"lect": "^0.14.8",
|
|
107
|
+
"rollup": "^2.33.1",
|
|
108
108
|
"rollup-plugin-ascii": "^0.0.3",
|
|
109
109
|
"rollup-plugin-banner": "^0.2.1",
|
|
110
|
-
"rollup-plugin-cleanup": "^3.
|
|
110
|
+
"rollup-plugin-cleanup": "^3.2.1",
|
|
111
111
|
"rollup-plugin-terser": "^7.0.2",
|
|
112
112
|
"tap": "^14.10.8",
|
|
113
113
|
"tsd": "^0.13.1"
|