JustBash.Commands.Jq.Evaluator.Functions (JustBash v0.4.0)

View Source

Built-in function implementations for jq.

This module contains all the named functions available in jq expressions, organized by category: collection operations, string operations, type functions, path operations, regex operations, and iteration helpers.

Summary

Functions

Returns a map of builtin function name strings to their atom equivalents.

Functions

builtin_atoms()

@spec builtin_atoms() :: %{required(String.t()) => atom()}

Returns a map of builtin function name strings to their atom equivalents.

eval_func(name, args, data, opts, evaluator)

@spec eval_func(atom(), [any()], any(), map(), module()) :: any()

Evaluate a function call.

Returns the result of applying the named function with given arguments to the input data. Raises {:eval_error, message} for unknown functions.