Module utils
Helper utils
Functions
byte_is_alphanumeric (byte) | Obvious. |
byte_is_hex (byte) | Obvious. |
get_last_modified (path) | Get last modified time of a file |
merge (...) | Merge two tables. |
parse_hex (byte) | Obvious. |
percent_or_hex (v) | Obvious. |
watch_file (path, callback, ...) | Watch a file for changes and execute callback |
Functions
- byte_is_alphanumeric (byte)
-
Obvious.
Parameters:
- byte number
Returns:
-
boolean
- byte_is_hex (byte)
-
Obvious.
Parameters:
- byte number
Returns:
-
boolean
- get_last_modified (path)
-
Get last modified time of a file
Parameters:
- path string: file path
Returns:
-
number|nil: modified time
- merge (...)
-
Merge two tables.
todo: Remove this and use
vim.tbl_deep_extend
Parameters:
- ...
Returns:
-
table
- parse_hex (byte)
-
Obvious.
Parameters:
- byte number
Returns:
-
number
- percent_or_hex (v)
-
Obvious.
Parameters:
- v string
Returns:
-
number|nil
- watch_file (path, callback, ...)
-
Watch a file for changes and execute callback
Parameters:
- path string: File path
- callback function: Callback to execute
- ... array: params for callback
Returns:
-
function|nil