ruby-syntax-replacer

1.0.11 • Public • Published

Ruby Syntax Replacer for VSCode

Goodbye old hash rocket syntax

Features

Ruby

# Old syntax 
data = [
  { 1 => "en", 2 => "to", 3 => "tre" },
  { :one => "un", :two => "deux", :three => "trois" },
  { "weights" => ["pound", "kilogram"], "lengths" => ["meter", "mile"] },
  { :de => { :one => "eins", :two => "zwei", :three => "drei" } }
]
 
# New syntax 
data = [
  { 1: "en", 2: "to", 3: "tre" },
  { one: "un", two: "deux", three: "trois" },
  { "weights": ["pound", "kilogram"], "lengths": ["meter", "mile"] },
  { de: { one: "eins", two: "zwei", three: "drei" } }
]

HAML

-# Old syntax
%div{:data => {:someValue => "Hello world", :"other-value" => 123, :"some-really-long-attr" => true}}
 
-# New syntax
%div{data: {someValue: "Hello world", "other-value": 123, "some-really-long-attr": true}}

Readme

Keywords

none

Package Sidebar

Install

npm i ruby-syntax-replacer

Weekly Downloads

0

Version

1.0.11

License

SEE LICENSE IN LICENSE

Unpacked Size

142 kB

Total Files

22

Last publish

Collaborators

  • kosai106