(_str)
| 22 | |
| 23 | // get the name without last 4 characters -> slice .png from the name |
| 24 | const cleanName = (_str) => { |
| 25 | let name = _str.slice(0, -4); |
| 26 | return name; |
| 27 | }; |
| 28 | |
| 29 | // reads the filenames of a given folder and returns it with its name and path |
| 30 | const getElements = (_path, _elementCount) => { |