Method: ImportJS::JSModule.normalize_path

Defined in:
lib/import_js/js_module.rb

.normalize_path(path) ⇒ String

Parameters:

  • path (String)

Returns:

  • (String)


45
46
47
48
# File 'lib/import_js/js_module.rb', line 45

def self.normalize_path(path)
  return unless path
  path.sub(%r{^\./?}, '')
end