UNPKG

@blueprintjs/core

Version:
17 lines 497 B
/* * Copyright 2018 Palantir Technologies, Inc. All rights reserved. * * Licensed under the terms of the LICENSE file distributed with this project. */ import { isFunction } from "../utils"; // tslint:disable-next-line:ban-types export function safeInvokeMember(obj, key, ...args) { if (obj != null) { const member = obj[key]; if (isFunction(member)) { return member(...args); } } return undefined; } //# sourceMappingURL=safeInvokeMember.js.map