-
Notifications
You must be signed in to change notification settings - Fork 2
/
v0_9_1.json
1194 lines (1194 loc) · 56.9 KB
/
v0_9_1.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
[
{
"description": "Returns a function that always returns the given value.",
"name": "always",
"sig": "a -> (* -> a)",
"category": "Function"
},
{
"description": "Wraps a function of any arity (including nullary) in a function that accepts exactly `n`\nparameters. Unlike `nAry`, which passes only `n` arguments to the wrapped function,\nfunctions produced by `arity` will pass all provided arguments to the wrapped function.",
"name": "arity",
"sig": "(Number, (* -> *)) -> (* -> *)",
"category": "Function"
},
{
"description": "Returns the result of calling its first argument with the remaining\narguments. This is occasionally useful as a converging function for\n`R.converge`: the left branch can produce a function while the right\nbranch produces a value to be passed to that function as an argument.",
"name": "call",
"sig": "(*... -> a),*... -> a",
"category": "Function"
},
{
"description": "Makes a comparator function out of a function that reports whether the first element is less than the second.",
"name": "comparator",
"sig": "(a, b -> Boolean) -> (a, b -> Number)",
"category": "Function"
},
{
"description": "Returns a function, `fn`, which encapsulates if/else-if/else logic.\nEach argument to `R.cond` is a [predicate, transform] pair. All of\nthe arguments to `fn` are applied to each of the predicates in turn\nuntil one returns a \"truthy\" value, at which point `fn` returns the\nresult of applying its arguments to the corresponding transformer.\nIf none of the predicates matches, `fn` returns undefined.",
"name": "cond",
"sig": "[(*... -> Boolean),(*... -> *)]... -> (*... -> *)",
"category": "Logic"
},
{
"description": "Accepts at least three functions and returns a new function. When invoked, this new\nfunction will invoke the first function, `after`, passing as its arguments the\nresults of invoking the subsequent functions with whatever arguments are passed to\nthe new function.",
"name": "converge",
"sig": "((*... -> c) -> (((* -> a), (* -> b), ...) -> c)",
"category": "Function"
},
{
"description": "Returns a new function much like the supplied one, except that the first two arguments'\norder is reversed.",
"name": "flip",
"sig": "(a -> b -> c -> ... -> z) -> (b -> a -> c -> ... -> z)",
"category": "Function"
},
{
"description": "Creates a new object out of a list key-value pairs.",
"name": "fromPairs",
"sig": "[[k,v]] -> {k: v}",
"category": "List"
},
{
"description": "Calls the specified function on the supplied object. Any additional arguments\nafter `fn` and `obj` are passed in to `fn`. If no additional arguments are passed to `func`,\n`fn` is invoked with no arguments.",
"name": "func",
"sig": "k -> {k : v} -> v(*)",
"category": "Object"
},
{
"description": "A function that does nothing but return the parameter supplied to it. Good as a default\nor placeholder function.",
"name": "identity",
"sig": "a -> a",
"category": "Function"
},
{
"description": "Tests whether or not an object is similar to an array.",
"name": "isArrayLike",
"sig": "",
"category": "Type"
},
{
"description": "Reports whether the list has zero elements.",
"name": "isEmpty",
"sig": "[a] -> Boolean",
"category": "Logic"
},
{
"description": "Checks if the input value is `null` or `undefined`.",
"name": "isNil",
"sig": "* -> Boolean",
"category": "Type"
},
{
"description": "Returns `true` if all elements are unique, otherwise `false`.\nUniqueness is determined using strict equality (`===`).",
"name": "isSet",
"sig": "[a] -> Boolean",
"category": "List"
},
{
"description": "Returns a list containing the names of all the\nproperties of the supplied object, including prototype properties.\nNote that the order of the output array is not guaranteed to be\nconsistent across different JS platforms.",
"name": "keysIn",
"sig": "{k: v} -> [k]",
"category": "Object"
},
{
"description": "Creates a new function that, when invoked, caches the result of calling `fn` for a given\nargument set and returns the result. Subsequent calls to the memoized `fn` with the same\nargument set will not result in an additional call to `fn`; instead, the cached result\nfor that set of arguments will be returned.\n\nNote that this version of `memoize` effectively handles only string and number\nparameters. Also note that it does not work on variadic functions.",
"name": "memoize",
"sig": "(a... -> b) -> (a... -> b)",
"category": "Function"
},
{
"description": "Wraps a function of any arity (including nullary) in a function that accepts exactly `n`\nparameters. Any extraneous parameters will not be passed to the supplied function.",
"name": "nAry",
"sig": "Number -> (* -> a) -> (* -> a)",
"category": "Function"
},
{
"description": "A function wrapping a call to the given function in a `!` operation. It will return `true` when the\nunderlying function would return a false-y value, and `false` when it would return a truth-y one.",
"name": "not",
"sig": "(*... -> Boolean) -> (*... -> Boolean)",
"category": "Logic"
},
{
"description": "Returns a function which returns its nth argument.",
"name": "nthArg",
"sig": "Number -> *... -> *",
"category": "Function"
},
{
"description": "Accepts a function `fn` and returns a function that guards invocation of `fn` such that\n`fn` can only ever be called once, no matter how many times the returned function is\ninvoked.",
"name": "once",
"sig": "(a... -> b) -> (a... -> b)",
"category": "Function"
},
{
"description": "Flipped version of R.prepend.",
"name": "prependTo",
"sig": "[a] -> a -> [a]",
"category": "List"
},
{
"description": "Returns a function that when supplied an object returns the indicated property of that object, if it exists.",
"name": "prop",
"sig": "s -> {s: a} -> a",
"category": "Object"
},
{
"description": "Returns the value at the specified property.\nThe only difference from `prop` is the parameter order.",
"name": "propOf",
"sig": "{k: v} -> k -> v",
"category": "Object"
},
{
"description": "Returns a new list with the same elements as the original list, just\nin the reverse order.",
"name": "reverse",
"sig": "[a] -> [a]",
"category": "List"
},
{
"description": "Converts an object into an array of key, value arrays.\nThe object's own properties and prototype properties are used.\nNote that the order of the output array is not guaranteed to be\nconsistent across different JS platforms.",
"name": "toPairsIn",
"sig": "{k: v} -> [[k,v]]",
"category": "Object"
},
{
"description": "Removes (strips) whitespace from both ends of the string.",
"name": "trim",
"sig": "String -> String",
"category": "String"
},
{
"description": "Gives a single-word string description of the (native) type of a value, returning such\nanswers as 'Object', 'Number', 'Array', or 'Null'. Does not attempt to distinguish user\nObject types any further, reporting them all as 'Object'.",
"name": "type",
"sig": "(* -> {*}) -> String",
"category": "Type"
},
{
"description": "Takes a function `fn`, which takes a single array argument, and returns\na function which:\n\n - takes any number of positional arguments;\n - passes these arguments to `fn` as an array; and\n - returns the result.\n\nIn other words, R.unapply derives a variadic function from a function\nwhich takes an array. R.unapply is the inverse of R.apply.",
"name": "unapply",
"sig": "([*...] -> a) -> (*... -> a)",
"category": "Function"
},
{
"description": "Wraps a function of any arity (including nullary) in a function that accepts exactly 1\nparameter. Any extraneous parameters will not be passed to the supplied function.",
"name": "unary",
"sig": "(* -> b) -> (a -> b)",
"category": "Function"
},
{
"description": "Returns a list of all the properties, including prototype properties,\nof the supplied object.\nNote that the order of the output array is not guaranteed to be\nconsistent across different JS platforms.",
"name": "valuesIn",
"sig": "{k: v} -> [v]",
"category": "Object"
},
{
"description": "A function that always returns `false`. Any passed in parameters are ignored.",
"name": "F",
"sig": "* -> false",
"category": "Function"
},
{
"name": "I",
"sig": "",
"category": "Function"
},
{
"description": "A function that always returns `true`. Any passed in parameters are ignored.",
"name": "T",
"sig": "* -> true",
"category": "Function"
},
{
"description": "Adds two numbers (or strings). Equivalent to `a + b` but curried.",
"name": "add",
"sig": "Number -> Number -> Number",
"category": "Math"
},
{
"description": "Returns `true` if all elements of the list match the predicate, `false` if there are any\nthat don't.",
"name": "all",
"sig": "(a -> Boolean) -> [a] -> Boolean",
"category": "List"
},
{
"description": "A function wrapping calls to the two functions in an `&&` operation, returning the result of the first\nfunction if it is false-y and the result of the second function otherwise. Note that this is\nshort-circuited, meaning that the second function will not be invoked if the first returns a false-y\nvalue.",
"name": "and",
"sig": "(*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean)",
"category": "Logic"
},
{
"description": "Returns `true` if at least one of elements of the list match the predicate, `false`\notherwise.",
"name": "any",
"sig": "(a -> Boolean) -> [a] -> Boolean",
"category": "List"
},
{
"description": "Returns a new list containing the contents of the given list, followed by the given\nelement.",
"name": "append",
"sig": "a -> [a] -> [a]",
"category": "List"
},
{
"description": "Flipped version of R.append.",
"name": "appendTo",
"sig": "[a] -> a -> [a]",
"category": "List"
},
{
"description": "Applies function `fn` to the argument list `args`. This is useful for\ncreating a fixed-arity function from a variadic function. `fn` should\nbe a bound function if context is significant.",
"name": "apply",
"sig": "(*... -> a) -> [*] -> a",
"category": "Function"
},
{
"description": "Wraps a function of any arity (including nullary) in a function that accepts exactly 2\nparameters. Any extraneous parameters will not be passed to the supplied function.",
"name": "binary",
"sig": "(* -> c) -> (a, b -> c)",
"category": "Function"
},
{
"description": "Creates a function that is bound to a context.\nNote: `R.bind` does not provide the additional argument-binding capabilities of\n[Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).",
"name": "bind",
"sig": "(* -> *) -> {*} -> (* -> *)",
"category": "Function"
},
{
"description": "Creates a deep copy of the value which may contain (nested) `Array`s and\n`Object`s, `Number`s, `String`s, `Boolean`s and `Date`s. `Function`s are\nnot copied, but assigned by their reference.",
"name": "clone",
"sig": "{*} -> {*}",
"category": "Object"
},
{
"description": "Creates a new function that runs each of the functions supplied as parameters in turn,\npassing the return value of each function invocation to the next function invocation,\nbeginning with whatever arguments were passed to the initial invocation.\n\nNote that `compose` is a right-associative function, which means the functions provided\nwill be invoked in order from right to left. In the example `var h = compose(f, g)`,\nthe function `h` is equivalent to `f( g(x) )`, where `x` represents the arguments\noriginally passed to `h`.",
"name": "compose",
"sig": "((y -> z), (x -> y), ..., (b -> c), (a... -> b)) -> (a... -> z)",
"category": "Function"
},
{
"description": "Returns `true` if the `x` is found in the `list`, using `pred` as an\nequality predicate for `x`.",
"name": "containsWith",
"sig": "(a, a -> Boolean) -> a -> [a] -> Boolean",
"category": "List"
},
{
"description": "Creates an object containing a single key:value pair.",
"name": "createMapEntry",
"sig": "String -> a -> {String:a}",
"category": "Object"
},
{
"description": "Creates a new version of `fn` with given arity that, when invoked,\nwill return either:\n- A new function ready to accept one or more of `fn`'s remaining arguments, if all of\n`fn`'s expected arguments have not yet been provided\n- `fn`'s result if all of its expected arguments have been provided\n\nThis function is useful in place of `curry`, when the arity of the\nfunction to curry cannot be determined from its signature, e.g. if it's\na variadic function.",
"name": "curryN",
"sig": "Number -> (* -> a) -> (* -> a)",
"category": "Function"
},
{
"description": "Decrements its argument.",
"name": "dec",
"sig": "Number -> Number",
"category": "Math"
},
{
"description": "Finds the set (i.e. no duplicates) of all elements in the first list not contained in the second list.",
"name": "difference",
"sig": "[a] -> [a] -> [a]",
"category": "Relation"
},
{
"description": "Finds the set (i.e. no duplicates) of all elements in the first list not contained in the second list.\nDuplication is determined according to the value returned by applying the supplied predicate to two list\nelements.",
"name": "differenceWith",
"sig": "(a,a -> Boolean) -> [a] -> [a] -> [a]",
"category": "Relation"
},
{
"description": "Returns a new list containing all but the first `n` elements of the given `list`.",
"name": "drop",
"sig": "Number -> [a] -> [a]",
"category": "List"
},
{
"description": "Returns a new list containing the last `n` elements of a given list, passing each value\nto the supplied predicate function, skipping elements while the predicate function returns\n`true`. The predicate function is passed one argument: *(value)*.",
"name": "dropWhile",
"sig": "(a -> Boolean) -> [a] -> [a]",
"category": "List"
},
{
"description": "`empty` wraps any object in an array. This implementation is compatible with the\nFantasy-land Monoid spec, and will work with types that implement that spec.",
"name": "empty",
"sig": "* -> []",
"category": "Function"
},
{
"description": "Tests if two items are equal. Equality is strict here, meaning reference equality for objects and\nnon-coercing equality for primitives.",
"name": "eq",
"sig": "a -> b -> Boolean",
"category": "Relation"
},
{
"description": "Reports whether two objects have the same value for the specified property. Useful as a curried predicate.",
"name": "eqProps",
"sig": "k -> {k: v} -> {k: v} -> Boolean",
"category": "Object"
},
{
"description": "Returns a new list containing only those items that match a given predicate function.\nThe predicate function is passed one argument: *(value)*.\n\nNote that `R.filter` does not skip deleted or unassigned indices, unlike the native\n`Array.prototype.filter` method. For more details on this behavior, see:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter#Description",
"name": "filter",
"sig": "(a -> Boolean) -> [a] -> [a]",
"category": "List"
},
{
"description": "Like `filter`, but passes additional parameters to the predicate function. The predicate\nfunction is passed three arguments: *(value, index, list)*.",
"name": "filterIndexed",
"sig": "(a, i, [a] -> Boolean) -> [a] -> [a]",
"category": "List"
},
{
"description": "Returns the first element of the list which matches the predicate, or `undefined` if no\nelement matches.",
"name": "find",
"sig": "(a -> Boolean) -> [a] -> a | undefined",
"category": "List"
},
{
"description": "Returns the index of the first element of the list which matches the predicate, or `-1`\nif no element matches.",
"name": "findIndex",
"sig": "(a -> Boolean) -> [a] -> Number",
"category": "List"
},
{
"description": "Returns the last element of the list which matches the predicate, or `undefined` if no\nelement matches.",
"name": "findLast",
"sig": "(a -> Boolean) -> [a] -> a | undefined",
"category": "List"
},
{
"description": "Returns the index of the last element of the list which matches the predicate, or\n`-1` if no element matches.",
"name": "findLastIndex",
"sig": "(a -> Boolean) -> [a] -> Number",
"category": "List"
},
{
"description": "Returns a new list by pulling every item out of it (and all its sub-arrays) and putting\nthem in a new array, depth-first.",
"name": "flatten",
"sig": "[a] -> [b]",
"category": "List"
},
{
"description": "Returns a single item by iterating through the list, successively calling the iterator\nfunction and passing it an accumulator value and the current value from the array, and\nthen passing the result to the next call.\n\nThe iterator function receives two values: *(acc, value)*\n\nNote: `R.foldl` does not skip deleted or unassigned indices (sparse arrays), unlike\nthe native `Array.prototype.reduce` method. For more details on this behavior, see:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description",
"name": "foldl",
"sig": "(a,b -> a) -> a -> [b] -> a",
"category": "List"
},
{
"description": "Like `foldl`, but passes additional parameters to the predicate function.\n\nThe iterator function receives four values: *(acc, value, index, list)*\n\nNote: `R.foldlIndexed` does not skip deleted or unassigned indices (sparse arrays),\nunlike the native `Array.prototype.reduce` method. For more details on this behavior,\nsee:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description",
"name": "foldlIndexed",
"sig": "(a,b,i,[b] -> a) -> a -> [b] -> a",
"category": "List"
},
{
"description": "Returns a single item by iterating through the list, successively calling the iterator\nfunction and passing it an accumulator value and the current value from the array, and\nthen passing the result to the next call.\n\nSimilar to `foldl`, except moves through the input list from the right to the left.\n\nThe iterator function receives two values: *(acc, value)*\n\nNote: `R.foldr` does not skip deleted or unassigned indices (sparse arrays), unlike\nthe native `Array.prototype.reduce` method. For more details on this behavior, see:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight#Description",
"name": "foldr",
"sig": "(a,b -> a) -> a -> [b] -> a",
"category": "List"
},
{
"description": "Like `foldr`, but passes additional parameters to the predicate function. Moves through\nthe input list from the right to the left.\n\nThe iterator function receives four values: *(acc, value, index, list)*.\n\nNote: `R.foldrIndexed` does not skip deleted or unassigned indices (sparse arrays),\nunlike the native `Array.prototype.reduce` method. For more details on this behavior,\nsee:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight#Description",
"name": "foldrIndexed",
"sig": "(a,b,i,[b] -> a -> [b] -> a",
"category": "List"
},
{
"description": "Iterate over an input `list`, calling a provided function `fn` for each element in the\nlist.\n\n`fn` receives one argument: *(value)*.\n\nNote: `R.forEach` does not skip deleted or unassigned indices (sparse arrays), unlike\nthe native `Array.prototype.forEach` method. For more details on this behavior, see:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach#Description\n\nAlso note that, unlike `Array.prototype.forEach`, Ramda's `forEach` returns the original\narray. In some libraries this function is named `each`.",
"name": "forEach",
"sig": "(a -> *) -> [a] -> [a]",
"category": "List"
},
{
"description": "Like `forEach`, but but passes additional parameters to the predicate function.\n\n`fn` receives three arguments: *(value, index, list)*.\n\nNote: `R.forEachIndexed` does not skip deleted or unassigned indices (sparse arrays),\nunlike the native `Array.prototype.forEach` method. For more details on this behavior,\nsee:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach#Description\n\nAlso note that, unlike `Array.prototype.forEach`, Ramda's `forEach` returns the original\narray. In some libraries this function is named `each`.",
"name": "forEachIndexed",
"sig": "(a, i, [a] -> ) -> [a] -> [a]",
"category": "List"
},
{
"description": "Returns a list of function names of object's own and prototype functions",
"name": "functionsIn",
"sig": "{*} -> [String]",
"category": "Object"
},
{
"name": "get",
"sig": "",
"category": "Object"
},
{
"description": "Splits a list into sub-lists stored in an object, based on the result of calling a String-returning function\non each element, and grouping the results according to values returned.",
"name": "groupBy",
"sig": "(a -> s) -> [a] -> {s: a}",
"category": "List"
},
{
"description": "Returns whether or not an object has an own property with\nthe specified name",
"name": "has",
"sig": "s -> {s: x} -> Boolean",
"category": "Object"
},
{
"description": "Returns whether or not an object or its prototype chain has\na property with the specified name",
"name": "hasIn",
"sig": "s -> {s: x} -> Boolean",
"category": "Object"
},
{
"description": "Creates a function that will process either the `onTrue` or the `onFalse` function depending\nupon the result of the `condition` predicate.",
"name": "ifElse",
"sig": "(*... -> Boolean) -> (*... -> *) -> (*... -> *) -> (*... -> *)",
"category": "Logic"
},
{
"description": "Increments its argument.",
"name": "inc",
"sig": "Number -> Number",
"category": "Math"
},
{
"description": "Returns the position of the first occurrence of an item in an array\n(by strict equality),\nor -1 if the item is not included in the array.",
"name": "indexOf",
"sig": "a -> [a] -> Number",
"category": "List"
},
{
"description": "Inserts the supplied element into the list, at index `index`. _Note\nthat this is not destructive_: it returns a copy of the list with the changes.\n<small>No lists have been harmed in the application of this function.</small>",
"name": "insert",
"sig": "Number -> a -> [a] -> [a]",
"category": "List"
},
{
"description": "Inserts the sub-list into the list, at index `index`. _Note that this\nis not destructive_: it returns a copy of the list with the changes.\n<small>No lists have been harmed in the application of this function.</small>",
"name": "insertAll",
"sig": "Number -> [a] -> [a] -> [a]",
"category": "List"
},
{
"description": "Turns a named method with a specified arity into a function\nthat can be called directly supplied with arguments and a target object.\n\nThe returned function is curried and accepts `len + 1` parameters where\nthe final parameter is the target object.",
"name": "invoker",
"sig": "(Number, String) -> (a... -> c -> b)",
"category": "Function"
},
{
"description": "See if an object (`val`) is an instance of the supplied constructor.\nThis function will check up the inheritance chain, if any.",
"name": "is",
"sig": "(* -> {*}) -> a -> Boolean",
"category": "Type"
},
{
"description": "Returns a string made by inserting the `separator` between each\nelement and concatenating all the elements into a single string.",
"name": "join",
"sig": "String -> [a] -> String",
"category": "List"
},
{
"description": "Returns a list containing the names of all the enumerable own\nproperties of the supplied object.\nNote that the order of the output array is not guaranteed to be\nconsistent across different JS platforms.",
"name": "keys",
"sig": "{k: v} -> [k]",
"category": "Object"
},
{
"description": "Accepts as its arguments a function and any number of values and returns a function that,\nwhen invoked, calls the original function with all of the values prepended to the\noriginal function's arguments list. In some libraries this function is named `applyLeft`.",
"name": "lPartial",
"sig": "(a -> b -> ... -> i -> j -> ... -> m -> n) -> a -> b-> ... -> i -> (j -> ... -> m -> n)",
"category": "Function"
},
{
"description": "Returns the position of the last occurrence of an item (by strict equality) in\nan array, or -1 if the item is not included in the array.",
"name": "lastIndexOf",
"sig": "a -> [a] -> Number",
"category": "List"
},
{
"description": "Returns the number of elements in the array by returning `list.length`.",
"name": "length",
"sig": "[a] -> Number",
"category": "List"
},
{
"description": "Creates a lens. Supply a function to `get` values from inside an object, and a `set`\nfunction to change values on an object. (n.b.: This can, and should, be done without\nmutating the original object!) The lens is a function wrapped around the input `get`\nfunction, with the `set` function attached as a property on the wrapper. A `map`\nfunction is also attached to the returned function that takes a function to operate\non the specified (`get`) property, which is then `set` before returning. The attached\n`set` and `map` functions are curried.",
"name": "lens",
"sig": "(k -> v) -> (v -> a -> *) -> (a -> b)",
"category": "Object"
},
{
"description": "Returns a new list, constructed by applying the supplied function to every element of the\nsupplied list.\n\nNote: `R.map` does not skip deleted or unassigned indices (sparse arrays), unlike the\nnative `Array.prototype.map` method. For more details on this behavior, see:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map#Description",
"name": "map",
"sig": "(a -> b) -> [a] -> [b]",
"category": "List"
},
{
"description": "The mapAccumL function behaves like a combination of map and foldl; it applies a\nfunction to each element of a list, passing an accumulating parameter from left to\nright, and returning a final value of this accumulator together with the new list.\n\nThe iterator function receives two values: *(acc, value)*",
"name": "mapAccumL",
"sig": "(acc -> x -> (acc, y)) -> acc -> [x] -> (acc, [y])",
"category": "List"
},
{
"description": "The mapAccumR function behaves like a combination of map and foldr; it applies a\nfunction to each element of a list, passing an accumulating parameter from right\nto left, and returning a final value of this accumulator together with the new list.\n\nSimilar to `mapAccumL`, except moves through the input list from the right to the\nleft.\n\nThe iterator function receives two values: *(acc, value)*",
"name": "mapAccumR",
"sig": "(acc -> x -> (acc, y)) -> acc -> [x] -> (acc, [y])",
"category": "List"
},
{
"description": "Like `map`, but but passes additional parameters to the mapping function.\n`fn` receives three arguments: *(value, index, list)*.\n\nNote: `R.mapIndexed` does not skip deleted or unassigned indices (sparse arrays), unlike\nthe native `Array.prototype.map` method. For more details on this behavior, see:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map#Description",
"name": "mapIndexed",
"sig": "(a,i,[b] -> b) -> [a] -> [b]",
"category": "List"
},
{
"description": "Map, but for objects. Creates an object with the same keys as `obj` and values\ngenerated by running each property of `obj` through `fn`. `fn` is passed one argument:\n*(value)*.",
"name": "mapObj",
"sig": "(v -> v) -> {k: v} -> {k: v}",
"category": "List"
},
{
"description": "Like `mapObj`, but but passes additional arguments to the predicate function. The\npredicate function is passed three arguments: *(value, key, obj)*.",
"name": "mapObjIndexed",
"sig": "(v, k, {k: v} -> v) -> {k: v} -> {k: v}",
"category": "List"
},
{
"description": "Tests a regular expression against a String",
"name": "match",
"sig": "RegExp -> String -> [String] | null",
"category": "String"
},
{
"description": "Determines the largest of a list of numbers (or elements that can be cast to numbers)",
"name": "max",
"sig": "[Number] -> Number",
"category": "Math"
},
{
"description": "Determines the largest of a list of items as determined by pairwise comparisons from the supplied comparator",
"name": "maxBy",
"sig": "(a -> Number) -> [a] -> a",
"category": "Math"
},
{
"description": "Determines the smallest of a list of numbers (or elements that can be cast to numbers)",
"name": "min",
"sig": "[Number] -> Number",
"category": "Math"
},
{
"description": "Determines the smallest of a list of items as determined by pairwise comparisons from the supplied comparator",
"name": "minBy",
"sig": "(a -> Number) -> [a] -> a",
"category": "Math"
},
{
"description": "Multiplies two numbers. Equivalent to `a * b` but curried.",
"name": "multiply",
"sig": "Number -> Number -> Number",
"category": "Math"
},
{
"description": "Negates its argument.",
"name": "negate",
"sig": "Number -> Number",
"category": "Math"
},
{
"description": "Returns the nth element in a list.\nIf n is negative the element at index length + n is returned.",
"name": "nth",
"sig": "[a] -> a",
"category": "List"
},
{
"description": "`of` wraps any object in an Array. This implementation is compatible with the\nFantasy-land Applicative spec, and will work with types that implement that spec.\nNote this `of` is different from the ES6 `of`; See\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of",
"name": "of",
"sig": "a -> [a]",
"category": "Function"
},
{
"description": "Returns a partial copy of an object omitting the keys specified.",
"name": "omit",
"sig": "[k] -> {k: v} -> {k: v}",
"category": "Object"
},
{
"description": "Uses a placeholder to convert a binary function into something like an infix operation.\nWhen called with the `R.__` placeholder the second argument is applied to the\nsecond position, and it returns a function waiting for its first argument.\nThis can allow for more natural processing of functions which are really binary operators.",
"name": "op",
"sig": "",
"category": "Function"
},
{
"description": "A function wrapping calls to the two functions in an `||` operation, returning the result of the first\nfunction if it is truth-y and the result of the second function otherwise. Note that this is\nshort-circuited, meaning that the second function will not be invoked if the first returns a truth-y\nvalue.",
"name": "or",
"sig": "(*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean)",
"category": "Logic"
},
{
"description": "Similar to `compose` but with automatic handling of promises (or, more\nprecisely, \"thenables\"). The behavior is identical to that of\ncompose() if all composed functions return something other than\npromises (i.e., objects with a .then() method). If one of the function\nreturns a promise, however, then the next function in the composition\nis called asynchronously, in the success callback of the promise, using\nthe resolved value as an input. Note that `pCompose` is a right-\nassociative function, just like `compose`.",
"name": "pCompose",
"sig": "((y -> z), (x -> y), ..., (b -> c), (a... -> b)) -> (a... -> z)",
"category": "Function"
},
{
"description": "Creates a new function that runs each of the functions supplied as parameters in turn,\npassing to the next function invocation either the value returned by the previous\nfunction or the resolved value if the returned value is a promise. In other words,\nif some of the functions in the sequence return promises, `pPipe` pipes the values\nasynchronously. If none of the functions return promises, the behavior is the same as\nthat of `pipe`.\n\n`pPipe` is the mirror version of `pCompose`. `pPipe` is left-associative, which means that\neach of the functions provided is executed in order from left to right.",
"name": "pPipe",
"sig": "((a... -> b), (b -> c), ..., (x -> y), (y -> z)) -> (a... -> z)",
"category": "Function"
},
{
"description": "Takes a predicate and a list and returns the pair of lists of\nelements which do and do not satisfy the predicate, respectively.",
"name": "partition",
"sig": "(a -> Boolean) -> [a] -> [[a],[a]]",
"category": "List"
},
{
"description": "Determines whether a nested path on an object, seperated by periods,\nhas a specific value according to strict equality ('==='). Most\nlikely used to filter a list:",
"name": "pathEq",
"sig": "String -> v -> {k: v} -> Boolean",
"category": "Relation"
},
{
"description": "Retrieve a nested path on an object separated by the specified\nseparator value.",
"name": "pathOn",
"sig": "String -> String -> {*} -> *",
"category": "Object"
},
{
"description": "Returns a partial copy of an object containing only the keys specified. If the key does not exist, the\nproperty is ignored.",
"name": "pick",
"sig": "[k] -> {k: v} -> {k: v}",
"category": "Object"
},
{
"description": "Similar to `pick` except that this one includes a `key: undefined` pair for properties that don't exist.",
"name": "pickAll",
"sig": "[k] -> {k: v} -> {k: v}",
"category": "Object"
},
{
"description": "Returns a partial copy of an object containing only the keys that\nsatisfy the supplied predicate.",
"name": "pickBy",
"sig": "(v, k -> Boolean) -> {k: v} -> {k: v}",
"category": "Object"
},
{
"description": "Creates a new function that runs each of the functions supplied as parameters in turn,\npassing the return value of each function invocation to the next function invocation,\nbeginning with whatever arguments were passed to the initial invocation.\n\n`pipe` is the mirror version of `compose`. `pipe` is left-associative, which means that\neach of the functions provided is executed in order from left to right.\n\nIn some libraries this function is named `sequence`.",
"name": "pipe",
"sig": "((a... -> b), (b -> c), ..., (x -> y), (y -> z)) -> (a... -> z)",
"category": "Function"
},
{
"description": "Returns a new list by plucking the same named property off all objects in the list supplied.",
"name": "pluck",
"sig": "String -> {*} -> [*]",
"category": "List"
},
{
"description": "Returns a new list with the given element at the front, followed by the contents of the\nlist.",
"name": "prepend",
"sig": "a -> [a] -> [a]",
"category": "List"
},
{
"description": "Multiplies together all the elements of a list.",
"name": "product",
"sig": "[Number] -> Number",
"category": "Math"
},
{
"description": "Determines whether the given property of an object has a specific\nvalue according to strict equality (`===`). Most likely used to\nfilter a list:",
"name": "propEq",
"sig": "k -> v -> {k: v} -> Boolean",
"category": "Relation"
},
{
"description": "If the given, non-null object has an own property with the specified name,\nreturns the value of that property.\nOtherwise returns the provided default value.",
"name": "propOr",
"sig": "s -> v -> {s: x} -> x | v",
"category": "Object"
},
{
"description": "Acts as multiple `get`: array of keys in, array of values out. Preserves order.",
"name": "props",
"sig": "[k] -> {k: v} -> [v]",
"category": "Object"
},
{
"description": "Accepts as its arguments a function and any number of values and returns a function that,\nwhen invoked, calls the original function with all of the values appended to the original\nfunction's arguments list.\n\nNote that `rPartial` is the opposite of `lPartial`: `rPartial` fills `fn`'s arguments\nfrom the right to the left. In some libraries this function is named `applyRight`.",
"name": "rPartial",
"sig": "(a -> b-> ... -> i -> j -> ... -> m -> n) -> j -> ... -> m -> n -> (a -> b-> ... -> i)",
"category": "Function"
},
{
"description": "Returns a list of numbers from `from` (inclusive) to `to`\n(exclusive).",
"name": "range",
"sig": "Number -> Number -> [Number]",
"category": "List"
},
{
"description": "Similar to `filter`, except that it keeps only values for which the given predicate\nfunction returns falsy. The predicate function is passed one argument: *(value)*.",
"name": "reject",
"sig": "(a -> Boolean) -> [a] -> [a]",
"category": "List"
},
{
"description": "Like `reject`, but passes additional parameters to the predicate function. The predicate\nfunction is passed three arguments: *(value, index, list)*.",
"name": "rejectIndexed",
"sig": "(a, i, [a] -> Boolean) -> [a] -> [a]",
"category": "List"
},
{
"description": "Removes the sub-list of `list` starting at index `start` and containing\n`count` elements. _Note that this is not destructive_: it returns a\ncopy of the list with the changes.\n<small>No lists have been harmed in the application of this function.</small>",
"name": "remove",
"sig": "Number -> Number -> [a] -> [a]",
"category": "List"
},
{
"description": "Replace a substring or regex match in a string with a replacement.",
"name": "replace",
"sig": "RegExp|String -> String -> String -> String",
"category": "String"
},
{
"description": "Scanl is similar to foldl, but returns a list of successively reduced values from the left",
"name": "scanl",
"sig": "(a,b -> a) -> a -> [b] -> [a]",
"category": "List"
},
{
"description": "Returns the elements from `xs` starting at `a` and ending at `b - 1`.",
"name": "slice",
"sig": "Number -> Number -> [a] -> [a]",
"category": "List"
},
{
"description": "Returns a copy of the list, sorted according to the comparator function, which should accept two values at a\ntime and return a negative number if the first value is smaller, a positive number if it's larger, and zero\nif they are equal. Please note that this is a **copy** of the list. It does not modify the original.",
"name": "sort",
"sig": "(a,a -> Number) -> [a] -> [a]",
"category": "List"
},
{
"description": "Sorts the list according to a key generated by the supplied function.",
"name": "sortBy",
"sig": "(a -> String) -> [a] -> [a]",
"category": "Relation"
},
{
"description": "Splits a string into an array of strings based on the given\nseparator.",
"name": "split",
"sig": "String -> String -> [String]",
"category": "String"
},
{
"description": "Finds the first index of a substring in a string, returning -1 if it's not present",
"name": "strIndexOf",
"sig": "String -> String -> Number",
"category": "String"
},
{
"description": "Finds the last index of a substring in a string, returning -1 if it's not present",
"name": "strLastIndexOf",
"sig": "String -> String -> Number",
"category": "String"
},
{
"description": "returns a subset of a string between one index and another.",
"name": "substring",
"sig": "Number -> Number -> String -> String",
"category": "String"
},
{
"description": "The trailing substring of a String starting with the nth character:",
"name": "substringFrom",
"sig": "Number -> String -> String",
"category": "String"
},
{
"description": "The leading substring of a String ending before the nth character:",
"name": "substringTo",
"sig": "Number -> String -> String",
"category": "String"
},
{
"description": "Subtracts two numbers. Equivalent to `a - b` but curried.",
"name": "subtract",
"sig": "Number -> Number -> Number",
"category": "Math"
},
{
"description": "Adds together all the elements of a list.",
"name": "sum",
"sig": "[Number] -> Number",
"category": "Math"
},
{
"description": "Returns all but the first element of a list. If the list provided has the `tail` method,\nit will instead return `list.tail()`.",
"name": "tail",
"sig": "[a] -> [a]",
"category": "List"
},
{
"description": "Returns a new list containing the first `n` elements of the given list. If\n`n > * list.length`, returns a list of `list.length` elements.",
"name": "take",
"sig": "Number -> [a] -> [a]",
"category": "List"
},
{
"description": "Returns a new list containing the first `n` elements of a given list, passing each value\nto the supplied predicate function, and terminating when the predicate function returns\n`false`. Excludes the element that caused the predicate function to fail. The predicate\nfunction is passed one argument: *(value)*.",
"name": "takeWhile",
"sig": "(a -> Boolean) -> [a] -> [a]",
"category": "List"
},
{
"description": "Runs the given function with the supplied object, then returns the object.",
"name": "tap",
"sig": "(a -> *) -> a -> a",
"category": "Function"
},
{
"description": "Calls an input function `n` times, returning an array containing the results of those\nfunction calls.\n\n`fn` is passed one argument: The current value of `n`, which begins at `0` and is\ngradually incremented to `n - 1`.",
"name": "times",
"sig": "(i -> a) -> i -> [a]",
"category": "List"
},
{
"description": "The lower case version of a string.",
"name": "toLower",
"sig": "String -> String",
"category": "String"
},
{
"description": "Converts an object into an array of key, value arrays.\nOnly the object's own properties are used.\nNote that the order of the output array is not guaranteed to be\nconsistent across different JS platforms.",
"name": "toPairs",
"sig": "{k: v} -> [[k,v]]",
"category": "Object"
},
{
"description": "The upper case version of a string.",
"name": "toUpper",
"sig": "String -> String",
"category": "String"
},
{
"description": "Builds a list from a seed value. Accepts an iterator function, which returns either false\nto stop iteration or an array of length 2 containing the value to add to the resulting\nlist and the seed to be used in the next call to the iterator function.\n\nThe iterator function receives one argument: *(seed)*.",
"name": "unfoldr",
"sig": "(a -> [b]) -> * -> [b]",
"category": "List"
},
{
"description": "Returns a new list containing only one copy of each element in the original list.\nEquality is strict here, meaning reference equality for objects and non-coercing equality\nfor primitives.",
"name": "uniq",
"sig": "[a] -> [a]",
"category": "List"
},
{
"description": "Returns a new list containing only one copy of each element in the original list, based\nupon the value returned by applying the supplied predicate to two list elements. Prefers\nthe first item if two items compare equal based on the predicate.",
"name": "uniqWith",
"sig": "(a, a -> Boolean) -> [a] -> [a]",
"category": "List"
},
{
"description": "Returns a new list by pulling every item at the first level of nesting out, and putting\nthem in a new array.",
"name": "unnest",
"sig": "[a] -> [b]",
"category": "List"
},
{
"description": "Returns a list of all the enumerable own properties of the supplied object.\nNote that the order of the output array is not guaranteed across\ndifferent JS platforms.",
"name": "values",
"sig": "{k: v} -> [v]",
"category": "Object"
},
{
"description": "Takes a spec object and a test object and returns true if the test satisfies the spec.\nAny property on the spec that is not a function is interpreted as an equality\nrelation.\n\nIf the spec has a property mapped to a function, then `where` evaluates the function, passing in\nthe test object's value for the property in question, as well as the whole test object.\n\n`where` is well suited to declaratively expressing constraints for other functions, e.g.,\n`filter`, `find`, `pickBy`, etc.",
"name": "where",
"sig": "{k: v} -> {k: v} -> Boolean",
"category": "Object"
},
{
"description": "Wrap a function inside another to allow you to make adjustments to the parameters, or do\nother processing either before the internal function is called or with its results.",
"name": "wrap",
"sig": "(a... -> b) -> ((a... -> b) -> a... -> c) -> (a... -> c)",
"category": "Function"
},
{
"description": "Creates a new list out of the two supplied by creating each possible\npair from the lists.",
"name": "xprod",
"sig": "[a] -> [b] -> [[a,b]]",
"category": "List"
},
{
"description": "Creates a new list out of the two supplied by pairing up\nequally-positioned items from both lists. The returned list is\ntruncated to the length of the shorter of the two input lists.\nNote: `zip` is equivalent to `zipWith(function(a, b) { return [a, b] })`.",
"name": "zip",
"sig": "a -> b -> [[a,b]]",
"category": "List"
},
{
"description": "Creates a new object out of a list of keys and a list of values.",
"name": "zipObj",
"sig": "k -> v -> {k: v}",
"category": "List"
},
{
"description": "Creates a new list out of the two supplied by applying the function to\neach equally-positioned pair in the lists. The returned list is\ntruncated to the length of the shorter of the two input lists.",
"name": "zipWith",
"sig": "(a,b -> c) -> [a] -> [b] -> [c]",
"category": "List"
},
{
"description": "Given a list of predicates, returns a new predicate that will be true exactly when all of them are.",
"name": "allPass",
"sig": "[(*... -> Boolean)] -> (*... -> Boolean)",
"category": "Logic"
},
{
"description": "Given a list of predicates returns a new predicate that will be true exactly when any one of them is.",
"name": "anyPass",
"sig": "[(*... -> Boolean)] -> (*... -> Boolean)",
"category": "Logic"
},
{
"description": "ap applies a list of functions to a list of values.",
"name": "ap",
"sig": "[f] -> [a] -> [f a]",
"category": "Function"
},
{
"description": "Makes a shallow clone of an object, setting or overriding the specified\nproperty with the given value. Note that this copies and flattens\nprototype properties onto the new object as well. All non-primitive\nproperties are copied by reference.",
"name": "assoc",
"sig": "String -> a -> {k: v} -> {k: v}",
"category": "Object"
},
{
"description": "Makes a shallow clone of an object, setting or overriding the nodes\nrequired to create the given path, and placing the specifiec value at the\ntail end of that path. Note that this copies and flattens prototype\nproperties onto the new object as well. All non-primitive properties\nare copied by reference.",
"name": "assocPath",
"sig": "String -> a -> {k: v} -> {k: v}",
"category": "Object"
},
{
"description": "`chain` maps a function over a list and concatenates the results.\nThis implementation is compatible with the\nFantasy-land Chain spec, and will work with types that implement that spec.\n`chain` is also known as `flatMap` in some libraries",
"name": "chain",
"sig": "(a -> [b]) -> [a] -> [b]",
"category": "List"
},
{
"description": "The character at the nth position in a String:",
"name": "charAt",
"sig": "Number -> String -> String",
"category": "String"
},
{
"description": "The ascii code of the character at the nth position in a String:",
"name": "charCodeAt",
"sig": "Number -> String -> Number",
"category": "String"
},
{
"description": "Turns a list of Functors into a Functor of a list, applying\na mapping function to the elements of the list along the way.\n\nNote: `commuteMap` may be more useful to convert a list of non-Array Functors (e.g.\nMaybe, Either, etc.) to Functor of a list.",
"name": "commuteMap",
"sig": "(a -> (b -> c)) -> (x -> [x]) -> [[*]...]",
"category": "List"
},
{
"description": "Returns a new list consisting of the elements of the first list followed by the elements\nof the second.",
"name": "concat",
"sig": "[a] -> [a] -> [a]",
"category": "List"
},
{
"description": "Returns `true` if the specified item is somewhere in the list, `false` otherwise.\nEquivalent to `indexOf(a)(list) > -1`. Uses strict (`===`) equality checking.",
"name": "contains",
"sig": "a -> [a] -> Boolean",
"category": "List"