INNER CODE UNIT · Ruby

uncapitalize

Automattic/pocket-casts-android · scripts/themes/download_themes.rb:12

  def uncapitalize
    self[0, 1].downcase + self[1..]
  end
end

def values_to_tokens_map(values)
  tokens = []
  values.each do |row|
    key = row[0]
    next if key.nil? || key.empty?

    tokens << {
      key: key.gsub('$', '').gsub('-', '_'),
      token_name: key,
      kotlin_name: key.gsub('$', '').split('-').collect(&:capitalize).join.uncapitalize,
      themes: {
        light: {
          hex: row[2],

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…