Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Operator '+' #47

Closed
kenjones-cisco opened this issue Sep 27, 2017 · 0 comments
Closed

Add support for Operator '+' #47

kenjones-cisco opened this issue Sep 27, 2017 · 0 comments

Comments

@kenjones-cisco
Copy link
Contributor

Add support for Operator '+'

The operator + takes two filters, applies them both to the same input, and adds the results together. What “adding” means depends on the types involved:

Numbers are added by normal arithmetic.

Arrays are added by being concatenated into a larger array.

Strings are added by being joined into a larger string.

Objects are added by merging, that is, inserting all the key-value pairs from both objects into a single combined object. If both objects contain a value for the same key, the object on the right of the + wins. (For recursive merge use the * operator.)

null can be added to any value, and returns the other value unchanged.
@kenjones-cisco kenjones-cisco added this to the 1.14.0 milestone Sep 27, 2017
@mikefarah mikefarah removed this from the 1.14.0 milestone Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants