lib/importmap/map.rb
# Strip off the extension, /index, or any versioning data for an absolute module name.
Strip off the extension, /index, or any versioning data for an absolute module name.
Strip off the extension / index or any versioning data for an absolute module name .
def module_name_from(filename, under)
      filename_without_ext = filename.to_s.remove(filename.extname)
      if filename_without_ext == "index" && under
        under
      else
        module_name = filename_without_ext.split("@").first
        under ? "#{under}/#{module_name}" : module_name
      end
    end
def module_name_from ( filename , under ) filename_without_ext = filename . to_s . remove ( filename . extname ) if filename_without_ext == "index" && under under else module_name = filename_without_ext . split ( "@" ) . first under ? "#{under}/#{module_name}" : module_name end end
Strip off the extension, /index, or any versioning data for an absolute module name.
Strip off the extension / index or any versioning data for an absolute module name .
filename
<not_specific>
under
<not_specific>