« get me outta code hell

Ugh!! - http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
path: root/src/playlist-utils.js
diff options
context:
space:
mode:
authorliam4 <towerofnix@gmail.com>2017-06-21 19:04:48 +0000
committerliam4 <towerofnix@gmail.com>2017-06-21 19:04:55 +0000
commit8107e3f49ef959061d7fe0e04ef2f6eda01df354 (patch)
treed62a0e5eedcf7243641309418d4de7f4810e9911 /src/playlist-utils.js
parent0f6be3c9f221aeed36970fc488c812ee1dadd97f (diff)
Ugh!!
Diffstat (limited to 'src/playlist-utils.js')
-rw-r--r--src/playlist-utils.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/playlist-utils.js b/src/playlist-utils.js
index ff19ea9..13c6003 100644
--- a/src/playlist-utils.js
+++ b/src/playlist-utils.js
@@ -130,6 +130,7 @@ function parsePathString(pathString) {
   return pathParts
 }
 
+// TODO: Are these two functions actually useful??
 function getGroupTitle(group) {
   return group[0]
 }
@@ -142,11 +143,16 @@ function isGroup(array) {
   return Array.isArray(array[1])
 }
 
+function isTrack(array) {
+  return typeof array[1] === 'string'
+}
+
 module.exports = {
   flattenPlaylist,
   filterPlaylistByPathString, filterPlaylistByPath,
   removeGroupByPathString, removeGroupByPath,
   getPlaylistTreeString,
   parsePathString,
-  getGroupTitle, getGroupContents
+  getGroupTitle, getGroupContents,
+  isGroup, isTrack
 }