Sha256: e68322504d5508b48dd18887ba6db9cbae17a26e89c204fd052ab33e4dba3737

Contents?: true

Size: 234 Bytes

Versions: 63

Compression:

Stored size: 234 Bytes

Contents

class String
  def event_camelize
    `#{self}.replace(/(^|_)([^_]+)/g, function(match, pre, word, index) {
      var capitalize = true;
      return capitalize ? word.substr(0,1).toUpperCase()+word.substr(1) : word;
    })`
  end
end

Version data entries

63 entries across 63 versions & 4 rubygems

Version Path
hyper-react-0.12.7 lib/react/ext/string.rb
hyper-react-0.12.6 lib/react/ext/string.rb
hyper-react-0.12.5 lib/react/ext/string.rb
hyper-react-0.12.4 lib/react/ext/string.rb
hyper-react-0.12.3 lib/react/ext/string.rb
hyper-react-0.12.2 lib/react/ext/string.rb
hyper-react-0.12.1 lib/react/ext/string.rb
hyper-react-0.12.0 lib/react/ext/string.rb
hyper-react-0.11.0 lib/react/ext/string.rb
hyper-react-0.10.0 lib/react/ext/string.rb
reactrb-0.9.0 lib/react/ext/string.rb
reactrb-0.8.8 lib/react/ext/string.rb
reactrb-0.8.7 lib/react/ext/string.rb
reactrb-0.8.6 lib/react/ext/string.rb
reactrb-0.8.5 lib/react/ext/string.rb
reactrb-0.8.4 lib/react/ext/string.rb
reactrb-0.8.3 lib/react/ext/string.rb
reactrb-0.8.1 lib/react/ext/string.rb
reactrb-0.8.0 lib/react/ext/string.rb
reactrb-0.7.42 lib/react/ext/string.rb