mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
rename readFromData to "fromData" as the equal opposite too "toData"
This commit is contained in:
parent
6ba9046d64
commit
314c613e11
@ -98,15 +98,15 @@ export default class DDO {
|
|||||||
this.did = did
|
this.did = did
|
||||||
}
|
}
|
||||||
if (typeof did === "object") {
|
if (typeof did === "object") {
|
||||||
this.readFromData(did)
|
this.fromData(did)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read from a data structur, this can be a JSON
|
* Read from a data structure, this can be a JSON
|
||||||
* :param data: data to import
|
* :param data: data to import
|
||||||
*/
|
*/
|
||||||
public readFromData(data: IDDO) {
|
public fromData(data: IDDO) {
|
||||||
if (data.hasOwnProperty("id") ) {
|
if (data.hasOwnProperty("id") ) {
|
||||||
this.did = data.id
|
this.did = data.id
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user