@blueprintjs/core
Version:
Core styles & components
17 lines • 497 B
JavaScript
/*
* 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