@blueprintjs/core
Version:
Core styles & components
21 lines • 612 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) {
var args = [];
for (var _i = 2; _i < arguments.length; _i++) {
args[_i - 2] = arguments[_i];
}
if (obj != null) {
var member = obj[key];
if (isFunction(member)) {
return member.apply(void 0, args);
}
}
return undefined;
}
//# sourceMappingURL=safeInvokeMember.js.map