9d5e3513733bccf8d53c27b282a54316c88d8468
[platform/framework/web/crosswalk-tizen.git] /
1 define(['../array/slice'], function(slice){
2
3     /**
4      * Return a copy of the object, filtered to only have values for the whitelisted keys.
5      */
6     function pick(obj, var_keys){
7         var keys = typeof arguments[1] !== 'string'? arguments[1] : slice(arguments, 1),
8             out = {},
9             i = 0, key;
10         while (key = keys[i++]) {
11             out[key] = obj[key];
12         }
13         return out;
14     }
15
16     return pick;
17
18 });