Storage.flush(): Difference between revisions
No edit summary |
|||
| Line 4: | Line 4: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
mp.storage.data.auth = { | mp.storage.data.auth = { token: "abcd" }; | ||
mp.storage.flush(); | mp.storage.flush(); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See also== | ==See also== | ||
[[Category:Clientside API]] | [[Category:Clientside API]] | ||
Revision as of 17:27, 2 December 2017
Flushes storage.data. It isn't neccessary to flush it after every change since it will be flushed on disconnect, but recommended.
Syntax
storage.flush();
Example
mp.storage.data.auth = { token: "abcd" };
mp.storage.flush();