@webdeveric/utils
    Preparing search index...

    Function isObjectWith

    • Determine if input is an object and has the provided properties.

      Type Parameters

      • T
      • P extends PropertyKey

      Parameters

      • input: T
      • properties: P[]

      Returns input is T & Record<P, unknown>

      isObjectWith({ a: 1, b: 2 }, ['a', 'b']); // true
      isObjectWith({ a: 1 }, ['a', 'b']); // false