Attrash-Islam / rudash

Rudash - Lodash for Ruby Apps

Home Page:https://rudash-website.now.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rudash

Gem Version Build Status License: MIT

The Lodash popular JavaScript library exported as a Gem for Ruby developers.

Installation

gem install rudash

Usage

require 'rudash'

double = ->(value) { value * 2 }
array = [1, 2, 3]
R_.map(array, double) # => [2,4,6]

is_even = ->(value) { value.even? }
array = [1, 2, 3, 4]
R_.filter(array, is_even) # => [2,4]

# You can also use inline anonymous function style
array = [1, 2, 3, 4]
R_.filter(array,  ->(value) {
    value.even?
}) # => [2,4]

API

See Rudash Website

Libraries built on top of Rudash

  • rowdb - A local JSON database for Ruby inspired by lowdb, using Rudash for easy Hash traversal

About

Rudash - Lodash for Ruby Apps

https://rudash-website.now.sh

License:MIT License


Languages

Language:Ruby 100.0%