Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
function getSlotOrder(position: number, index: number, count: number) {
  if (index - position < 0) {
    return count - Math.abs(index - position)
  }
  return index - position
}

function validatePosition(index: number, count: number) {
  return index < 0 ? Math.abs(index) * 2 : index > count - 1 ? 0 : index
}

export { getSlotOrder, validatePosition, validatePosition as toValidPosition }