2016-10-10 03:43:44 +02:00
|
|
|
/*!
|
|
|
|
* for-own <https://github.com/jonschlinkert/for-own>
|
|
|
|
*
|
2017-04-20 03:09:25 +02:00
|
|
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
|
|
* Released under the MIT License.
|
2016-10-10 03:43:44 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var forIn = require('for-in');
|
|
|
|
var hasOwn = Object.prototype.hasOwnProperty;
|
|
|
|
|
2017-04-20 03:09:25 +02:00
|
|
|
module.exports = function forOwn(obj, fn, thisArg) {
|
|
|
|
forIn(obj, function(val, key) {
|
|
|
|
if (hasOwn.call(obj, key)) {
|
|
|
|
return fn.call(thisArg, obj[key], key, obj);
|
2016-10-10 03:43:44 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|