minor fix to last fix to deepKeys(..)

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-06-14 17:39:27 +03:00
parent 3c487f105e
commit 9da8b306d3
2 changed files with 5 additions and 3 deletions

View File

@ -118,9 +118,11 @@ var deepKeys =
module.deepKeys = module.deepKeys =
function(obj, stop){ function(obj, stop){
var res = [] var res = []
while(obj!= null && obj.__proto__ !== stop){ while(obj!= null){
res.push(Object.keys(obj)) res.push(Object.keys(obj))
obj = obj.__proto__ } obj = obj.__proto__
if(obj === stop){
break }}
return [...(new Set(res.flat()))] } return [...(new Set(res.flat()))] }

View File

@ -1,6 +1,6 @@
{ {
"name": "ig-object", "name": "ig-object",
"version": "5.0.10", "version": "5.0.11",
"description": "", "description": "",
"main": "object.js", "main": "object.js",
"scripts": { "scripts": {