ArrDiff type

Represents difference of elements between two arrays (order unimportant)

Direct parent types

Diff
Represents difference
Direct subtypes: 2

Methods

Bool(d:ArrDiff) Source: stdlib.ngs:4165
Check whether there is a difference

Returns

Bool

Example

arr_diff = Diff(current, desired)
# Implicit Bool() when using in "if": if arr_diff -> if Bool(arr_diff)
if arr_diff {
  echo("Will make modifications to the resource")
  if arr_diff.add {
    ...
  }
  if arr_diff.remove {
    ...
  }
}