forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjfp-tests.ts
120 lines (117 loc) · 2.56 KB
/
jfp-tests.ts
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
/// <reference path="jfp.d.ts" />
function testFn () {};
j(testFn);
j.add(5, 6);
j.always(true)();
j.and(true, false) === false;
j.apply(testFn, [1, 2, 3]);
j.between([3, 7], 5) === true;
j.call(testFn, 1, 2, 3);
j.clone({});
j.compact([]);
j.compose(testFn, testFn)();
j.composePredicate(j.isZero)(0);
j.concat([], []);
j.conj('foo', []);
j.cons('foo', []);
j.contains('foo', []);
j.copyArray([]);
j.countArguments(testFn);
j.curry(testFn);
j.deref('foo.bar.baz', {});
j.difference([], []);
j.divide(6, 3);
j.drop(0, [1, 2, 3]);
j.dropFirst([1, 2, 3]);
j.dropLast([1, 2, 3]);
j.dropUntil(j.isZero, []);
j.fac(5);
j.filter(j.isEven, [1, 2, 3, 4, 5]);
j.find(j.isEven, []);
j.first([1, 2, 3]);
j.hasFirst([]);
j.identity(5);
j.inc(5);
j.init([]);
j.intersect([], []);
j.isArray([]);
j.isBoolean(true);
j.isEmptyString('bar');
j.isEven(3);
j.isFunction(testFn);
j.isInt(9.2);
j.isMultipleOf(5, 35);
j.isNegative(938);
j.isNonNegative(3);
j.isNonPositive(-99);
j.isNonZero(0);
j.isNull('not null');
j.isNumber({});
j.isNumeric('5.78');
j.isObject({});
j.isOdd(6);
j.isPair([]);
j.isPositive(9);
j.isPrimitive({});
j.isSingle([]);
j.isString('Yup');
j.isTriple([1, 2, 3]);
j.isTruthy(1);
j.isTuple([]);
j.isType('number', 5);
j.isUndefined(undefined);
j.isZero(100);
j.last([1, 2, 3]);
j.lastIndex([]);
j.leq(0, 6);
j.less(9, 10);
j.map(j.partial(j.add, 1), [1, 2, 3]);
j.max(5, 6);
j.maybe(null);
j.maybeType('string', null);
j.merge([], []);
j.min(5, 6);
j.mod(4, 3);
j.modulo(4, 3);
j.multiPartition(j.equal, [1, 2], [1, 2, 1, 2]);
j.multiply(1, 2);
j.not(true);
j.nth(5, [1, 2, 3, 4, 5, 6, 7]);
j.numberOf(j.isEven, [1, 2, 3, 4]);
j.or(true, false);
j.partial(testFn, 'foo')();
j.partialReverse(testFn, 1, 2)();
j.partition(j.isEven, [1, 2, 3, 4]);
j.pick('foo', { foo: 'bar' });
j.pipeline('foo', testFn, testFn);
j.pluck('foo', { foo: 'bar' });
j.pluckKeys(['foo'], { foo: 'bar' });
j.range(5);
j.range(5, 7);
j.rcompose(testFn, testFn)();
j.recur(testFn, 1, 2, 3);
j.reduce(testFn, [1, 2, 3], []);
j.repeat(10, testFn);
j.rest([1, 2, 3, 4]);
j.reverseArgs(testFn)();
j.rpartial(testFn, 1, 2, 3);
j.shortCircuit('foo', testFn, 'bar');
j.slice(0, [1, 2, 3]);
j.slice(0, [1, 2, 3], 1);
j.some(j.isEven, [1, 2, 3]);
j.sort([1, 2, 3, 4], function () { return 0});
j.splitPartial(testFn, [], [])();
j.subtract(6, 5);
j.symmetricDifference([], []);
j.take(5, [1, 2, 3, 4, 5, 6]);
j.takeUntil(j.isEven, [1, 3, 5, 6, 7]);
j.times(10, 'foo');
j.toDec('10');
j.toValues({ foo: 'bar' });
j.transform([['foo', 'bar']], {});
j.truncate(5.7);
j.union([], []);
j.unique([]);
j.when(true, testFn);
j.xor(true, true);
j.zip([], []);