mirror of
https://github.com/wader/fq.git
synced 2024-11-27 14:14:58 +03:00
funcs: format helper
This commit is contained in:
parent
59e7fd4e94
commit
80eaa4637e
@ -5,6 +5,8 @@ def help:
|
||||
, "^D exit REPL"
|
||||
) | println;
|
||||
|
||||
def format: ._format? // null;
|
||||
|
||||
# valid jq identifer, start with alpha or underscore then zero or more alpha, num or underscore
|
||||
def _is_ident: type == "string" and test("^[a-zA-Z_][a-zA-Z_0-9]*$");
|
||||
# escape " and \
|
||||
|
Loading…
Reference in New Issue
Block a user