UNPKG

ember-source

Version:

A JavaScript framework for creating ambitious web applications

40 lines (33 loc) 1.71 kB
export { m as dictionary } from '../../../shared-chunks/dictionary-gc5gpyOG.js'; export { g as getDebugName } from '../../../shared-chunks/get-debug-name-CSniHBsn.js'; export { G as GUID_KEY, a as generateGuid, g as guidFor, u as uuid } from '../../../shared-chunks/guid-Cbq2sNV_.js'; export { i as intern } from '../../../shared-chunks/intern-zquhAEIg.js'; export { R as ROOT, c as checkHasSuper, o as observerListenerMetaFor, a as setListeners, s as setObservers, w as wrap } from '../../../shared-chunks/super-BBBjgF69.js'; export { l as lookupDescriptor, s as setWithMandatorySetter, a as setupMandatorySetter, t as teardownMandatorySetter } from '../../../shared-chunks/mandatory-setter-BpbAMTzV.js'; export { g as getName, s as setName } from '../../../shared-chunks/name-Clp4Vsod.js'; export { t as toString } from '../../../shared-chunks/to-string-C7M8LBLH.js'; export { i as isObject } from '../../../shared-chunks/spec-BXl1reqK.js'; export { i as isProxy, s as setProxy } from '../../../shared-chunks/is_proxy-Bzg0d4m4.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 };