Skip to content

Commit

Permalink
Merge branch 'master' of github.com:WaldoJeffers/conductor
Browse files Browse the repository at this point in the history
  • Loading branch information
WaldoJeffers committed Sep 27, 2018
2 parents 8e5ab45 + c0def7f commit 08af214
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions docs/api-reference/equalsby.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
description: Check if two items are equal by the same token
---

# equalsBy

```haskell
equalsBy :: (Function | String getter, Any item1, Any item2) => Boolean
```
{% hint style="info" %}
Available since v1.4.0
{% endhint %}

### description

```erlang
equalsBy :: (Function | String getter, Any item1, Any item2) => Boolean
```

Returns `true` if the values returned by the getter are equals on both items. The `getter` can be provided as a `Function` or a `String`. If `getter` is a Function, then `equalsBy` will retrieve the comparison value from both items using the provided function. If it is a `String`, then `equalsBy` will use it as a key and retrieve the value associated to this key on both items. `equalsBy` uses [`equals`](equals.md) internally to compare the two values returned by `getter`.

### examples
Expand Down
8 changes: 4 additions & 4 deletions docs/api-reference/mergeby.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
description: Merge two collections using the provided key
---

# mergeBy

{% hint style="info" %}
Available since v1.4.0
{% endhint %}

### description

`mergeBy` works like [`merge`](merge.md), but uses an additional parameter \(`getter`\) to retrieve the value used for comparison. This additional parameter can be provided as a `Function`, or a `String` in which case mergeBy will retrieve the value associated to the provided key.
Expand Down

0 comments on commit 08af214

Please sign in to comment.