b40cbaf1885e9df20811d9384c9b4e8ec7e9712d
[platform/framework/web/crosswalk-tizen.git] /
1 define(['./hasOwn', './forIn'], function (hasOwn, forIn) {
2
3     /**
4      * Similar to Array/forEach but works over object properties and fixes Don't
5      * Enum bug on IE.
6      * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
7      */
8     function forOwn(obj, fn, thisObj){
9         forIn(obj, function(val, key){
10             if (hasOwn(obj, key)) {
11                 return fn.call(thisObj, obj[key], key, obj);
12             }
13         });
14     }
15
16     return forOwn;
17
18 });