Sha256: 7ac2685de571e6d493ce6c57451479571976b25b2f6dde5fd5fe09b7d9203e0b
Contents?: true
Size: 354 Bytes
Versions: 7
Compression:
Stored size: 354 Bytes
Contents
# frozen_string_literal: true module JsDependency module PathnameUtility def self.complement_extname(pathname) return pathname if pathname.exist? || pathname.extname != "" %w[.js .jsx .vue].each do |ext| next unless pathname.sub_ext(ext).file? return pathname.sub_ext(ext) end pathname end end end
Version data entries
7 entries across 7 versions & 1 rubygems