MCPcopy Create free account
hub / github.com/azat-co/practicalnode / baseModel

Class baseModel

code/ch1/class.js:1–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1class baseModel {
2 constructor(options = {}, data = []) { // class constructor
3 this.name = 'Base'
4 this.url = 'http://azat.co/api'
5 this.data = data
6 this.options = options
7 }
8 getName() { // class method
9 console.log(`Class name: ${this.name}`)
10 }
11}
12class AccountModel extends baseModel {
13 constructor(options, data) {
14 super({private: true}, ['32113123123', '524214691']) //call the parent method with super

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected