Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
custom:javascript:lib:userprops.js [2019/07/17 00:22] – Documented digital mancustom:javascript:lib:userprops.js [2019/08/14 00:30] (current) – [userprops.js] typo digital man
Line 1: Line 1:
 ====== userprops.js ====== ====== userprops.js ======
  
-So you're a Synchronet JavaScript module author or modder and you've got some per-values that you would like to store persistently (in a file). This is where the User Properties (''userprops.js'') library comes to "Save the day"!+So you're a Synchronet JavaScript module author or modder and you've got some per-user values that you would like to store persistently (in a file). This is where the User Properties (''userprops.js'') library comes to "Save the day"!
  
 This library manages the ''[[dir:data]]/user/*.ini'' files where per-user module-owned property values are stored. This library manages the ''[[dir:data]]/user/*.ini'' files where per-user module-owned property values are stored.
Line 9: Line 9:
 ===== Usage ===== ===== Usage =====
  
-The ''userprops.js'' library is a load-style library, meaning it is intended to be used like so:+The ''userprops.js'' library is a return-style library, meaning it is intended to be used like so:
  
 <code javascript> <code javascript>
Line 45: Line 45:
 To have precise control over the data-types read from a user's property file, you will need to ''get'' one property at a time and specify a default (''deflt'') property value argument. Otherwise, you may need to provide special logic to handle String values that have been interpreted as valid Number or Boolean type values. To have precise control over the data-types read from a user's property file, you will need to ''get'' one property at a time and specify a default (''deflt'') property value argument. Otherwise, you may need to provide special logic to handle String values that have been interpreted as valid Number or Boolean type values.
  
-==== put ====+==== set ====
  
-The ''userprops.js'' ''put'' method can be used to write:+The ''userprops.js'' ''set'' method can be used to write:
   * the entire property file associated with the specified user   * the entire property file associated with the specified user
   * the specified ''section'' within the user's property file   * the specified ''section'' within the user's property file