diff options
Diffstat (limited to 'webAO/client/isAudio.ts')
| -rw-r--r-- | webAO/client/isAudio.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/webAO/client/isAudio.ts b/webAO/client/isAudio.ts new file mode 100644 index 0000000..430f543 --- /dev/null +++ b/webAO/client/isAudio.ts @@ -0,0 +1,6 @@ +export const isAudio = (trackname: string) => { + const audioEndings = [".wav", ".mp3", ".ogg", ".opus"]; + return ( + audioEndings.filter((ending) => trackname.endsWith(ending)).length === 1 + ); +}
\ No newline at end of file |
