1.1.11 • Published 5 years ago

console_prototype v1.1.11

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

consoleprototype

This module expands the original consol object and gains a prototype property. If you call this property over the console object and pass a javascript object as a parameter, it displays the object's prototype chain as a node on the terminal.The purpose of the module is to be able to view object chains as in browsers.

install

    npm i console_prototype

usage

require('console_prototype') 

class AClass{
    constructor(){
        this.aProp = 'aProp'
    }

    getAprop(){
        return this.aProp
    }
}

class BClass extends AClass{
    constructor(){
        super()
        this.bProp = 'bProp'
    }

    getBprop(){
        return this.bProp
    }
}

class CClass extends BClass{
    constructor(){
        super()
        this.cProp = 'cProp'
    }

    getCprop(){
        return this.cProp
    }
}

class DClass extends CClass{
    constructor(){
        super()
        this.dProp = 'dProp'
    }

    getDprop(){
        return this.dProp
    }
}

const o = new DClass()
console.prototype(o)

out

alt text

usage 2

const consoleProto =require('console_prototype') 
const o = new DClass()
consoleProto(o)
1.1.11

5 years ago

1.1.10

5 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.1

5 years ago

1.1.2

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago