Function some

Returns true if predicate yields true for any value in map. Use find if you want the matched value.

const map = new Map();
map.set(`fruit`, `apple`);
map.set(`colour`, `red`);
Maps.some(map, v => v === `red`); // true
Maps.some(map, v => v === `orange`); // false
  • Type Parameters

    • V

    Parameters

    • map: ReadonlyMap<string, V>
    • predicate: ((v: V) => boolean)
        • (v): boolean
        • Parameters

          Returns boolean

    Returns boolean