Skip to content
Client
Server

Reference / @open-music-sdk/core / has

Function: has() ​

ts
function has(value, methods): boolean;

Defined in: packages/core/src/check.ts:13

Whether value is an object with a function under each of methods. Nothing is called on it.

Parameters ​

value ​

unknown

What to look at.

methods ​

readonly string[]

The names that each have to hold a function.

Returns ​

boolean

Whether value is a non-null object and every name of methods holds a function on it.

MIT licensed. Not affiliated with, endorsed by, or sponsored by Apple Inc. Apple Music and MusicKit are trademarks of Apple Inc.