@mojir/lits 2.2.0 → 2.2.2
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/cli/cli.js +13 -3
- package/dist/full.esm.js +1 -1
- package/dist/full.esm.js.map +1 -1
- package/dist/full.js +1 -1
- package/dist/full.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/cli.js
CHANGED
|
@@ -7,7 +7,7 @@ var readline = require('node:readline');
|
|
|
7
7
|
var os = require('node:os');
|
|
8
8
|
var process$1 = require('node:process');
|
|
9
9
|
|
|
10
|
-
var version = "2.2.
|
|
10
|
+
var version = "2.2.2";
|
|
11
11
|
|
|
12
12
|
function getCodeMarker(sourceCodeInfo) {
|
|
13
13
|
if (!sourceCodeInfo.position || !sourceCodeInfo.code)
|
|
@@ -32340,12 +32340,22 @@ const functionReference = {
|
|
|
32340
32340
|
...specialExpressionsReference,
|
|
32341
32341
|
};
|
|
32342
32342
|
// Core API reference (always available)
|
|
32343
|
-
const apiReference = { ...functionReference, ...shorthand, ...datatype };
|
|
32343
|
+
const apiReference = sortByCategory({ ...functionReference, ...shorthand, ...datatype });
|
|
32344
32344
|
// All references including modules (for search and full documentation)
|
|
32345
|
-
const allReference = { ...apiReference, ...moduleReference };
|
|
32345
|
+
const allReference = sortByCategory({ ...apiReference, ...moduleReference });
|
|
32346
32346
|
Object.values(allReference).forEach((ref) => {
|
|
32347
32347
|
ref.title = ref.title.replace(/"/g, '"');
|
|
32348
32348
|
});
|
|
32349
|
+
function sortByCategory(ref) {
|
|
32350
|
+
return Object.fromEntries(Object.entries(ref).sort(([keyA, refA], [keyB, refB]) => {
|
|
32351
|
+
const catA = refA.category === 'special-expression' ? '' : refA.category;
|
|
32352
|
+
const catB = refB.category === 'special-expression' ? '' : refB.category;
|
|
32353
|
+
if (catA !== catB) {
|
|
32354
|
+
return catA.localeCompare(catB);
|
|
32355
|
+
}
|
|
32356
|
+
return keyA.localeCompare(keyB);
|
|
32357
|
+
}));
|
|
32358
|
+
}
|
|
32349
32359
|
|
|
32350
32360
|
function stringifyValue(value, html) {
|
|
32351
32361
|
const gt = '>';
|