UNPKG

ember-source

Version:

A JavaScript framework for creating ambitious web applications

35 lines (28 loc) 1.41 kB
export { m as dictionary } from '../../../shared-chunks/dictionary-gc5gpyOG.js'; export { G as GUID_KEY, R as ROOT, d as checkHasSuper, e as generateGuid, f as getDebugName, g as guidFor, c as intern, i as isObject, l as lookupDescriptor, o as observerListenerMetaFor, h as setListeners, s as setObservers, b as setWithMandatorySetter, a as setupMandatorySetter, t as teardownMandatorySetter, u as uuid, w as wrap } from '../../../shared-chunks/mandatory-setter-DHZe7-kW.js'; export { g as getName, s as setName } from '../../../shared-chunks/name-Z7dpqvzn.js'; export { t as toString } from '../../../shared-chunks/to-string-C7M8LBLH.js'; export { i as isProxy, s as setProxy } from '../../../shared-chunks/is_proxy-B0smdQy8.js'; export { C as Cache } from '../../../shared-chunks/cache-qDyqAcpg.js'; /** Checks to see if the `methodName` exists on the `obj`. ```javascript let foo = { bar: function() { return 'bar'; }, baz: null }; Ember.canInvoke(foo, 'bar'); // true Ember.canInvoke(foo, 'baz'); // false Ember.canInvoke(foo, 'bat'); // false ``` @method canInvoke @for Ember @param {Object} obj The object to check for the method @param {String} methodName The method name to check for @return {Boolean} @private */ function canInvoke(obj, methodName) { return obj != null && typeof obj[methodName] === 'function'; } /** @module @ember/utils */ export { canInvoke };