(val, key)
| 756 | } |
| 757 | |
| 758 | setval(val, key) { |
| 759 | if (this.isSurge() || this.isLoon()) { |
| 760 | return $persistentStore.write(val, key) |
| 761 | } else if (this.isQuanX()) { |
| 762 | return $prefs.setValueForKey(val, key) |
| 763 | } else if (this.isNode()) { |
| 764 | this.data = this.loaddata() |
| 765 | this.data[key] = val |
| 766 | this.writedata() |
| 767 | return true |
| 768 | } else { |
| 769 | return (this.data && this.data[key]) || null |
| 770 | } |
| 771 | } |
| 772 | |
| 773 | initGotEnv(opts) { |
| 774 | this.got = this.got ? this.got : require('got') |