module Sprockets::Utils
def self.normalize_extension(extension)
# => ".css"
normalize_extension(".css")
# => ".js"
normalize_extension("js")
Prepends a leading "." to an extension if its missing.
def self.normalize_extension(extension) extension = extension.to_s if extension[/^\./] extension else ".#{extension}" end end