Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "select-keys"

Index

Functions

Const selectKeysMap

  • selectKeysMap<K, V>(src: Map<K, V>, ks: Iterable<K>): Map<K, V>
  • Returns a new map of same type as input only containing given keys (and only if they existed in the original map).

    Type parameters

    • K

    • V

    Parameters

    • src: Map<K, V>

      source map

    • ks: Iterable<K>

      selected keys

    Returns Map<K, V>

Const selectKeysObj

  • selectKeysObj<T>(src: T, ks: Iterable<PropertyKey>): Partial<T>
  • Returns a new object only containing given keys (and only if they existed in the original).

    Type parameters

    • T: object

    Parameters

    • src: T

      source object

    • ks: Iterable<PropertyKey>

      selected keys

    Returns Partial<T>

Generated using TypeDoc