module Sprockets::Transformers

def expand_transform_accepts(parsed_accepts)

Returns an expanded Array of q values.

# => [['application/javascript', 1.0], ['text/coffeescript', 0.8]]
expand_transform_accepts([['application/javascript', 1.0]])

Examples

parsed_accepts - Array of accept q values

Internal: Expand accept type list to include possible transformed types.
def expand_transform_accepts(parsed_accepts)
  accepts = []
  parsed_accepts.each do |(type, q)|
    accepts.push([type, q])
    config[:inverted_transformers][type].each do |subtype|
      accepts.push([subtype, q * 0.8])
    end
  end
  accepts
end