canInvoke (obj, methodName) Boolean
private
Checks to see if the methodName
exists on the obj
.
1 2 3 4 5 | let foo = { bar: function () { return 'bar' ; }, baz: null }; Ember.canInvoke(foo, 'bar' ); // true Ember.canInvoke(foo, 'baz' ); // false Ember.canInvoke(foo, 'bat' ); // false |
Parameters:
-
obj
Object
- The object to check for the method
-
methodName
String
- The method name to check for
Returns:
-
Boolean
Please login to continue.