Skip to content

Commit 51cdfb2

Browse files
committed
Improved wording
1 parent 100186e commit 51cdfb2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/jsonpatch.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ defmodule Jsonpatch do
103103
end
104104

105105
@doc """
106-
Creates a patch from the difference of a source map to a target map.
106+
Creates a patch from the difference of a source map to a destination map or list.
107107
108108
## Examples
109109
@@ -153,7 +153,7 @@ defmodule Jsonpatch do
153153
defguardp are_unequal_lists(val1, val2)
154154
when val1 != val2 and is_list(val2) and is_list(val1)
155155

156-
defp diff_removes(target, source, current_path, acc)
156+
defp diff_removes(destination, source, current_path, acc)
157157

158158
defp diff_removes([], _, _, acc) do
159159
acc
@@ -163,7 +163,7 @@ defmodule Jsonpatch do
163163
acc
164164
end
165165

166-
defp diff_adds_and_replaces(target, source, current_path, acc \\ [])
166+
defp diff_adds_and_replaces(destination, source, current_path, acc \\ [])
167167

168168
defp diff_adds_and_replaces([], _, _, acc) do
169169
acc
@@ -185,7 +185,7 @@ defmodule Jsonpatch do
185185
nil ->
186186
[%Add{path: current_path, value: val} | acc]
187187

188-
# Source has a different value but both (target and source) value are lists or a maps
188+
# Source has a different value but both (destination and source) value are lists or a maps
189189
source_val
190190
when are_unequal_lists(source_val, val) or are_unequal_maps(source_val, val) ->
191191
# Enter next level

0 commit comments

Comments
 (0)