As per T2447, this is part of a series of diffs to refactor the transaction generation process.
This diff is a standalone utility function which parses parameters for both one to one and one to many send XEC transactions, aggregates the total send value (in case of one to many) and then checks whether the final send value is above dust.
This diff does not change any existing functionality within the codebase. Once all the utility functions are accepted, then there'll be a final set of diffs to refactor the existing sendXec() function which is getting quite large and cumbersome to maintain.