-
Notifications
You must be signed in to change notification settings - Fork 12
Home
pepkin88 edited this page Dec 31, 2015
·
25 revisions
Welcome to ramda-cli wiki.
Check out the Cookbook for examples.
Ramda functions and corresponding LiveScript idioms and syntax.
Most are used as predicates for filter
or with map
.
Ramda | LiveScript |
---|---|
not |
(not) |
nth(0) |
(.0) |
prop('name') |
(.name) |
add(1) |
(+ 1) |
add(__, '!') |
(+ '!') |
gt(__, 2) |
(> 2) |
contains(__, xs) |
(in xs) |
pipe(length, gt(__, 2)) |
(.length > 2) |
isNil |
(~= null) |
complement(isNil) |
(?) |
match(/foo/) |
(is /foo/) |
replace('a', '') |
(- 'a') |
join(',') |
(* ',') |
split(',') |
(/ ',') |
to-upper |
(.to-upper-case!) |
compose(g, f) |
g << f or g . f
|
pipe(f, g) |
f >> g |
bind(console.log, console) |
console~log |
range(1, 6) |
[1 til 6] or [1 to 5]
|
merge(a, b) |
a <<< b [1]
|
1: Not same but reasonably close