Update utils
This commit is contained in:
12
README.md
12
README.md
@@ -557,10 +557,13 @@ The standard Lua API is extended with the following features:
|
||||
* `string:split(delimeter)` - splits the string using the specified delimiter and returns a table;
|
||||
* `string:replace(regexp, string)` - replaces the text found by the regular expression with another text;
|
||||
* `slice(table, start, end)` - returns the part of the table starting with the `start` index and ending with `end` index;
|
||||
* `get_index(table, value)` - returns the index of the table element;
|
||||
* `get_key(table, value)` - returns the key of the table element;
|
||||
* `concat_tables(table1, table2)` - adds elements from array table `table2` to `table1`;
|
||||
* `index(table, value)` - returns the index of the table element;
|
||||
* `key(table, value)` - returns the key of the table element;
|
||||
* `concat(table1, table2)` - adds elements from array table `table2` to `table1`;
|
||||
* `reverse(table)` - returns a table in which the elements follow in reverse order;
|
||||
* `serialize(table)` - serializes the table into executable Lua code;
|
||||
* `round(x, n)` - rounds the number;
|
||||
* `map(function, table)`, `filter(function, table)`, `head(table)`, `tail(table)`, `reduce(function, table)` - several convenience functional utilities form Haskell, Python etc.
|
||||
|
||||
AIO Launcher also includes:
|
||||
|
||||
@@ -620,7 +623,8 @@ Some tips on writing and debugging scripts:
|
||||
* The most convenient way to upload scripts to your smartphone is to use the `install-scripts.sh` script from this repository. This is a sh script for UNIX systems which loads all the scripts from the repository onto the (virtual) memory card of the smartphone using ADB. You can edit it to your liking.
|
||||
* The easiest way to reload an updated widget script is to swipe the widget to the right and then press the "reload" button. The search scripts will be reloaded automatically next time you open the search window.
|
||||
* Since version 4.3.0 AIO Launcher supports widget scripts hot reloading. To enable it, go to AIO Settings -> About and click on the version number 7 times. Then open AIO Settings -> Testing and enable the option "Hot reload scripts on resume". Now when you change the script, it will be automatically reloaded when you return to the desktop.
|
||||
* Since version 4.4.2 AIO Launcher includes `debug` module with methods: `debug:log(text)`, `debug:toast(text)` and `debug:dialog(text)`.
|
||||
* Since version 4.4.2 AIO Launcher includes `debug` module with methods: `debug:log(text)`, `debug:toast(text)` and `debug:dialog(text)`;
|
||||
* Since version 4.8.0 you can use `--testing = "true"` meta tag. In this case, launcher will gray out the script and place it at the end of the list in the side menu.
|
||||
|
||||
# Contribution
|
||||
|
||||
|
||||
Reference in New Issue
Block a user