This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| libecho:classes:util [2022/05/20 19:12] – lee | libecho:classes:util [2023/08/06 18:54] (current) – removed lee | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== LibEcho.Util ====== | ||
| - | |||
| - | Miscellaneous internal utility functions that don't seem to fit anywhere else. You probably won't every need to use any of these, except maybe String.capitalize(). | ||
| - | |||
| - | ===== Array Prototypes ===== | ||
| - | |||
| - | ==== Array.prototype.commaList() ==== | ||
| - | |||
| - | Assuming that it is an array of strings, returns a proper serial-comma-separated description of the list including " | ||
| - | |||
| - | [ "a two-dollar pistol", | ||
| - | |||
| - | [ "a two-dollar pistol", | ||
| - | |||
| - | [ "a two-dollar pistol" | ||
| - | |||
| - | [].commaList() returns " | ||
| - | |||
| - | ==== Array.prototype.aList ==== | ||
| - | |||
| - | Assuming an array of PersistentObjects (or subclasses), | ||
| - | |||
| - | ==== Array.prototype.theList ==== | ||
| - | |||
| - | Assuming an array of PersistentObjects (or subclasses), | ||
| - | |||
| - | ===== LibEcho.Util.log( logName, message ) ===== | ||
| - | |||
| - | If Sugarcube has been put in debug mode (Config.debug = true), logs the given logName and message to the JS console. | ||
| - | |||
| - | ===== LibEcho.Util.MessageQueue ===== | ||
| - | |||
| - | A global message queue system to allow the story author to more easily hook into the Inventory and Apparel UIs and display various flavor texts and do other processing while a player is fooling around with Inventory and Apparel. | ||
| - | |||
| - | Not fully implemented. | ||
| - | |||
| - | FIXME | ||
| - | |||
| - | ===== String Prototypes ===== | ||
| - | |||
| - | ==== String.prototype.capitalize() ==== | ||
| - | |||
| - | Returns the string with the first character capitalized. | ||
| - | |||
| - | FIXME: This doesn' | ||