1 | /*
|
2 | object:forOwn
|
3 | */"use strict"
|
4 |
|
5 | var forIn = require("./forIn"),
|
6 | hasOwn = require("./hasOwn")
|
7 |
|
8 | var forOwn = function(self, method, context){
|
9 | forIn(self, function(value, key){
|
10 | if (hasOwn(self, key)) return method.call(context, value, key, self)
|
11 | })
|
12 | return self
|
13 | }
|
14 |
|
15 | module.exports = forOwn
|