@keyline-icons/cli 0.6.0 → 0.7.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/icons.json +1 -1
- package/package.json +1 -1
- package/src/index.mjs +5 -2
package/package.json
CHANGED
package/src/index.mjs
CHANGED
|
@@ -26,7 +26,7 @@ const data = JSON.parse(
|
|
|
26
26
|
// older icons.json still runs rather than reading `undefined.includes`.
|
|
27
27
|
const { icons, styles, corners = ["regular"], keywords = {} } = data
|
|
28
28
|
const NAMES = Object.keys(icons)
|
|
29
|
-
const VERSION = "0.
|
|
29
|
+
const VERSION = "0.7.0"
|
|
30
30
|
|
|
31
31
|
/** Colour only when a human is looking. Piped output stays clean. */
|
|
32
32
|
const tty = process.stdout.isTTY
|
|
@@ -120,9 +120,12 @@ function svgFor(name, style, corners = "regular") {
|
|
|
120
120
|
/** Kept in step with `@keyline-icons/mcp`, which carries the reasoning. */
|
|
121
121
|
function wordsOf(query) {
|
|
122
122
|
const identifier =
|
|
123
|
-
/[a-z][A-Z]/.test(query) ||
|
|
123
|
+
/[a-z][A-Z]/.test(query) ||
|
|
124
|
+
/^[A-Z][A-Za-z]*\d+$/.test(query) ||
|
|
125
|
+
/^[A-Z][A-Za-z]*\d*Icon$/.test(query)
|
|
124
126
|
const split = identifier
|
|
125
127
|
? query
|
|
128
|
+
.replace(/\d*Icon$/, "")
|
|
126
129
|
.replace(/([a-z0-9])([A-Z])/g, "$1 $2")
|
|
127
130
|
.replace(/([a-zA-Z])(\d)/g, "$1 $2")
|
|
128
131
|
: query
|