timepiece/node_modules/for-own/index.js

20 lines
424 B
JavaScript
Raw Normal View History

2024-05-14 14:54:12 +00:00
/*!
* for-own <https://github.com/jonschlinkert/for-own>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
'use strict';
var forIn = require('for-in');
var hasOwn = Object.prototype.hasOwnProperty;
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);
}
});
};