gitbook wip

This commit is contained in:
Mike Farah
2021-11-03 22:37:07 +11:00
parent 2ace48c70d
commit de90b3e85e
65 changed files with 176 additions and 4217 deletions
+2 -1
View File
@@ -58,4 +58,5 @@ See the [documentation](https://mikefarah.gitbook.io/yq/) for more.
# BUGS / ISSUES / FEATURE REQUESTS
Please visit the GitHub page https://github.com/mikefarah/yq/.
Please visit the GitHub page https://github.com/mikefarah/yq/.
@@ -1,6 +1,8 @@
# Add
Add behaves differently according to the type of the LHS:
- arrays: concatenate
- number scalars: arithmetic addition
- string scalars: concatenate
* arrays: concatenate
* number scalars: arithmetic addition
* string scalars: concatenate
Use `+=` as append assign for things like increment. Note that `.a += .x` is equivalent to running `.a = .a + .x`.
@@ -1 +1,3 @@
# Alternative (Default value)
This operator is used to provide alternative (or default) values when a particular expression is either null or false.
@@ -1,5 +1,7 @@
# Encoder / Decoder
Encode operators will take the piped in object structure and encode it as a string in the desired format. The decode operators do the opposite, they take a formatted string and decode it into the relevant object structure.
Note that you can optionally pass an indent value to the encode functions (see below).
These operators are useful to process yaml documents that have stringified embeded yaml/json/props in them.
These operators are useful to process yaml documents that have stringified embeded yaml/json/props in them.
@@ -1 +1,2 @@
# Flatten
This recursively flattens arrays.
@@ -1 +1,3 @@
# Group By
This is used to group items in an array by an expression.