rechrome 1.12.1 → 1.12.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/package.json +1 -1
- package/rech.js +6 -3
- package/rech.ts +6 -3
package/package.json
CHANGED
package/rech.js
CHANGED
|
@@ -687,9 +687,12 @@ async function setup(opts: { profile?: string } = {}): Promise<void> {
|
|
|
687
687
|
);
|
|
688
688
|
if (opts.profile !== undefined) {
|
|
689
689
|
const num = parseInt(opts.profile);
|
|
690
|
-
if (!isNaN(num)) return available[num - 1] ?? null;
|
|
691
|
-
|
|
692
|
-
|
|
690
|
+
if (!isNaN(num) && String(num) === opts.profile.trim()) return available[num - 1] ?? null;
|
|
691
|
+
const needle = opts.profile.toLowerCase();
|
|
692
|
+
return available.find(([dir, info]) =>
|
|
693
|
+
dir.toLowerCase() === needle
|
|
694
|
+
|| (info.name ?? "").toLowerCase() === needle
|
|
695
|
+
|| (info.user_name ?? "").toLowerCase().includes(needle)
|
|
693
696
|
) ?? null;
|
|
694
697
|
}
|
|
695
698
|
if (available.length === 1) {
|
package/rech.ts
CHANGED
|
@@ -687,9 +687,12 @@ async function setup(opts: { profile?: string } = {}): Promise<void> {
|
|
|
687
687
|
);
|
|
688
688
|
if (opts.profile !== undefined) {
|
|
689
689
|
const num = parseInt(opts.profile);
|
|
690
|
-
if (!isNaN(num)) return available[num - 1] ?? null;
|
|
691
|
-
|
|
692
|
-
|
|
690
|
+
if (!isNaN(num) && String(num) === opts.profile.trim()) return available[num - 1] ?? null;
|
|
691
|
+
const needle = opts.profile.toLowerCase();
|
|
692
|
+
return available.find(([dir, info]) =>
|
|
693
|
+
dir.toLowerCase() === needle
|
|
694
|
+
|| (info.name ?? "").toLowerCase() === needle
|
|
695
|
+
|| (info.user_name ?? "").toLowerCase().includes(needle)
|
|
693
696
|
) ?? null;
|
|
694
697
|
}
|
|
695
698
|
if (available.length === 1) {
|