Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
use call() for better performance
Browse files Browse the repository at this point in the history
call() performance twice as better than apply()

http://jsperf.com/call-apply-segu
  • Loading branch information
rsegu committed May 1, 2013
1 parent 58e693b commit 25d391c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/CollectionUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ define(function (require, exports, module) {
* @return {boolean} True if the object contains the property
*/
function hasProperty(object, property) {
return Object.prototype.hasOwnProperty.apply(object, [property]);
return Object.prototype.hasOwnProperty.call(object, property);
}

// Define public API
Expand Down

0 comments on commit 25d391c

Please sign in to comment.