diff --git a/data/objects.json b/data/objects.json index 4891220..583fc49 100644 --- a/data/objects.json +++ b/data/objects.json @@ -1349,1604 +1349,6 @@ ], "summary": "The user associated with the author of the article.", "name": "user" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "The size of a string is the number of characters that the string includes. The size of an array is the number of items\nin the array.", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/collections/sale-potions", - "raw_liquid": "{{ collection.title | size }}\n{{ collection.products | size }}", - "parameter": false, - "display_type": "text", - "show_data_tab": false - }, - { - "name": "Dot notation", - "description": "You can use the `size` filter with dot notation when you need to use it inside a tag or object output.\n", - "syntax": "", - "path": "/collections/sale-potions", - "raw_liquid": "{% if collection.products.size >= 10 %}\n There are 10 or more products in this collection.\n{% else %}\n There are less than 10 products in this collection.\n{% endif %}", - "parameter": false, - "display_type": "text", - "show_data_tab": false - } - ], - "return_type": [ - { - "type": "number", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Returns the size of a string or array.", - "name": "size" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/products/health-potion", - "raw_liquid": "{{ product.title | downcase }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Converts a string to all lowercase characters.", - "name": "downcase" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/products/health-potion", - "raw_liquid": "{{ product.title | upcase }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Converts a string to all uppercase characters.", - "name": "upcase" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{{ 'this sentence should start with a capitalized word.' | capitalize }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Capitalizes the first word in a string and downcases the remaining characters.", - "name": "capitalize" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{{ '<p>Text to be escaped.</p>' | escape }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Escapes special characters in HTML, such as `<>`, `'`, and `&`, and converts characters into escape sequences. The filter doesn't effect characters within the string that don’t have a corresponding escape sequence.\".", - "name": "escape" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "# applying the escape filter to already escaped text escapes characters in HTML entities:\n\n{{ \"&lt;p&gt;Text to be escaped.&lt;/p&gt;\" | escape }}\n\n# applying the escape_once filter to already escaped text skips characters in HTML entities:\n\n{{ \"&lt;p&gt;Text to be escaped.&lt;/p&gt;\" | escape_once }}\n\n# use escape_once to escape strings where a combination of HTML entities and non-escaped characters might be present:\n\n{{ \"&lt;p&gt;Text to be escaped.&lt;/p&gt; & some additional text\" | escape_once }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Escapes a string without changing characters that have already been escaped.", - "name": "escape_once" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "> Note:\n> Spaces are converted to a `+` character, instead of a percent-encoded character.", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{{ 'test@test.com' | url_encode }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Converts any URL-unsafe characters in a string to the\n[percent-encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding) equivalent.", - "name": "url_encode" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{{ 'test%40test.com' | url_decode }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Decodes any [percent-encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding) characters\nin a string.", - "name": "url_decode" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{{ 'one two three' | base64_encode }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Encodes a string to [Base64 format](https://developer.mozilla.org/en-US/docs/Glossary/Base64).", - "name": "base64_encode" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{{ 'b25lIHR3byB0aHJlZQ==' | base64_decode }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Decodes a string in [Base64 format](https://developer.mozilla.org/en-US/docs/Glossary/Base64).", - "name": "base64_decode" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "To produce URL-safe Base64, this filter uses `-` and `_` in place of `+` and `/`.", - "syntax": "", - "path": "/", - "raw_liquid": "{{ 'one two three' | base64_url_safe_encode }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Encodes a string to URL-safe [Base64 format](https://developer.mozilla.org/en-US/docs/Glossary/Base64).", - "name": "base64_url_safe_encode" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{{ 'b25lIHR3byB0aHJlZQ==' | base64_url_safe_decode }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Decodes a string in URL-safe [Base64 format](https://developer.mozilla.org/en-US/docs/Glossary/Base64).", - "name": "base64_url_safe_decode" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "By default, the substring has a length of one character, and the array series has one array item. However, you can\nprovide a second parameter to specify the number of characters or array items.", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/collections/all", - "raw_liquid": "{{ collection.title | slice: 0 }}\n{{ collection.title | slice: 0, 5 }}\n\n{{ collection.all_tags | slice: 1, 2 | join: ', ' }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - }, - { - "name": "Negative index", - "description": "You can supply a negative index which will count from the end of the string.\n", - "syntax": "", - "path": "/collections/all", - "raw_liquid": "{{ collection.title | slice: -3, 3 }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Returns a substring or series of array items, starting at a given 0-based index.", - "name": "slice" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "If the specified number of characters is less than the length of the string, then an ellipsis (`...`) is appended to\nthe truncated string. The ellipsis is included in the character count of the truncated string.", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/blogs/potion-notions/how-to-tell-if-you-have-run-out-of-invisibility-potion", - "raw_liquid": "{{ article.title | truncate: 15 }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - }, - { - "name": "Specify a custom ellipsis", - "description": "You can provide a second parameter to specify a custom ellipsis. If you don't want an ellipsis, then you can supply an empty string.\n", - "syntax": "string | truncate: number, string", - "path": "/blogs/potion-notions/how-to-tell-if-you-have-run-out-of-invisibility-potion", - "raw_liquid": "{{ article.title | truncate: 15, '--' }}\n{{ article.title | truncate: 15, '' }}", - "parameter": true, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Truncates a string down to a given number of characters.", - "name": "truncate" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "If the specified number of words is less than the number of words in the string, then an ellipsis (`...`) is appended to\nthe truncated string.\n\n> Caution:\n> HTML tags are treated as words, so you should strip any HTML from truncated content. If you don't strip HTML, then\n> closing HTML tags can be removed, which can result in unexpected behavior.", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/blogs/potion-notions/how-to-tell-if-you-have-run-out-of-invisibility-potion", - "raw_liquid": "{{ article.content | strip_html | truncatewords: 15 }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - }, - { - "name": "Specify a custom ellipsis", - "description": "You can provide a second parameter to specify a custom ellipsis. If you don't want an ellipsis, then you can supply an empty string.\n", - "syntax": "string | truncatewords: number, string", - "path": "/blogs/potion-notions/how-to-tell-if-you-have-run-out-of-invisibility-potion", - "raw_liquid": "{{ article.content | strip_html | truncatewords: 15, '--' }}\n\n{{ article.content | strip_html | truncatewords: 15, '' }}", - "parameter": true, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Truncates a string down to a given number of words.", - "name": "truncatewords" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/products/health-potion", - "raw_liquid": "{%- assign title_words = product.handle | split: '-' -%}\n\n{% for word in title_words -%}\n {{ word }}\n{%- endfor %}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "array", - "name": "", - "description": "", - "array_value": "string" - } - ], - "summary": "Splits a string into an array of substrings based on a given separator.", - "name": "split" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{%- assign text = ' Some potions create whitespace. ' -%}\n\n\"{{ text }}\"\n\"{{ text | strip }}\"", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Strips all whitespace from the left and right of a string.", - "name": "strip" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{%- assign text = ' Some potions create whitespace. ' -%}\n\n\"{{ text }}\"\n\"{{ text | lstrip }}\"", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Strips all whitespace from the left of a string.", - "name": "lstrip" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{%- assign text = ' Some potions create whitespace. ' -%}\n\n\"{{ text }}\"\n\"{{ text | rstrip }}\"", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Strips all whitespace from the right of a string.", - "name": "rstrip" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/products/health-potion", - "raw_liquid": "<!-- With HTML -->\n{{ product.description }}\n\n<!-- HTML stripped -->\n{{ product.description | strip_html }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Strips all HTML tags from a string.", - "name": "strip_html" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/products/health-potion", - "raw_liquid": "<!-- With newlines -->\n{{ product.description }}\n\n<!-- Newlines stripped -->\n{{ product.description | strip_newlines }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Strips all newline characters (line breaks) from a string.", - "name": "strip_newlines" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/collections/sale-potions", - "raw_liquid": "{{ collection.all_tags | join }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - }, - { - "name": "Custom separator", - "description": "You can specify a custom separator for the joined items.\n", - "syntax": "array | join: string", - "path": "/collections/sale-potions", - "raw_liquid": "{{ collection.all_tags | join: ', ' }}", - "parameter": true, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Combines all of the items in an array into a single string, separated by a space.", - "name": "join" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/collections/all", - "raw_liquid": "{% assign tags = collection.all_tags | sort %}\n\n{% for tag in tags -%}\n {{ tag }}\n{%- endfor %}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - }, - { - "name": "Sort by an array item property", - "description": "You can specify an array item property to sort the array items by. You can sort by any property of the object that you're sorting.\n", - "syntax": "array | sort: string", - "path": "/collections/all", - "raw_liquid": "{% assign products = collection.products | sort: 'price' %}\n\n{% for product in products -%}\n {{ product.title }}\n{%- endfor %}", - "parameter": true, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "array", - "name": "", - "description": "", - "array_value": "untyped" - } - ], - "summary": "Sorts the items in an array in case-sensitive alphabetical, or numerical, order.", - "name": "sort" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "> Caution:\n> You shouldn't use the `sort_natural` filter to sort numerical values. When comparing items an array, each item is converted to a\n> string, so sorting on numerical values can lead to unexpected results.", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/collections/all", - "raw_liquid": "{% assign tags = collection.all_tags | sort_natural %}\n\n{% for tag in tags -%}\n {{ tag }}\n{%- endfor %}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - }, - { - "name": "Sort by an array item property", - "description": "You can specify an array item property to sort the array items by.\n", - "syntax": "array | sort_natural: string", - "path": "/collections/all", - "raw_liquid": "{% assign products = collection.products | sort_natural: 'title' %}\n\n{% for product in products -%}\n {{ product.title }}\n{%- endfor %}", - "parameter": true, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "array", - "name": "", - "description": "", - "array_value": "untyped" - } - ], - "summary": "Sorts the items in an array in case-insensitive alphabetical order.", - "name": "sort_natural" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "This requires you to provide both the property name and the associated value.", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/collections/all", - "raw_liquid": "{% assign polina_products = collection.products | where: 'vendor', \"Polina's Potent Potions\" %}\n\nProducts from Polina's Potent Potions:\n\n{% for product in polina_products -%}\n - {{ product.title }}\n{%- endfor %}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - }, - { - "name": "Filter for boolean properties with a `true` value", - "description": "You can filter for items that have a `true` value for a boolean property. This requires you to provide only the property name.\n", - "syntax": "", - "path": "/collections/all", - "raw_liquid": "{% assign available_products = collection.products | where: 'available' %}\n\nAvailable products:\n\n{% for product in available_products -%}\n - {{ product.title }}\n{%- endfor %}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "array", - "name": "", - "description": "", - "array_value": "untyped" - } - ], - "summary": "Filters an array to include only items with a specific property value.", - "name": "where" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{% assign potion_array = 'invisibility, health, love, health, invisibility' | split: ', ' %}\n\n{{ potion_array | uniq | join: ', ' }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "array", - "name": "", - "description": "", - "array_value": "untyped" - } - ], - "summary": "Removes any duplicate items in an array.", - "name": "uniq" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/collections/sale-potions", - "raw_liquid": "Original order:\n{{ collection.products | map: 'title' | join: ', ' }}\n\nReverse order:\n{{ collection.products | reverse | map: 'title' | join: ', ' }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - }, - { - "name": "Reversing strings", - "description": "You can't use the `reverse` filter on strings directly. However, you can use the [`split` filter](/docs/api/liquid/filters/split) to create an array of characters in the string, reverse that array, and then use the [`join` filter](/docs/api/liquid/filters/join) to combine them again.\n", - "syntax": "", - "path": "/collections/sale-potions", - "raw_liquid": "{{ collection.title | split: '' | reverse | join: '' }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "array", - "name": "", - "description": "", - "array_value": "untyped" - } - ], - "summary": "Reverses the order of the items in an array.", - "name": "reverse" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/collections/sale-potions", - "raw_liquid": "{%- assign product_titles = collection.products | map: 'title' -%}\n\n{{ product_titles | join: ', ' }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "array", - "name": "", - "description": "", - "array_value": "untyped" - } - ], - "summary": "Creates an array of values from a specific property of the items in an array.", - "name": "map" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/collections/all", - "raw_liquid": "{%- assign original_prices = collection.products | map: 'compare_at_price' -%}\n\nOriginal prices:\n\n{% for price in original_prices -%}\n - {{ price }}\n{%- endfor %}\n\n{%- assign compacted_original_prices = original_prices | compact -%}\n\nOriginal prices - compacted:\n\n{% for price in compacted_original_prices -%}\n - {{ price }}\n{%- endfor %}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "array", - "name": "", - "description": "", - "array_value": "untyped" - } - ], - "summary": "Removes any `nil` items from an array.", - "name": "compact" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/products/komodo-dragon-scale", - "raw_liquid": "{{ product.handle | replace: '-', ' ' }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Replaces any instance of a substring inside a string with a given string.", - "name": "replace" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/products/komodo-dragon-scale", - "raw_liquid": "{{ product.handle | replace_first: '-', ' ' }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Replaces the first instance of a substring inside a string with a given string.", - "name": "replace_first" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/products/komodo-dragon-scale", - "raw_liquid": "{{ product.handle | replace_last: '-', ' ' }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Replaces the last instance of a substring inside a string with a given string.", - "name": "replace_last" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{{ \"I can't do it!\" | remove: \"'t\" }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Removes any instance of a substring inside a string.", - "name": "remove" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{{ \"I hate it when I accidentally spill my duplication potion accidentally!\" | remove_first: ' accidentally' }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Removes the first instance of a substring inside a string.", - "name": "remove_first" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{{ \"I hate it when I accidentally spill my duplication potion accidentally!\" | remove_last: ' accidentally' }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Removes the last instance of a substring inside a string.", - "name": "remove_last" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/products/health-potion", - "raw_liquid": "{%- assign path = product.url -%}\n\n{{ request.origin | append: path }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Adds a given string to the end of a string.", - "name": "append" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "> Note:\n> The `concat` filter won't filter out duplicates. If you want to remove duplicates, then you need to use the\n> [`uniq` filter](/docs/api/liquid/filters/uniq).", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/collections/all", - "raw_liquid": "{%- assign types_and_vendors = collection.all_types | concat: collection.all_vendors -%}\n\nTypes and vendors:\n\n{% for item in types_and_vendors -%}\n {%- if item != blank -%}\n - {{ item }}\n {%- endif -%}\n{%- endfor %}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "array", - "name": "", - "description": "", - "array_value": "untyped" - } - ], - "summary": "Concatenates (combines) two arrays.", - "name": "concat" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/products/health-potion", - "raw_liquid": "{%- assign origin = request.origin -%}\n\n{{ product.url | prepend: origin }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Adds a given string to the beginning of a string.", - "name": "prepend" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/products/health-potion", - "raw_liquid": "{{ product.description | newline_to_br }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Converts newlines (`\\n`) in a string to HTML line breaks (`<br>`).", - "name": "newline_to_br" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/collections/all", - "raw_liquid": "{%- assign first_product = collection.products | first -%}\n\n{{ first_product.title }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - }, - { - "name": "Dot notation", - "description": "You can use the `first` filter with dot notation when you need to use it inside a tag or object output.\n", - "syntax": "", - "path": "/collections/all", - "raw_liquid": "{{ collection.products.first.title }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "untyped", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Returns the first item in an array.", - "name": "first" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/collections/all", - "raw_liquid": "{%- assign last_product = collection.products | last -%}\n\n{{ last_product.title }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - }, - { - "name": "Dot notation", - "description": "You can use the `last` filter with dot notation when you need to use it inside a tag or object output.\n", - "syntax": "", - "path": "/collections/all", - "raw_liquid": "{{ collection.products.last.title }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "untyped", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Returns the last item in an array.", - "name": "last" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{{ -3 | abs }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "number", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Returns the absolute value of a number.", - "name": "abs" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{{ 2 | plus: 2 }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "number", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Adds two numbers.", - "name": "plus" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{{ 4 | minus: 2 }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "number", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Subtracts a given number from another number.", - "name": "minus" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{{ 2 | times: 2 }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "number", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Multiplies a number by a given number.", - "name": "times" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{{ 4 | divided_by: 2 }}\n\n# divisor is an integer\n{{ 20 | divided_by: 7 }}\n\n# divisor is a float \n{{ 20 | divided_by: 7.0 }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "number", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Divides a number by a given number. The `divided_by` filter produces a result of the same type as the divisor. This means if you divide by an integer, the result will be an integer, and if you divide by a float, the result will be a float.", - "name": "divided_by" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{{ 12 | modulo: 5 }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "number", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Returns the remainder of dividing a number by a given number.", - "name": "modulo" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{{ 2.7 | round }}\n{{ 1.3 | round }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - }, - { - "name": "Round to a specific number of decimal places", - "description": "You can specify a number of decimal places to round to. If you don't specify a number, then the `round` filter rounds to the nearest integer.\n", - "syntax": "", - "path": "/", - "raw_liquid": "{{ 3.14159 | round: 2 }}", - "parameter": true, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "number", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Rounds a number to the nearest integer.", - "name": "round" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{{ 1.2 | ceil }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "number", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Rounds a number up to the nearest integer.", - "name": "ceil" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{{ 1.2 | floor }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "number", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Rounds a number down to the nearest integer.", - "name": "floor" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{{ 4 | at_least: 5 }}\n{{ 4 | at_least: 3 }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "number", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Limits a number to a minimum value.", - "name": "at_least" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{{ 6 | at_most: 5 }}\n{{ 4 | at_most: 5 }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "number", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Limits a number to a maximum value.", - "name": "at_most" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/products/health-potion", - "raw_liquid": "{{ product.selected_variant.url | default: product.url }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - }, - { - "name": "allow_false", - "description": "By default, the `default` filter's value will be used in place of `false` values. You can use the `allow_false` parameter to allow variables to return `false` instead of the default value.\n", - "syntax": "variable | default: variable, allow_false: boolean", - "path": "/products/health-potion", - "raw_liquid": "{%- assign display_price = false -%}\n\n{{ display_price | default: true, allow_false: true }}", - "parameter": true, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "untyped", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Sets a default value for any variable whose value is one of the following:\n\n- [`empty`](/docs/api/liquid/basics#empty)\n- [`false`](/docs/api/liquid/basics#truthy-and-falsy)\n- [`nil`](/docs/api/liquid/basics#nil)", - "name": "default" - }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "", - "examples": [ - { - "name": "", - "description": "", - "syntax": "", - "path": "/", - "raw_liquid": "{% assign fibonacci = '0, 1, 1, 2, 3, 5' | split: ', ' %}\n\n{{ fibonacci | sum }}", - "parameter": false, - "display_type": "text", - "show_data_tab": true - }, - { - "name": "Sum object property values", - "description": "For an array of Liquid objects, you can specify a property to sum.", - "syntax": "array | sum: string", - "path": "/cart", - "raw_liquid": "Total quantity of all items in cart:\n{{ cart.items | sum: 'quantity' }}\n\nSubtotal price for all items in cart:\n{{ cart.items | sum: 'final_line_price' | money }}", - "parameter": true, - "display_type": "text", - "show_data_tab": true - } - ], - "return_type": [ - { - "type": "number", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "Returns the sum of all elements in an array.", - "name": "sum" } ], "summary": "An article, or [blog post](https://help.shopify.com/manual/online-store/blogs/writing-blogs), in a blog.",