Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3b3dbf1

Browse files
committed
refactor: useArray#toSorted() instead ofArray#sort()
1 parent7bbe4a5 commit3b3dbf1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎build/llm.mjs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ CoreUI builds upon Bootstrap by providing production-ready components, advanced
106106
`
107107

108108
constgroupOrder=['components','forms','utilities','helpers']
109-
constsortedGroups=Object.keys(sections).sort((a,b)=>{
109+
constsortedGroups=Object.keys(sections).toSorted((a,b)=>{
110110
constai=groupOrder.indexOf(a)
111111
constbi=groupOrder.indexOf(b)
112112
return(ai===-1 ?999 :ai)-(bi===-1 ?999 :bi)
@@ -116,7 +116,7 @@ CoreUI builds upon Bootstrap by providing production-ready components, advanced
116116
indexContent+=`## 📁${
117117
group.charAt(0).toUpperCase()+group.slice(1)
118118
}\n\n`
119-
for(constitemofsections[group].sort((a,b)=>
119+
for(constitemofsections[group].toSorted((a,b)=>
120120
a.title.localeCompare(b.title)
121121
)){
122122
indexContent+=`- [${item.title}](${item.path})\n`
@@ -146,7 +146,7 @@ async function generateSingleMergedFile() {
146146
letmergedContent=`# 🧠 CoreUI LLM Knowledge Base\n\n`
147147
mergedContent+=`This file contains all CoreUI documentation files in a format optimized for large language models (LLMs).\n\n`
148148

149-
for(constfilePathofallFiles.sort()){
149+
for(constfilePathofallFiles.toSorted()){
150150
constrelPath=path.relative(inputDir,filePath)
151151
constrelativeDir=relPath.split(path.sep)[0]
152152

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp