src code

class method SpahQL.DataHelper.jointSetWithCallback

SpahQL.DataHelper.jointSetWithCallback(set1, set2, callback) → Boolean result
  • set1 (Array): The value at the left-hand side of the comparator
  • set2 (Array): The value at the right-hand side of the comparator
  • callback (Function): A function to be used for comparing the values. Should accept two values as arguments.

Iterates over both sets such that every combination of values from the two is passed to the callback function for comparison. If the callback function at any point returns true, the method exits and returns true. Once all combinations have been exhausted and no matches are found, false will be returned.

Mostly used to refactor the various joint set methods (jointSet, eqSetRough, gteSet, gtSet, ltSet, lteSet to name a few).