valueTos method

Iterable valueTos(
  1. dynamic val,
  2. dynamic key, {
  3. List anyTags = const [],
  4. List allTags = const [],
})
override

Get all values link from val

(Optional) Only if it matches any of anyTags and matches all items in allTags

Implementation

Iterable valueTos(val, key,
    {List anyTags = const [], List allTags = const []}) {
  final _v = _map_add_or_get(val, _newNode);

  final bool Function(Maybe) where = anyTags.isEmpty && allTags.isEmpty
      ? (m) => m is Some
      : (m) => m is Some
          ? _check_all_any_val_tags(_v, m.val, key,
              anyTags: anyTags, allTags: allTags)
          : false;

  return _v.to.keys
      .map((n) => _v.tryGet(n, key))
      .where(where)
      .map((s) => s.val);
}