3 module.exports = getPrototypeChain;
5 function getPrototypeChain(obj) {
7 var target = getPrototypeOf(obj);
10 target = getPrototypeOf(target);
16 function getPrototypeOf(obj) {
19 }if (isPrimitive(obj)) obj = new obj.constructor(obj);
20 return Object.getPrototypeOf(obj);
23 function isPrimitive(item) {
24 return !(item instanceof Object) && Object.prototype.toString.call(item) !== "[object Object]";