Make uncanny skip hidden/non-PNG files
This commit is contained in:
parent
f781fb1ae5
commit
c5b50cf73b
1 changed files with 3 additions and 1 deletions
|
@ -4,7 +4,9 @@ import { readdirSync } from "fs";
|
|||
import { resolve, dirname } from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
const prompts = ["you found:", "your dad is:", "you ate:", "your mom is:", "your sister is:", "you saw:", "you get lost in:", "you find:", "you grab:", "you pull out of your pocket:", "you fight:", "it's in your room:"];
|
||||
const names = readdirSync(resolve(dirname(fileURLToPath(import.meta.url)), "../../assets/images/uncanny/")).map((val) => {
|
||||
const names = readdirSync(resolve(dirname(fileURLToPath(import.meta.url)), "../../assets/images/uncanny/")).filter((val) => {
|
||||
if (!val.startsWith(".") && val.endsWith(".png")) return true;
|
||||
}).map((val) => {
|
||||
return val.split(".")[0];
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue