Sha256: 05a6daf5a4b151a129f3ba7d2cf4d4bd4f58bc8250a15a8dce6335296932b6a1

Contents?: true

Size: 241 Bytes

Versions: 18

Compression:

Stored size: 241 Bytes

Contents

class String
  def event_camelize
    `return #{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

18 entries across 18 versions & 2 rubygems

Version Path
hyper-component-0.99.6 lib/react/ext/string.rb
hyper-component-0.99.5 lib/react/ext/string.rb
hyper-component-0.99.4 lib/react/ext/string.rb
hyper-component-1.0.alpha1.2 lib/hyperstack/ext/component/string.rb
hyper-component-1.0.alpha1.1 lib/hyperstack/ext/component/string.rb
hyper-component-1.0.alpha1 lib/hyperstack/ext/component/string.rb
hyper-component-0.99.3 lib/react/ext/string.rb
hyper-component-0.99.2 lib/react/ext/string.rb
hyper-component-0.99.1 lib/react/ext/string.rb
hyper-component-0.99.0 lib/react/ext/string.rb
hyper-react-1.0.0.lap28 lib/react/ext/string.rb
hyper-react-1.0.0.lap27 lib/react/ext/string.rb
hyper-react-1.0.0.lap26 lib/react/ext/string.rb
hyper-react-1.0.0.lap25 lib/react/ext/string.rb
hyper-react-1.0.0.lap24 lib/react/ext/string.rb
hyper-react-1.0.0.lap23 lib/react/ext/string.rb
hyper-react-1.0.0.lap22 lib/react/ext/string.rb
hyper-react-1.0.0.lap21 lib/react/ext/string.rb