https://github.com/dcoles/jsonnet-functools
Functional programming extras for Jsonnet
https://github.com/dcoles/jsonnet-functools
jsonnet
Last synced: 3 months ago
JSON representation
Functional programming extras for Jsonnet
- Host: GitHub
- URL: https://github.com/dcoles/jsonnet-functools
- Owner: dcoles
- License: apache-2.0
- Created: 2019-06-17T06:25:34.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-18T03:59:14.000Z (almost 7 years ago)
- Last Synced: 2025-01-20T01:47:54.945Z (over 1 year ago)
- Topics: jsonnet
- Language: Jsonnet
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jsonnet-functools
Functional programming extras for Jsonnet
## Functions
### functools.repeat(x, n)
Repeat a value `x`, `n`-times.
### functools.cycle(xs, n)
Repeat a cycle of values `xs`, `n`-times.
### functools.zip(xs, ys)
Zip together two arrays into an array of arrays.
### functools.all(xs)
Returns `true` iff all values in an array `xs` are `true`.
Short-circuts on first `false` value found.
### functools.any(xs)
Returns `true` iff one (or more) values in an array `xs` is `true`.
Short-circuts on first `true` value found.
### functools.apply(func, args)
Apply `args` to function `fn`.
# Licence
Apache License 2.0.
See [LICENCE](LICENCE).