-
Notifications
You must be signed in to change notification settings - Fork 0
/
ramda.json
2191 lines (2191 loc) · 45 KB
/
ramda.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
[
{
"name": "__",
"description": "A special placeholder value used to specify \"gaps\" within curried functions,\nallowing partial application of any combination of arguments, regardless of\ntheir positions.",
"args": []
},
{
"name": "add",
"description": "Adds two values.",
"args": [
"a",
"b"
],
"returns": "Number"
},
{
"name": "addIndex",
"description": "A list iteration function that does not pass index or list to its callback",
"args": [
"fn"
],
"returns": "function"
},
{
"name": "adjust",
"description": "The function to apply.",
"args": [
"fn",
"idx",
"list"
],
"returns": "Array"
},
{
"name": "all",
"description": "The predicate function.",
"args": [
"fn",
"list"
],
"returns": "Boolean"
},
{
"name": "allPass",
"description": "An array of predicates to check",
"args": [
"predicates"
],
"returns": "function"
},
{
"name": "always",
"description": "The value to wrap in a function",
"args": [
"val"
],
"returns": "function"
},
{
"name": "and",
"description": "Returns true if both arguments are true; false otherwise.",
"args": [
"a",
"b"
],
"returns": "Any"
},
{
"name": "any",
"description": "The predicate function.",
"args": [
"fn",
"list"
],
"returns": "Boolean"
},
{
"name": "anyPass",
"description": "An array of predicates to check",
"args": [
"predicates"
],
"returns": "function"
},
{
"name": "ap",
"description": "ap applies a list of functions to a list of values.",
"args": [
"applyF",
"applyX"
],
"returns": "*"
},
{
"name": "aperture",
"description": "The size of the tuples to create",
"args": [
"n",
"list"
],
"returns": "Array"
},
{
"name": "append",
"description": "The element to add to the end of the new list.",
"args": [
"el",
"list"
],
"returns": "Array"
},
{
"name": "apply",
"description": "The function which will be called with args",
"args": [
"fn",
"args"
],
"returns": "*"
},
{
"name": "applySpec",
"description": "an object recursively mapping properties to functions for\n producing the values for these properties.",
"args": [
"spec"
],
"returns": "function"
},
{
"name": "applyTo",
"description": "The value",
"args": [
"x",
"f"
],
"returns": "*"
},
{
"name": "ascend",
"description": "A function of arity one that returns a value that can be compared",
"args": [
"fn",
"a",
"b"
],
"returns": "Number"
},
{
"name": "assoc",
"description": "The property name to set",
"args": [
"prop",
"val",
"obj"
],
"returns": "Object"
},
{
"name": "assocPath",
"description": "the path to set",
"args": [
"path",
"val",
"obj"
],
"returns": "Object"
},
{
"name": "binary",
"description": "The function to wrap.",
"args": [
"fn"
],
"returns": "function"
},
{
"name": "bind",
"description": "The function to bind to context",
"args": [
"fn",
"thisObj"
],
"returns": "function"
},
{
"name": "both",
"description": "A predicate",
"args": [
"f",
"g"
],
"returns": "function"
},
{
"name": "call",
"description": "The function to apply to the remaining arguments.",
"args": [
"fn",
"args"
],
"returns": "*"
},
{
"name": "chain",
"description": "The function to map with",
"args": [
"fn",
"list"
],
"returns": "Array"
},
{
"name": "clamp",
"description": "The lower limit of the clamp (inclusive)",
"args": [
"minimum",
"maximum",
"value"
],
"returns": "Number"
},
{
"name": "clone",
"description": "The object or array to clone",
"args": [
"value"
],
"returns": "*"
},
{
"name": "comparator",
"description": "A predicate function of arity two which will return true if the first argument\nis less than the second, false otherwise",
"args": [
"pred"
],
"returns": "function"
},
{
"name": "complement",
"description": "Takes a function f and returns a function g such that if called with the same arguments\nwhen f returns a \"truthy\" value, g returns false and when f returns a \"falsy\" value g returns true.",
"args": [
"f"
],
"returns": "function"
},
{
"name": "compose",
"description": "The functions to compose",
"args": [
"...functions"
],
"returns": "function"
},
{
"name": "composeK",
"description": "The functions to compose",
"args": [
"...functions"
],
"returns": "function"
},
{
"name": "composeP",
"description": "The functions to compose",
"args": [
"functions"
],
"returns": "function"
},
{
"name": "concat",
"description": "The first list",
"args": [
"firstList",
"secondList"
],
"returns": "Array"
},
{
"name": "cond",
"description": "A list of [predicate, transformer]",
"args": [
"pairs"
],
"returns": "function"
},
{
"name": "construct",
"description": "The constructor function to wrap.",
"args": [
"fn"
],
"returns": "function"
},
{
"name": "constructN",
"description": "The arity of the constructor function.",
"args": [
"n",
"Fn"
],
"returns": "function"
},
{
"name": "contains",
"description": "The item to compare against.",
"args": [
"a",
"list"
],
"returns": "Boolean"
},
{
"name": "converge",
"description": "A function. after will be invoked with the return values of\n fn1 and fn2 as its arguments.",
"args": [
"after",
"functions"
],
"returns": "function"
},
{
"name": "countBy",
"description": "The function used to map values to keys.",
"args": [
"fn",
"list"
],
"returns": "Object"
},
{
"name": "curry",
"description": "The function to curry.",
"args": [
"fn"
],
"returns": "function"
},
{
"name": "curryN",
"description": "The arity for the returned function.",
"args": [
"length",
"fn"
],
"returns": "function"
},
{
"name": "dec",
"description": "Decrements its argument.",
"args": [
"n"
],
"returns": "Number"
},
{
"name": "defaultTo",
"description": "The default value.",
"args": [
"default",
"val"
],
"returns": "*"
},
{
"name": "descend",
"description": "A function of arity one that returns a value that can be compared",
"args": [
"fn",
"a",
"b"
],
"returns": "Number"
},
{
"name": "difference",
"description": "The first list.",
"args": [
"list1",
"list2"
],
"returns": "Array"
},
{
"name": "differenceWith",
"description": "A predicate used to test whether two items are equal.",
"args": [
"pred",
"list1",
"list2"
],
"returns": "Array"
},
{
"name": "dissoc",
"description": "The name of the property to dissociate",
"args": [
"prop",
"obj"
],
"returns": "Object"
},
{
"name": "dissocPath",
"description": "The path to the value to omit",
"args": [
"path",
"obj"
],
"returns": "Object"
},
{
"name": "divide",
"description": "The first value.",
"args": [
"a",
"b"
],
"returns": "Number"
},
{
"name": "drop",
"description": "Returns all but the first n elements of the given list, string, or\ntransducer/transformer (or object with a drop method).",
"args": [
"n",
"list"
],
"returns": "*"
},
{
"name": "dropLast",
"description": "The number of elements of list to skip.",
"args": [
"n",
"list"
],
"returns": "Array"
},
{
"name": "dropLastWhile",
"description": "The function to be called on each element",
"args": [
"predicate",
"xs"
],
"returns": "Array"
},
{
"name": "dropRepeats",
"description": "The array to consider.",
"args": [
"list"
],
"returns": "Array"
},
{
"name": "dropRepeatsWith",
"description": "A predicate used to test whether two items are equal.",
"args": [
"pred",
"list"
],
"returns": "Array"
},
{
"name": "dropWhile",
"description": "The function called per iteration.",
"args": [
"fn",
"xs"
],
"returns": "Array"
},
{
"name": "either",
"description": "a predicate",
"args": [
"f",
"g"
],
"returns": "function"
},
{
"name": "empty",
"description": "Returns the empty value of its argument's type. Ramda defines the empty\nvalue of Array ([]), Object ({}), String (''), and Arguments. Other\ntypes are supported if they define <Type>.empty,\n<Type>.prototype.empty or implement the\nFantasyLand Monoid spec.",
"args": [
"x"
],
"returns": "*"
},
{
"name": "endsWith",
"description": "Checks if a list ends with the provided values",
"args": [
"suffix",
"list"
],
"returns": "Boolean"
},
{
"name": "eqBy",
"description": "Takes a function and two values in its domain and returns true if the\nvalues map to the same value in the codomain; false otherwise.",
"args": [
"f",
"x",
"y"
],
"returns": "Boolean"
},
{
"name": "eqProps",
"description": "The name of the property to compare",
"args": [
"prop",
"obj1",
"obj2"
],
"returns": "Boolean"
},
{
"name": "equals",
"description": "Returns true if its arguments are equivalent, false otherwise. Handles\ncyclical data structures.",
"args": [
"a",
"b"
],
"returns": "Boolean"
},
{
"name": "evolve",
"description": "The object specifying transformation functions to apply\n to the object.",
"args": [
"transformations",
"object"
],
"returns": "Object"
},
{
"name": "F",
"description": "A function that always returns false. Any passed in parameters are ignored.",
"args": [
""
],
"returns": "Boolean"
},
{
"name": "filter",
"description": "Takes a predicate and a Filterable, and returns a new filterable of the\nsame type containing the members of the given filterable which satisfy the\ngiven predicate. Filterable objects include plain objects or any object\nthat has a filter method such as Array.",
"args": [
"pred",
"filterable"
],
"returns": "Array"
},
{
"name": "find",
"description": "The predicate function used to determine if the element is the\n desired one.",
"args": [
"fn",
"list"
],
"returns": "Object"
},
{
"name": "findIndex",
"description": "The predicate function used to determine if the element is the\ndesired one.",
"args": [
"fn",
"list"
],
"returns": "Number"
},
{
"name": "findLast",
"description": "The predicate function used to determine if the element is the\ndesired one.",
"args": [
"fn",
"list"
],
"returns": "Object"
},
{
"name": "findLastIndex",
"description": "The predicate function used to determine if the element is the\ndesired one.",
"args": [
"fn",
"list"
],
"returns": "Number"
},
{
"name": "flatten",
"description": "The array to consider.",
"args": [
"list"
],
"returns": "Array"
},
{
"name": "flip",
"description": "The function to invoke with its first two parameters reversed.",
"args": [
"fn"
],
"returns": "*"
},
{
"name": "forEach",
"description": "The function to invoke. Receives one argument, value.",
"args": [
"fn",
"list"
],
"returns": "Array"
},
{
"name": "forEachObjIndexed",
"description": "The function to invoke. Receives three argument, value, key, obj.",
"args": [
"fn",
"obj"
],
"returns": "Object"
},
{
"name": "fromPairs",
"description": "An array of two-element arrays that will be the keys and values of the output object.",
"args": [
"pairs"
],
"returns": "Object"
},
{
"name": "groupBy",
"description": "Function :: a -> String",
"args": [
"fn",
"list"
],
"returns": "Object"
},
{
"name": "groupWith",
"description": "Function for determining whether two given (adjacent)\n elements should be in the same group",
"args": [
"fn",
"list"
],
"returns": "List"
},
{
"name": "gt",
"description": "Returns true if the first argument is greater than the second; false\notherwise.",
"args": [
"a",
"b"
],
"returns": "Boolean"
},
{
"name": "gte",
"description": "Returns true if the first argument is greater than or equal to the second;\nfalse otherwise.",
"args": [
"a",
"b"
],
"returns": "Boolean"
},
{
"name": "has",
"description": "The name of the property to check for.",
"args": [
"prop",
"obj"
],
"returns": "Boolean"
},
{
"name": "hasIn",
"description": "The name of the property to check for.",
"args": [
"prop",
"obj"
],
"returns": "Boolean"
},
{
"name": "head",
"description": "Returns the first element of the given list or string. In some libraries\nthis function is named first.",
"args": [
"list"
],
"returns": "*"
},
{
"name": "identical",
"description": "Returns true if its arguments are identical, false otherwise. Values are\nidentical if they reference the same memory. NaN is identical to NaN;\n0 and -0 are not identical.",
"args": [
"a",
"b"
],
"returns": "Boolean"
},
{
"name": "identity",
"description": "The value to return.",
"args": [
"x"
],
"returns": "*"
},
{
"name": "ifElse",
"description": "A predicate function",
"args": [
"condition",
"onTrue",
"onFalse"
],
"returns": "function"
},
{
"name": "inc",
"description": "Increments its argument.",
"args": [
"n"
],
"returns": "Number"
},
{
"name": "indexBy",
"description": "Function :: a -> String",
"args": [
"fn",
"array"
],
"returns": "Object"
},
{
"name": "indexOf",
"description": "The item to find.",
"args": [
"target",
"xs"
],
"returns": "Number"
},
{
"name": "init",
"description": "Returns all but the last element of the given list or string.",
"args": [
"list"
],
"returns": "*"
},
{
"name": "innerJoin",
"description": "Takes a predicate pred, a list xs, and a list ys, and returns a list\nxs' comprising each of the elements of xs which is equal to one or more\nelements of ys according to pred.",
"args": [
"pred",
"xs",
"ys"
],
"returns": "Array"
},
{
"name": "insert",
"description": "The position to insert the element",
"args": [
"index",
"elt",
"list"
],
"returns": "Array"
},
{
"name": "insertAll",
"description": "The position to insert the sub-list",
"args": [
"index",
"elts",
"list"
],
"returns": "Array"
},
{
"name": "intersection",
"description": "The first list.",
"args": [
"list1",
"list2"
],
"returns": "Array"
},
{
"name": "intersperse",
"description": "The element to add to the list.",
"args": [
"separator",
"list"
],
"returns": "Array"
},
{
"name": "into",
"description": "The initial accumulator value.",
"args": [
"acc",
"xf",
"list"
],
"returns": "*"
},
{
"name": "invert",
"description": "The object or array to invert",
"args": [
"obj"
],
"returns": "Object"
},
{
"name": "invertObj",
"description": "The object or array to invert",
"args": [
"obj"
],
"returns": "Object"
},
{
"name": "invoker",
"description": "Number of arguments the returned function should take\n before the target object.",
"args": [
"arity",
"method"
],
"returns": "function"
},
{
"name": "is",
"description": "A constructor",
"args": [
"ctor",
"val"
],
"returns": "Boolean"
},
{
"name": "isEmpty",
"description": "Returns true if the given value is its type's empty value; false\notherwise.",
"args": [
"x"
],
"returns": "Boolean"
},
{
"name": "isNil",
"description": "The value to test.",
"args": [
"x"
],
"returns": "Boolean"
},
{
"name": "join",
"description": "The string used to separate the elements.",
"args": [
"separator",
"xs"
],
"returns": "String"
},
{
"name": "juxt",
"description": "An array of functions",
"args": [
"fns"
],
"returns": "function"
},
{
"name": "keys",
"description": "The object to extract properties from",
"args": [
"obj"
],
"returns": "Array"
},
{
"name": "keysIn",
"description": "The object to extract properties from",
"args": [
"obj"
],
"returns": "Array"
},
{
"name": "last",
"description": "Returns the last element of the given list or string.",
"args": [
"list"
],
"returns": "*"
},
{
"name": "lastIndexOf",
"description": "The item to find.",
"args": [
"target",
"xs"
],
"returns": "Number"
},
{
"name": "length",
"description": "The array to inspect.",
"args": [
"list"
],
"returns": "Number"
},
{
"name": "lens",
"description": "Returns a lens for the given getter and setter functions. The getter \"gets\"\nthe value of the focus; the setter \"sets\" the value of the focus. The setter\nshould not mutate the data structure.",
"args": [
"getter",
"setter"
],
"returns": "Lens"
},
{
"name": "lensIndex",
"description": "Returns a lens whose focus is the specified index.",
"args": [
"n"
],
"returns": "Lens"
},
{
"name": "lensPath",
"description": "The path to use.",
"args": [
"path"
],
"returns": "Lens"
},
{
"name": "lensProp",
"description": "Returns a lens whose focus is the specified property.",
"args": [
"k"
],
"returns": "Lens"
},
{
"name": "lift",
"description": "The function to lift into higher context",
"args": [
"fn"
],
"returns": "function"
},
{
"name": "liftN",
"description": "The function to lift into higher context",
"args": [
"fn"
],
"returns": "function"
},
{
"name": "lt",
"description": "Returns true if the first argument is less than the second; false\notherwise.",
"args": [
"a",
"b"
],
"returns": "Boolean"
},
{
"name": "lte",
"description": "Returns true if the first argument is less than or equal to the second;\nfalse otherwise.",
"args": [
"a",
"b"
],
"returns": "Boolean"
},
{
"name": "map",
"description": "The function to be called on every element of the input list.",
"args": [
"fn",
"list"
],
"returns": "Array"
},
{
"name": "mapAccum",
"description": "The function to be called on every element of the input list.",