1
1
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:
Mattias Wadman 2021-08-20 14:48:19 +02:00
parent 59e7fd4e94
commit 80eaa4637e

View File

@ -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 \