UNPKG

@segment/analytics-core

Version:

This package represents core 'shared' functionality that is shared by analytics packages. This is not designed to be used directly, but internal to analytics-node and analytics-browser.

8 lines (7 loc) 247 B
export function hasProperties<T extends object, K extends string>( obj: T, ...keys: K[] ): obj is T & { [J in K]: unknown } { // eslint-disable-next-line no-prototype-builtins return !!obj && keys.every((key) => obj.hasOwnProperty(key)) }