Skip to content

Commit 3344649

Browse files
committed
chore@small
1 parent a5938ed commit 3344649

File tree

7 files changed

+67
-13
lines changed

7 files changed

+67
-13
lines changed

CHANGELOG.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020

2121
- R.rangeDescending - it accepts one or two arguments. If one argument is passed, it is considered as start value, and end is 0.
2222

23-
10.3.5
24-
2523
- Fix `R.filter(Boolean)` to handle filter of `false`, not only nullable values.
2624

2725
10.3.4

README.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3452,6 +3452,29 @@ export function exists(predicate) {
34523452

34533453
<details>
34543454

3455+
<summary><strong>Tests</strong></summary>
3456+
3457+
```javascript
3458+
import { exists } from './exists.js'
3459+
import { propEq } from './propEq.js'
3460+
3461+
const list = [{ a: 1 }, { a: 2 }, { a: 3 }]
3462+
3463+
test('happy', () => {
3464+
const fn = propEq(2, 'a')
3465+
expect(exists(fn)(list)).toBe(true)
3466+
})
3467+
3468+
test('nothing is found', () => {
3469+
const fn = propEq(4, 'a')
3470+
expect(exists(fn)(list)).toBe(false)
3471+
})
3472+
```
3473+
3474+
</details>
3475+
3476+
<details>
3477+
34553478
<summary><strong>TypeScript</strong> test</summary>
34563479

34573480
```typescript
@@ -11582,7 +11605,7 @@ describe('R.splitEvery', () => {
1158211605

1158311606
```typescript
1158411607

11585-
symmetricDifference<T>(list: T[]): (list: T[]) => T[]
11608+
symmetricDifference<T>(x: T[]): (y: T[]) => T[]
1158611609
```
1158711610

1158811611
It returns all items that are in either of the lists, but not in both.
@@ -11604,7 +11627,7 @@ const result = R.symmetricDifference(x)(y)
1160411627
<summary>All TypeScript definitions</summary>
1160511628

1160611629
```typescript
11607-
symmetricDifference<T>(list: T[]): (list: T[]) => T[];
11630+
symmetricDifference<T>(x: T[]): (y: T[]) => T[];
1160811631
```
1160911632

1161011633
</details>
@@ -13981,8 +14004,6 @@ describe('R.zipWith', () => {
1398114004

1398214005
- R.rangeDescending - it accepts one or two arguments. If one argument is passed, it is considered as start value, and end is 0.
1398314006

13984-
10.3.5
13985-
1398614007
- Fix `R.filter(Boolean)` to handle filter of `false`, not only nullable values.
1398714008

1398814009
10.3.4

docs/README.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3452,6 +3452,29 @@ export function exists(predicate) {
34523452

34533453
<details>
34543454

3455+
<summary><strong>Tests</strong></summary>
3456+
3457+
```javascript
3458+
import { exists } from './exists.js'
3459+
import { propEq } from './propEq.js'
3460+
3461+
const list = [{ a: 1 }, { a: 2 }, { a: 3 }]
3462+
3463+
test('happy', () => {
3464+
const fn = propEq(2, 'a')
3465+
expect(exists(fn)(list)).toBe(true)
3466+
})
3467+
3468+
test('nothing is found', () => {
3469+
const fn = propEq(4, 'a')
3470+
expect(exists(fn)(list)).toBe(false)
3471+
})
3472+
```
3473+
3474+
</details>
3475+
3476+
<details>
3477+
34553478
<summary><strong>TypeScript</strong> test</summary>
34563479

34573480
```typescript
@@ -11582,7 +11605,7 @@ describe('R.splitEvery', () => {
1158211605

1158311606
```typescript
1158411607

11585-
symmetricDifference<T>(list: T[]): (list: T[]) => T[]
11608+
symmetricDifference<T>(x: T[]): (y: T[]) => T[]
1158611609
```
1158711610

1158811611
It returns all items that are in either of the lists, but not in both.
@@ -11604,7 +11627,7 @@ const result = R.symmetricDifference(x)(y)
1160411627
<summary>All TypeScript definitions</summary>
1160511628

1160611629
```typescript
11607-
symmetricDifference<T>(list: T[]): (list: T[]) => T[];
11630+
symmetricDifference<T>(x: T[]): (y: T[]) => T[];
1160811631
```
1160911632

1161011633
</details>
@@ -13981,8 +14004,6 @@ describe('R.zipWith', () => {
1398114004

1398214005
- R.rangeDescending - it accepts one or two arguments. If one argument is passed, it is considered as start value, and end is 0.
1398314006

13984-
10.3.5
13985-
1398614007
- Fix `R.filter(Boolean)` to handle filter of `false`, not only nullable values.
1398714008

1398814009
10.3.4

files/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3070,7 +3070,7 @@ Notes:
30703070
30713071
*/
30723072
// @SINGLE_MARKER
3073-
export function symmetricDifference<T>(list: T[]): (list: T[]) => T[];
3073+
export function symmetricDifference<T>(x: T[]): (y: T[]) => T[];
30743074

30753075
/*
30763076
Method: tail

index.d.cts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2213,7 +2213,7 @@ export function splitEvery<T>(sliceLength: number): (input: T[]) => (T[])[];
22132213
*
22142214
* `R.equals` is used to determine equality.
22152215
*/
2216-
export function symmetricDifference<T>(list: T[]): (list: T[]) => T[];
2216+
export function symmetricDifference<T>(x: T[]): (y: T[]) => T[];
22172217

22182218
/**
22192219
* It returns all but the first element of `input`.

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2213,7 +2213,7 @@ export function splitEvery<T>(sliceLength: number): (input: T[]) => (T[])[];
22132213
*
22142214
* `R.equals` is used to determine equality.
22152215
*/
2216-
export function symmetricDifference<T>(list: T[]): (list: T[]) => T[];
2216+
export function symmetricDifference<T>(x: T[]): (y: T[]) => T[];
22172217

22182218
/**
22192219
* It returns all but the first element of `input`.

source/exists.spec.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { exists } from './exists.js'
2+
import { propEq } from './propEq.js'
3+
4+
const list = [{ a: 1 }, { a: 2 }, { a: 3 }]
5+
6+
test('happy', () => {
7+
const fn = propEq(2, 'a')
8+
expect(exists(fn)(list)).toBe(true)
9+
})
10+
11+
test('nothing is found', () => {
12+
const fn = propEq(4, 'a')
13+
expect(exists(fn)(list)).toBe(false)
14+
})

0 commit comments

Comments
 (0)