MCPcopy Create free account
hub / github.com/neomjs/neo / sortArray

Function sortArray

buildScripts/helpers/convertDesignTokens.mjs:129–140  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

127}
128
129function sortArray(a, b) {
130 const nameA = a[0].toUpperCase();
131 const nameB = b[0].toUpperCase();
132 if (nameA < nameB) {
133 return -1;
134 }
135 if (nameA > nameB) {
136 return 1;
137 }
138
139 return 0;
140}
141
142jsonFolder.forEach(fileName => {
143 if (fileName.endsWith(".json")) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected