blob: 74e2d755100f856c55aa35495799c52a5b8f896a [file] [log] [blame]
Leo Repp58b9f112021-11-22 11:57:47 +01001/*!
2 * for-own <https://github.com/jonschlinkert/for-own>
3 *
4 * Copyright (c) 2014-2017, Jon Schlinkert.
5 * Released under the MIT License.
6 */
7
8'use strict';
9
10var forIn = require('for-in');
11var hasOwn = Object.prototype.hasOwnProperty;
12
13module.exports = function forOwn(obj, fn, thisArg) {
14 forIn(obj, function(val, key) {
15 if (hasOwn.call(obj, key)) {
16 return fn.call(thisArg, obj[key], key, obj);
17 }
18 });
19};