Source: utils/hedStrings.js

/**
 * Get the indices of all slashes in a HED tag.
 */
export const getTagSlashIndices = function (tag) {
  const indices = []
  let i = -1
  while ((i = tag.indexOf('/', i + 1)) >= 0) {
    indices.push(i)
  }
  return indices
}