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

Class AccountModel

code/ch1/class.js:12–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10 }
11}
12class AccountModel extends baseModel {
13 constructor(options, data) {
14 super({private: true}, ['32113123123', '524214691']) //call the parent method with super
15 this.name = 'Account Model'
16 this.url +='/accounts/'
17 }
18 get accountsData() { //calculated attribute getter
19 // ... make XHR
20 return this.data
21 }
22}
23
24let accounts = new AccountModel(5)
25accounts.getName()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected