# Rubyisms

JavaScript is

    $ npm install rubyisms

v0.3.2 out now!
@Okahyphen

Rubyisms are ES5 prototype extensions.

They're pretty neat. Here's a few examples.

You can learn more on Github and npm

## String#reverse

    var s = 'Hello world!;
    alert(s.reverse);

## Number#times

    (2).times(function (n) {
      alert('Yo x ' + n);
    });

## Number#upto, Number#odd

    (7).upto(10, function (n) {
      alert(n + ' is odd? ' + n.odd);
    });

## Array#count, Object#numeric

    var a = ['1', 1, 1, '1', 1],
        nums = a.count(function (e) {
      return e.numeric;
    });
    alert(nums);

## Array#sample, String#chop

    var a = ['one', 'two', 'three'];
    alert(a.sample.chop)