From 9a2a2bfd55247884c950c4f52b04e87d67aa83e0 Mon Sep 17 00:00:00 2001 From: harttle Date: Thu, 30 Sep 2021 16:55:43 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20harttle/?= =?UTF-8?q?liquidjs@70fdb7af48fb78575b6f0dc1442b71440d9f8f09=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/classes/cache_lru_.lru.html | 32 +- api/classes/cache_lru_.node.html | 20 +- api/classes/context_context_.context.html | 46 +- api/classes/drop_blank_drop_.blankdrop.html | 24 +- api/classes/drop_block_drop_.blockdrop.html | 20 +- api/classes/drop_drop_.drop.html | 14 +- api/classes/drop_empty_drop_.emptydrop.html | 24 +- .../drop_forloop_drop_.forloopdrop.html | 34 +- api/classes/drop_null_drop_.nulldrop.html | 24 +- ...p_tablerowloop_drop_.tablerowloopdrop.html | 46 +- ...ping_type_emitter_.keepingtypeemitter.html | 201 + ...mitters_simple_emitter_.simpleemitter.html | 206 + ...rs_streamed_emitter_.streamedemitter.html} | 64 +- api/classes/liquid_.liquid.html | 252 +- .../parser_parse_stream_.parsestream.html | 28 +- api/classes/parser_parser_.parser.html | 20 +- api/classes/parser_tokenizer_.tokenizer.html | 94 +- .../render_expression_.expression.html | 16 +- api/classes/render_render_.render.html | 39 +- .../template_filter_filter_.filter.html | 22 +- ...template_filter_filter_map_.filtermap.html | 24 +- api/classes/template_html_.html.html | 22 +- api/classes/template_output_.output.html | 22 +- api/classes/template_tag_hash_.hash.html | 16 +- api/classes/template_tag_tag_.tag.html | 24 +- api/classes/template_tag_tag_map_.tagmap.html | 16 +- .../template_template_impl_.templateimpl.html | 14 +- api/classes/template_value_.value.html | 18 +- ...okens_delimited_token_.delimitedtoken.html | 34 +- .../tokens_filter_token_.filtertoken.html | 32 +- api/classes/tokens_hash_token_.hashtoken.html | 32 +- api/classes/tokens_html_token_.htmltoken.html | 34 +- ...ens_identifier_token_.identifiertoken.html | 32 +- .../tokens_literal_token_.literaltoken.html | 30 +- .../tokens_number_token_.numbertoken.html | 32 +- .../tokens_operator_token_.operatortoken.html | 32 +- .../tokens_output_token_.outputtoken.html | 34 +- ...rty_access_token_.propertyaccesstoken.html | 41 +- .../tokens_quoted_token_.quotedtoken.html | 28 +- .../tokens_range_token_.rangetoken.html | 32 +- api/classes/tokens_tag_token_.tagtoken.html | 38 +- api/classes/tokens_token_.token.html | 28 +- api/classes/util_error_.assertionerror.html | 12 +- ...error_.internalundefinedvariableerror.html | 14 +- api/classes/util_error_.liquiderror.html | 20 +- api/classes/util_error_.parseerror.html | 16 +- api/classes/util_error_.rendererror.html | 18 +- .../util_error_.tokenizationerror.html | 16 +- .../util_error_.undefinedvariableerror.html | 16 +- api/classes/util_strftime_.timezonedate.html | 829 --- api/enums/context_block_mode_.blockmode.html | 14 +- api/enums/parser_token_kind_.tokenkind.html | 36 +- api/globals.html | 10 +- api/interfaces/cache_cache_.cache.html | 14 +- .../context_scope_.plainobject.html | 12 +- .../drop_comparable_.comparable.html | 20 +- api/interfaces/emitters_emitter_.emitter.html | 202 + api/interfaces/fs_fs_.fs.html | 22 +- .../liquid_options_.liquidoptions.html | 62 +- ...liquid_options_.normalizedfulloptions.html | 66 +- .../liquid_options_.normalizedoptions.html | 66 +- api/interfaces/render_emitter_.emitter.html | 205 + .../render_operator_.operators.html | 10 +- ...mplate_filter_filter_impl_.filterimpl.html | 14 +- ...ilter_impl_options_.filterimploptions.html | 12 +- .../template_tag_tag_impl_.tagimpl.html | 20 +- ..._tag_tag_impl_options_.tagimploptions.html | 18 +- .../template_template_.template.html | 18 +- api/interfaces/util_async_.thenable.html | 14 +- api/interfaces/util_operator_trie_.trie.html | 10 +- .../util_strftime_.formatoptions.html | 16 +- api/modules/builtin_filters_array_.html | 34 +- api/modules/builtin_filters_date_.html | 14 +- api/modules/builtin_filters_html_.html | 46 +- api/modules/builtin_filters_index_.html | 10 +- api/modules/builtin_filters_math_.html | 34 +- api/modules/builtin_filters_object_.html | 14 +- api/modules/builtin_filters_string_.html | 42 +- api/modules/builtin_filters_url_.html | 14 +- api/modules/builtin_tags_assign_.html | 10 +- api/modules/builtin_tags_block_.html | 10 +- api/modules/builtin_tags_break_.html | 10 +- api/modules/builtin_tags_capture_.html | 12 +- api/modules/builtin_tags_case_.html | 10 +- api/modules/builtin_tags_comment_.html | 10 +- api/modules/builtin_tags_continue_.html | 10 +- api/modules/builtin_tags_cycle_.html | 10 +- api/modules/builtin_tags_decrement_.html | 10 +- api/modules/builtin_tags_for_.html | 82 +- api/modules/builtin_tags_if_.html | 10 +- api/modules/builtin_tags_include_.html | 10 +- api/modules/builtin_tags_increment_.html | 10 +- api/modules/builtin_tags_index_.html | 58 +- api/modules/builtin_tags_layout_.html | 10 +- api/modules/builtin_tags_raw_.html | 10 +- api/modules/builtin_tags_render_.html | 62 +- api/modules/builtin_tags_tablerow_.html | 10 +- api/modules/builtin_tags_unless_.html | 10 +- api/modules/cache_cache_.html | 10 +- api/modules/cache_lru_.html | 10 +- api/modules/context_block_mode_.html | 10 +- api/modules/context_context_.html | 18 +- api/modules/context_scope_.html | 12 +- api/modules/drop_blank_drop_.html | 10 +- api/modules/drop_block_drop_.html | 10 +- api/modules/drop_comparable_.html | 12 +- api/modules/drop_drop_.html | 10 +- api/modules/drop_empty_drop_.html | 10 +- api/modules/drop_forloop_drop_.html | 10 +- api/modules/drop_null_drop_.html | 10 +- api/modules/drop_tablerowloop_drop_.html | 10 +- api/modules/emitters_emitter_.html | 176 + .../emitters_keeping_type_emitter_.html | 176 + api/modules/emitters_simple_emitter_.html | 176 + api/modules/emitters_streamed_emitter_.html | 176 + api/modules/fs_browser_.html | 22 +- api/modules/fs_fs_.html | 10 +- api/modules/fs_node_.html | 26 +- api/modules/liquid_.html | 10 +- api/modules/liquid_options_.html | 106 +- api/modules/parser_filter_arg_.html | 16 +- api/modules/parser_match_operator_.html | 12 +- api/modules/parser_parse_stream_.html | 12 +- api/modules/parser_parse_string_literal_.html | 34 +- api/modules/parser_parser_.html | 10 +- api/modules/parser_token_kind_.html | 10 +- api/modules/parser_tokenizer_.html | 10 +- api/modules/parser_whitespace_ctrl_.html | 16 +- api/modules/render_boolean_.html | 14 +- api/modules/render_emitter_.html | 10 +- api/modules/render_expression_.html | 26 +- api/modules/render_operator_.html | 32 +- api/modules/render_render_.html | 10 +- api/modules/template_filter_filter_.html | 10 +- api/modules/template_filter_filter_impl_.html | 10 +- .../template_filter_filter_impl_options_.html | 10 +- api/modules/template_filter_filter_map_.html | 10 +- api/modules/template_html_.html | 10 +- api/modules/template_output_.html | 10 +- api/modules/template_tag_hash_.html | 10 +- api/modules/template_tag_tag_.html | 10 +- api/modules/template_tag_tag_impl_.html | 10 +- .../template_tag_tag_impl_options_.html | 10 +- api/modules/template_tag_tag_map_.html | 10 +- api/modules/template_template_.html | 10 +- api/modules/template_template_impl_.html | 10 +- api/modules/template_value_.html | 10 +- api/modules/tokens_delimited_token_.html | 10 +- api/modules/tokens_filter_token_.html | 10 +- api/modules/tokens_hash_token_.html | 10 +- api/modules/tokens_html_token_.html | 10 +- api/modules/tokens_identifier_token_.html | 10 +- api/modules/tokens_literal_token_.html | 10 +- api/modules/tokens_number_token_.html | 10 +- api/modules/tokens_operator_token_.html | 32 +- api/modules/tokens_output_token_.html | 10 +- .../tokens_property_access_token_.html | 10 +- api/modules/tokens_quoted_token_.html | 10 +- api/modules/tokens_range_token_.html | 10 +- api/modules/tokens_tag_token_.html | 10 +- api/modules/tokens_token_.html | 10 +- api/modules/tokens_toplevel_token_.html | 12 +- api/modules/tokens_value_token_.html | 12 +- api/modules/types_.html | 10 +- api/modules/util_assert_.html | 12 +- api/modules/util_async_.html | 26 +- api/modules/util_character_.html | 26 +- api/modules/util_collection_.html | 14 +- api/modules/util_error_.html | 14 +- api/modules/util_literal_.html | 28 +- api/modules/util_operator_trie_.html | 12 +- api/modules/util_strftime_.html | 199 +- api/modules/util_type_guards_.html | 34 +- api/modules/util_underscore_.html | 60 +- filters/abs.html | 22 +- filters/append.html | 18 +- filters/at_least.html | 18 +- filters/at_most.html | 18 +- filters/capitalize.html | 18 +- filters/ceil.html | 26 +- filters/compact.html | 18 +- filters/concat.html | 18 +- filters/date.html | 34 +- filters/default.html | 22 +- filters/divided_by.html | 18 +- filters/downcase.html | 18 +- filters/escape.html | 16 +- filters/escape_once.html | 12 +- filters/first.html | 20 +- filters/floor.html | 26 +- filters/join.html | 14 +- filters/json.html | 14 +- filters/last.html | 20 +- filters/lstrip.html | 14 +- filters/map.html | 14 +- filters/minus.html | 22 +- filters/modulo.html | 22 +- filters/newline_to_br.html | 12 +- filters/overview.html | 12 +- filters/plus.html | 22 +- filters/prepend.html | 18 +- filters/remove.html | 14 +- filters/remove_first.html | 14 +- filters/replace.html | 14 +- filters/replace_first.html | 14 +- filters/reverse.html | 18 +- filters/round.html | 22 +- filters/rstrip.html | 14 +- filters/size.html | 20 +- filters/slice.html | 26 +- filters/sort.html | 16 +- filters/sort_natural.html | 16 +- filters/split.html | 14 +- filters/strip.html | 14 +- filters/strip_html.html | 14 +- filters/strip_newlines.html | 12 +- filters/times.html | 22 +- filters/truncate.html | 22 +- filters/truncatewords.html | 22 +- filters/uniq.html | 15 +- filters/upcase.html | 18 +- filters/url_decode.html | 14 +- filters/url_encode.html | 18 +- filters/where.html | 22 +- index.html | 110 +- playground.html | 6 +- sitemap.xml | 5736 +++++++++-------- tags/assign.html | 18 +- tags/capture.html | 18 +- tags/case.html | 14 +- tags/comment.html | 14 +- tags/cycle.html | 18 +- tags/decrement.html | 14 +- tags/for.html | 69 +- tags/if.html | 18 +- tags/include.html | 18 +- tags/increment.html | 18 +- tags/layout.html | 22 +- tags/overview.html | 14 +- tags/raw.html | 14 +- tags/render.html | 20 +- tags/tablerow.html | 24 +- tags/unless.html | 16 +- tutorials/caching.html | 16 +- tutorials/contribution-guidelines.html | 23 +- tutorials/differences.html | 24 +- tutorials/intro-to-liquid.html | 26 +- tutorials/migrate-to-9.html | 24 +- tutorials/operators.html | 12 +- tutorials/options.html | 37 +- tutorials/partials-and-layouts.html | 18 +- tutorials/plugins.html | 20 +- tutorials/register-filters-tags.html | 24 +- tutorials/render-file.html | 32 +- tutorials/setup.html | 25 +- tutorials/truthy-and-falsy.html | 14 +- tutorials/use-in-expressjs.html | 24 +- tutorials/whitespace-control.html | 26 +- zh-cn/api/classes/cache_lru_.lru.html | 32 +- zh-cn/api/classes/cache_lru_.node.html | 20 +- .../api/classes/context_context_.context.html | 46 +- .../classes/drop_blank_drop_.blankdrop.html | 24 +- .../classes/drop_block_drop_.blockdrop.html | 20 +- zh-cn/api/classes/drop_drop_.drop.html | 14 +- .../classes/drop_empty_drop_.emptydrop.html | 24 +- .../drop_forloop_drop_.forloopdrop.html | 34 +- .../api/classes/drop_null_drop_.nulldrop.html | 24 +- ...p_tablerowloop_drop_.tablerowloopdrop.html | 46 +- ...ping_type_emitter_.keepingtypeemitter.html | 201 + ...mitters_simple_emitter_.simpleemitter.html | 206 + ...rs_streamed_emitter_.streamedemitter.html} | 64 +- zh-cn/api/classes/liquid_.liquid.html | 252 +- .../parser_parse_stream_.parsestream.html | 28 +- zh-cn/api/classes/parser_parser_.parser.html | 20 +- .../classes/parser_tokenizer_.tokenizer.html | 94 +- .../render_expression_.expression.html | 16 +- zh-cn/api/classes/render_render_.render.html | 39 +- .../template_filter_filter_.filter.html | 22 +- ...template_filter_filter_map_.filtermap.html | 24 +- zh-cn/api/classes/template_html_.html.html | 22 +- .../api/classes/template_output_.output.html | 22 +- .../api/classes/template_tag_hash_.hash.html | 16 +- zh-cn/api/classes/template_tag_tag_.tag.html | 24 +- .../classes/template_tag_tag_map_.tagmap.html | 16 +- .../template_template_impl_.templateimpl.html | 14 +- zh-cn/api/classes/template_value_.value.html | 18 +- ...okens_delimited_token_.delimitedtoken.html | 34 +- .../tokens_filter_token_.filtertoken.html | 32 +- .../classes/tokens_hash_token_.hashtoken.html | 32 +- .../classes/tokens_html_token_.htmltoken.html | 34 +- ...ens_identifier_token_.identifiertoken.html | 32 +- .../tokens_literal_token_.literaltoken.html | 30 +- .../tokens_number_token_.numbertoken.html | 32 +- .../tokens_operator_token_.operatortoken.html | 32 +- .../tokens_output_token_.outputtoken.html | 34 +- ...rty_access_token_.propertyaccesstoken.html | 41 +- .../tokens_quoted_token_.quotedtoken.html | 28 +- .../tokens_range_token_.rangetoken.html | 32 +- .../classes/tokens_tag_token_.tagtoken.html | 38 +- zh-cn/api/classes/tokens_token_.token.html | 28 +- .../classes/util_error_.assertionerror.html | 12 +- ...error_.internalundefinedvariableerror.html | 14 +- .../api/classes/util_error_.liquiderror.html | 20 +- zh-cn/api/classes/util_error_.parseerror.html | 16 +- .../api/classes/util_error_.rendererror.html | 18 +- .../util_error_.tokenizationerror.html | 16 +- .../util_error_.undefinedvariableerror.html | 16 +- .../classes/util_strftime_.timezonedate.html | 829 --- .../enums/context_block_mode_.blockmode.html | 14 +- .../enums/parser_token_kind_.tokenkind.html | 36 +- zh-cn/api/globals.html | 10 +- zh-cn/api/interfaces/cache_cache_.cache.html | 14 +- .../context_scope_.plainobject.html | 12 +- .../drop_comparable_.comparable.html | 20 +- .../interfaces/emitters_emitter_.emitter.html | 202 + zh-cn/api/interfaces/fs_fs_.fs.html | 22 +- .../liquid_options_.liquidoptions.html | 62 +- ...liquid_options_.normalizedfulloptions.html | 66 +- .../liquid_options_.normalizedoptions.html | 66 +- .../interfaces/render_emitter_.emitter.html | 205 + .../render_operator_.operators.html | 10 +- ...mplate_filter_filter_impl_.filterimpl.html | 14 +- ...ilter_impl_options_.filterimploptions.html | 12 +- .../template_tag_tag_impl_.tagimpl.html | 20 +- ..._tag_tag_impl_options_.tagimploptions.html | 18 +- .../template_template_.template.html | 18 +- .../api/interfaces/util_async_.thenable.html | 14 +- .../interfaces/util_operator_trie_.trie.html | 10 +- .../util_strftime_.formatoptions.html | 16 +- zh-cn/api/modules/builtin_filters_array_.html | 34 +- zh-cn/api/modules/builtin_filters_date_.html | 14 +- zh-cn/api/modules/builtin_filters_html_.html | 46 +- zh-cn/api/modules/builtin_filters_index_.html | 10 +- zh-cn/api/modules/builtin_filters_math_.html | 34 +- .../api/modules/builtin_filters_object_.html | 14 +- .../api/modules/builtin_filters_string_.html | 42 +- zh-cn/api/modules/builtin_filters_url_.html | 14 +- zh-cn/api/modules/builtin_tags_assign_.html | 10 +- zh-cn/api/modules/builtin_tags_block_.html | 10 +- zh-cn/api/modules/builtin_tags_break_.html | 10 +- zh-cn/api/modules/builtin_tags_capture_.html | 12 +- zh-cn/api/modules/builtin_tags_case_.html | 10 +- zh-cn/api/modules/builtin_tags_comment_.html | 10 +- zh-cn/api/modules/builtin_tags_continue_.html | 10 +- zh-cn/api/modules/builtin_tags_cycle_.html | 10 +- .../api/modules/builtin_tags_decrement_.html | 10 +- zh-cn/api/modules/builtin_tags_for_.html | 82 +- zh-cn/api/modules/builtin_tags_if_.html | 10 +- zh-cn/api/modules/builtin_tags_include_.html | 10 +- .../api/modules/builtin_tags_increment_.html | 10 +- zh-cn/api/modules/builtin_tags_index_.html | 58 +- zh-cn/api/modules/builtin_tags_layout_.html | 10 +- zh-cn/api/modules/builtin_tags_raw_.html | 10 +- zh-cn/api/modules/builtin_tags_render_.html | 62 +- zh-cn/api/modules/builtin_tags_tablerow_.html | 10 +- zh-cn/api/modules/builtin_tags_unless_.html | 10 +- zh-cn/api/modules/cache_cache_.html | 10 +- zh-cn/api/modules/cache_lru_.html | 10 +- zh-cn/api/modules/context_block_mode_.html | 10 +- zh-cn/api/modules/context_context_.html | 18 +- zh-cn/api/modules/context_scope_.html | 12 +- zh-cn/api/modules/drop_blank_drop_.html | 10 +- zh-cn/api/modules/drop_block_drop_.html | 10 +- zh-cn/api/modules/drop_comparable_.html | 12 +- zh-cn/api/modules/drop_drop_.html | 10 +- zh-cn/api/modules/drop_empty_drop_.html | 10 +- zh-cn/api/modules/drop_forloop_drop_.html | 10 +- zh-cn/api/modules/drop_null_drop_.html | 10 +- .../api/modules/drop_tablerowloop_drop_.html | 10 +- zh-cn/api/modules/emitters_emitter_.html | 176 + .../emitters_keeping_type_emitter_.html | 176 + .../api/modules/emitters_simple_emitter_.html | 176 + .../modules/emitters_streamed_emitter_.html | 176 + zh-cn/api/modules/fs_browser_.html | 22 +- zh-cn/api/modules/fs_fs_.html | 10 +- zh-cn/api/modules/fs_node_.html | 26 +- zh-cn/api/modules/liquid_.html | 10 +- zh-cn/api/modules/liquid_options_.html | 106 +- zh-cn/api/modules/parser_filter_arg_.html | 16 +- zh-cn/api/modules/parser_match_operator_.html | 12 +- zh-cn/api/modules/parser_parse_stream_.html | 12 +- .../modules/parser_parse_string_literal_.html | 34 +- zh-cn/api/modules/parser_parser_.html | 10 +- zh-cn/api/modules/parser_token_kind_.html | 10 +- zh-cn/api/modules/parser_tokenizer_.html | 10 +- .../api/modules/parser_whitespace_ctrl_.html | 16 +- zh-cn/api/modules/render_boolean_.html | 14 +- zh-cn/api/modules/render_emitter_.html | 10 +- zh-cn/api/modules/render_expression_.html | 26 +- zh-cn/api/modules/render_operator_.html | 32 +- zh-cn/api/modules/render_render_.html | 10 +- .../api/modules/template_filter_filter_.html | 10 +- .../modules/template_filter_filter_impl_.html | 10 +- .../template_filter_filter_impl_options_.html | 10 +- .../modules/template_filter_filter_map_.html | 10 +- zh-cn/api/modules/template_html_.html | 10 +- zh-cn/api/modules/template_output_.html | 10 +- zh-cn/api/modules/template_tag_hash_.html | 10 +- zh-cn/api/modules/template_tag_tag_.html | 10 +- zh-cn/api/modules/template_tag_tag_impl_.html | 10 +- .../template_tag_tag_impl_options_.html | 10 +- zh-cn/api/modules/template_tag_tag_map_.html | 10 +- zh-cn/api/modules/template_template_.html | 10 +- .../api/modules/template_template_impl_.html | 10 +- zh-cn/api/modules/template_value_.html | 10 +- .../api/modules/tokens_delimited_token_.html | 10 +- zh-cn/api/modules/tokens_filter_token_.html | 10 +- zh-cn/api/modules/tokens_hash_token_.html | 10 +- zh-cn/api/modules/tokens_html_token_.html | 10 +- .../api/modules/tokens_identifier_token_.html | 10 +- zh-cn/api/modules/tokens_literal_token_.html | 10 +- zh-cn/api/modules/tokens_number_token_.html | 10 +- zh-cn/api/modules/tokens_operator_token_.html | 32 +- zh-cn/api/modules/tokens_output_token_.html | 10 +- .../tokens_property_access_token_.html | 10 +- zh-cn/api/modules/tokens_quoted_token_.html | 10 +- zh-cn/api/modules/tokens_range_token_.html | 10 +- zh-cn/api/modules/tokens_tag_token_.html | 10 +- zh-cn/api/modules/tokens_token_.html | 10 +- zh-cn/api/modules/tokens_toplevel_token_.html | 12 +- zh-cn/api/modules/tokens_value_token_.html | 12 +- zh-cn/api/modules/types_.html | 10 +- zh-cn/api/modules/util_assert_.html | 12 +- zh-cn/api/modules/util_async_.html | 26 +- zh-cn/api/modules/util_character_.html | 26 +- zh-cn/api/modules/util_collection_.html | 14 +- zh-cn/api/modules/util_error_.html | 14 +- zh-cn/api/modules/util_literal_.html | 28 +- zh-cn/api/modules/util_operator_trie_.html | 12 +- zh-cn/api/modules/util_strftime_.html | 199 +- zh-cn/api/modules/util_type_guards_.html | 34 +- zh-cn/api/modules/util_underscore_.html | 60 +- zh-cn/filters/abs.html | 22 +- zh-cn/filters/append.html | 18 +- zh-cn/filters/at_least.html | 18 +- zh-cn/filters/at_most.html | 18 +- zh-cn/filters/capitalize.html | 18 +- zh-cn/filters/ceil.html | 26 +- zh-cn/filters/compact.html | 18 +- zh-cn/filters/concat.html | 18 +- zh-cn/filters/date.html | 34 +- zh-cn/filters/default.html | 22 +- zh-cn/filters/divided_by.html | 18 +- zh-cn/filters/downcase.html | 18 +- zh-cn/filters/escape.html | 16 +- zh-cn/filters/escape_once.html | 12 +- zh-cn/filters/first.html | 20 +- zh-cn/filters/floor.html | 26 +- zh-cn/filters/join.html | 14 +- zh-cn/filters/json.html | 14 +- zh-cn/filters/last.html | 20 +- zh-cn/filters/lstrip.html | 14 +- zh-cn/filters/map.html | 14 +- zh-cn/filters/minus.html | 22 +- zh-cn/filters/modulo.html | 22 +- zh-cn/filters/newline_to_br.html | 12 +- zh-cn/filters/overview.html | 12 +- zh-cn/filters/plus.html | 22 +- zh-cn/filters/prepend.html | 18 +- zh-cn/filters/remove.html | 14 +- zh-cn/filters/remove_first.html | 14 +- zh-cn/filters/replace.html | 14 +- zh-cn/filters/replace_first.html | 14 +- zh-cn/filters/reverse.html | 18 +- zh-cn/filters/round.html | 22 +- zh-cn/filters/rstrip.html | 14 +- zh-cn/filters/size.html | 20 +- zh-cn/filters/slice.html | 26 +- zh-cn/filters/sort.html | 16 +- zh-cn/filters/sort_natural.html | 16 +- zh-cn/filters/split.html | 14 +- zh-cn/filters/strip.html | 14 +- zh-cn/filters/strip_html.html | 14 +- zh-cn/filters/strip_newlines.html | 12 +- zh-cn/filters/times.html | 22 +- zh-cn/filters/truncate.html | 24 +- zh-cn/filters/truncatewords.html | 24 +- zh-cn/filters/uniq.html | 15 +- zh-cn/filters/upcase.html | 20 +- zh-cn/filters/url_decode.html | 14 +- zh-cn/filters/url_encode.html | 18 +- zh-cn/filters/where.html | 22 +- zh-cn/index.html | 106 +- zh-cn/playground.html | 6 +- zh-cn/tags/assign.html | 18 +- zh-cn/tags/capture.html | 18 +- zh-cn/tags/case.html | 14 +- zh-cn/tags/comment.html | 14 +- zh-cn/tags/cycle.html | 20 +- zh-cn/tags/decrement.html | 14 +- zh-cn/tags/for.html | 52 +- zh-cn/tags/if.html | 18 +- zh-cn/tags/include.html | 20 +- zh-cn/tags/increment.html | 18 +- zh-cn/tags/layout.html | 24 +- zh-cn/tags/overview.html | 12 +- zh-cn/tags/raw.html | 14 +- zh-cn/tags/render.html | 22 +- zh-cn/tags/tablerow.html | 26 +- zh-cn/tags/unless.html | 16 +- zh-cn/tutorials/caching.html | 18 +- zh-cn/tutorials/contribution-guidelines.html | 23 +- zh-cn/tutorials/differences.html | 24 +- zh-cn/tutorials/intro-to-liquid.html | 26 +- zh-cn/tutorials/migrate-to-9.html | 26 +- zh-cn/tutorials/operators.html | 14 +- zh-cn/tutorials/options.html | 29 +- zh-cn/tutorials/partials-and-layouts.html | 20 +- zh-cn/tutorials/plugins.html | 22 +- zh-cn/tutorials/register-filters-tags.html | 26 +- zh-cn/tutorials/render-file.html | 45 +- zh-cn/tutorials/setup.html | 27 +- zh-cn/tutorials/truthy-and-falsy.html | 16 +- zh-cn/tutorials/use-in-expressjs.html | 26 +- zh-cn/tutorials/whitespace-control.html | 28 +- 515 files changed, 11719 insertions(+), 9833 deletions(-) create mode 100644 api/classes/emitters_keeping_type_emitter_.keepingtypeemitter.html create mode 100644 api/classes/emitters_simple_emitter_.simpleemitter.html rename api/classes/{render_emitter_.emitter.html => emitters_streamed_emitter_.streamedemitter.html} (74%) delete mode 100644 api/classes/util_strftime_.timezonedate.html create mode 100644 api/interfaces/emitters_emitter_.emitter.html create mode 100644 api/interfaces/render_emitter_.emitter.html create mode 100644 api/modules/emitters_emitter_.html create mode 100644 api/modules/emitters_keeping_type_emitter_.html create mode 100644 api/modules/emitters_simple_emitter_.html create mode 100644 api/modules/emitters_streamed_emitter_.html create mode 100644 zh-cn/api/classes/emitters_keeping_type_emitter_.keepingtypeemitter.html create mode 100644 zh-cn/api/classes/emitters_simple_emitter_.simpleemitter.html rename zh-cn/api/classes/{render_emitter_.emitter.html => emitters_streamed_emitter_.streamedemitter.html} (75%) delete mode 100644 zh-cn/api/classes/util_strftime_.timezonedate.html create mode 100644 zh-cn/api/interfaces/emitters_emitter_.emitter.html create mode 100644 zh-cn/api/interfaces/render_emitter_.emitter.html create mode 100644 zh-cn/api/modules/emitters_emitter_.html create mode 100644 zh-cn/api/modules/emitters_keeping_type_emitter_.html create mode 100644 zh-cn/api/modules/emitters_simple_emitter_.html create mode 100644 zh-cn/api/modules/emitters_streamed_emitter_.html diff --git a/api/classes/cache_lru_.lru.html b/api/classes/cache_lru_.lru.html index 99fefec0a..753d5743e 100644 --- a/api/classes/cache_lru_.lru.html +++ b/api/classes/cache_lru_.lru.html @@ -36,8 +36,8 @@ - - + +
@@ -63,7 +63,7 @@
- Github + Github @@ -87,7 +87,7 @@

Class: LRU <T>

-
+
@@ -99,7 +99,7 @@
  • Cache‹T›
  • Constructors

    constructor

    + new LRU(limit: number, size: number): LRU

    -

    Defined in cache/lru.ts:15

    +

    Defined in cache/lru.ts:15

    Parameters:

    @@ -122,33 +122,33 @@

    Returns: LRU

    Properties

    Private cache

    cache: object

    -

    Defined in cache/lru.ts:13

    +

    Defined in cache/lru.ts:13

    Type declaration:


    Private head

    head: Node‹T›

    -

    Defined in cache/lru.ts:14

    +

    Defined in cache/lru.ts:14


    limit

    limit: number

    -

    Defined in cache/lru.ts:18

    +

    Defined in cache/lru.ts:18


    size

    size: number

    -

    Defined in cache/lru.ts:19

    +

    Defined in cache/lru.ts:19


    Private tail

    tail: Node‹T›

    -

    Defined in cache/lru.ts:15

    +

    Defined in cache/lru.ts:15

    Methods

    clear

    clear(): void

    -

    Defined in cache/lru.ts:57

    +

    Defined in cache/lru.ts:57

    Returns: void


    Private ensureLimit

    ensureLimit(): void

    -

    Defined in cache/lru.ts:64

    +

    Defined in cache/lru.ts:64

    Returns: void


    read

    read(key: string): T | undefined

    Implementation of Cache

    -

    Defined in cache/lru.ts:41

    +

    Defined in cache/lru.ts:41

    Parameters:

    @@ -165,7 +165,7 @@

    Returns: T | undefined


    remove

    remove(key: string): void

    -

    Defined in cache/lru.ts:49

    +

    Defined in cache/lru.ts:49

    Parameters:

    @@ -183,7 +183,7 @@

    write

    write(key: string, value: T): void

    Implementation of Cache

    -

    Defined in cache/lru.ts:27

    +

    Defined in cache/lru.ts:27

    Parameters:

    @@ -205,7 +205,7 @@
    - +
    diff --git a/api/classes/cache_lru_.node.html b/api/classes/cache_lru_.node.html index 9b36d120f..6b8d7fbb4 100644 --- a/api/classes/cache_lru_.node.html +++ b/api/classes/cache_lru_.node.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Node <T>

    -
    +
    @@ -96,7 +96,7 @@
  • Node
  • Constructors

    constructor

    + new Node(key: string, value: T, next: Node‹T›, prev: Node‹T›): Node

    -

    Defined in cache/lru.ts:3

    +

    Defined in cache/lru.ts:3

    Parameters:

    @@ -124,20 +124,20 @@

    Returns: Node

    Properties

    key

    key: string

    -

    Defined in cache/lru.ts:5

    +

    Defined in cache/lru.ts:5


    next

    next: Node‹T›

    -

    Defined in cache/lru.ts:7

    +

    Defined in cache/lru.ts:7


    prev

    prev: Node‹T›

    -

    Defined in cache/lru.ts:8

    +

    Defined in cache/lru.ts:8


    value

    value: T

    -

    Defined in cache/lru.ts:6

    +

    Defined in cache/lru.ts:6

    diff --git a/api/classes/context_context_.context.html b/api/classes/context_context_.context.html index a411dadec..0cfba0911 100644 --- a/api/classes/context_context_.context.html +++ b/api/classes/context_context_.context.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Context

    -
    +
    @@ -95,7 +95,7 @@
  • Context
  • Constructors

    constructor

    + new Context(env: object, opts: NormalizedFullOptions, sync: boolean): Context

    -

    Defined in context/context.ts:14

    +

    Defined in context/context.ts:14

    Parameters:

    @@ -123,28 +123,28 @@

    Returns: Context

    Properties

    environments

    environments: Scope

    -

    Defined in context/context.ts:11

    +

    Defined in context/context.ts:11


    globals

    globals: Scope

    -

    Defined in context/context.ts:12

    +

    Defined in context/context.ts:12


    opts

    opts: NormalizedFullOptions

    -

    Defined in context/context.ts:14

    +

    Defined in context/context.ts:14


    Private registers

    registers: object

    -

    Defined in context/context.ts:10

    +

    Defined in context/context.ts:10

    Type declaration:


    Private scopes

    scopes: Scope[] = [{}]

    -

    Defined in context/context.ts:9

    +

    Defined in context/context.ts:9


    sync

    sync: boolean

    -

    Defined in context/context.ts:13

    +

    Defined in context/context.ts:13

    Methods

    bottom

    bottom(): PlainObject | Drop

    -

    Defined in context/context.ts:57

    +

    Defined in context/context.ts:57

    Returns: PlainObject | Drop


    Private findScope

    findScope(key: string): PlainObject | Drop

    -

    Defined in context/context.ts:60

    +

    Defined in context/context.ts:60

    Parameters:

    @@ -161,7 +161,7 @@

    Returns: PlainObject | Drop


    get

    get(paths: string[]): object

    -

    Defined in context/context.ts:37

    +

    Defined in context/context.ts:37

    Parameters:

    @@ -178,11 +178,11 @@

    Returns: object


    getAll

    getAll(): PlainObject | Drop

    -

    Defined in context/context.ts:33

    +

    Defined in context/context.ts:33

    Returns: PlainObject | Drop


    getFromScope

    getFromScope(scope: object, paths: string[] | string): object

    -

    Defined in context/context.ts:41

    +

    Defined in context/context.ts:41

    Parameters:

    @@ -203,7 +203,7 @@

    Returns: object


    getRegister

    getRegister(key: string, defaultValue: object): any

    -

    Defined in context/context.ts:21

    +

    Defined in context/context.ts:21

    Parameters:

    @@ -227,11 +227,11 @@

    Returns: any


    pop

    pop(): undefined | PlainObject | Drop

    -

    Defined in context/context.ts:54

    +

    Defined in context/context.ts:54

    Returns: undefined | PlainObject | Drop


    push

    push(ctx: object): number

    -

    Defined in context/context.ts:51

    +

    Defined in context/context.ts:51

    Parameters:

    @@ -248,7 +248,7 @@

    Returns: number


    restoreRegister

    restoreRegister(keyValues: [string, any][]): void

    -

    Defined in context/context.ts:30

    +

    Defined in context/context.ts:30

    Parameters:

    @@ -265,7 +265,7 @@

    Returns: void


    saveRegister

    saveRegister(…keys: string[]): [string, any][]

    -

    Defined in context/context.ts:27

    +

    Defined in context/context.ts:27

    Parameters:

    @@ -282,7 +282,7 @@

    Returns: [string, any][]


    setRegister

    setRegister(key: string, value: any): any

    -

    Defined in context/context.ts:24

    +

    Defined in context/context.ts:24

    Parameters:

    @@ -304,7 +304,7 @@
    - +
    diff --git a/api/classes/drop_blank_drop_.blankdrop.html b/api/classes/drop_blank_drop_.blankdrop.html index 58ac5951c..9527f5a8c 100644 --- a/api/classes/drop_blank_drop_.blankdrop.html +++ b/api/classes/drop_blank_drop_.blankdrop.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: BlankDrop

    -
    +
    @@ -98,7 +98,7 @@

    Methods

    equals

    equals(value: any): boolean

    Overrides EmptyDrop.equals

    -

    Defined in drop/blank-drop.ts:5

    +

    Defined in drop/blank-drop.ts:5

    Parameters:

    @@ -116,22 +116,22 @@

    geq

    geq(): boolean

    Inherited from EmptyDrop.geq

    -

    Defined in drop/empty-drop.ts:16

    +

    Defined in drop/empty-drop.ts:16

    Returns: boolean


    gt

    gt(): boolean

    Inherited from EmptyDrop.gt

    -

    Defined in drop/empty-drop.ts:13

    +

    Defined in drop/empty-drop.ts:13

    Returns: boolean


    leq

    leq(): boolean

    Inherited from EmptyDrop.leq

    -

    Defined in drop/empty-drop.ts:22

    +

    Defined in drop/empty-drop.ts:22

    Returns: boolean


    liquidMethodMissing

    liquidMethodMissing(key: string): Promise‹string | undefined› | string | undefined

    Inherited from Drop.liquidMethodMissing

    -

    Defined in drop/drop.ts:6

    +

    Defined in drop/drop.ts:6

    Parameters:

    @@ -149,18 +149,18 @@

    lt

    lt(): boolean

    Inherited from EmptyDrop.lt

    -

    Defined in drop/empty-drop.ts:19

    +

    Defined in drop/empty-drop.ts:19

    Returns: boolean


    valueOf

    valueOf(): string

    Inherited from EmptyDrop.valueOf

    Overrides Drop.valueOf

    -

    Defined in drop/empty-drop.ts:25

    +

    Defined in drop/empty-drop.ts:25

    Returns: string

    - +
    diff --git a/api/classes/drop_block_drop_.blockdrop.html b/api/classes/drop_block_drop_.blockdrop.html index 94b6ffdf1..1f4944d8f 100644 --- a/api/classes/drop_block_drop_.blockdrop.html +++ b/api/classes/drop_block_drop_.blockdrop.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: BlockDrop

    -
    +
    @@ -97,17 +97,17 @@

    Constructors

    constructor

    + new BlockDrop(superBlockRender: function): BlockDrop

    -

    Defined in drop/block-drop.ts:3

    +

    Defined in drop/block-drop.ts:3

    Parameters:

    Default value superBlockRender: function= () => ‘’

    ▸ (): Iterable‹string›

    Returns: BlockDrop

    Properties

    Private superBlockRender

    superBlockRender: function

    -

    Defined in drop/block-drop.ts:6

    +

    Defined in drop/block-drop.ts:6

    Type declaration:

    ▸ (): Iterable‹string›

    Methods

    liquidMethodMissing

    liquidMethodMissing(key: string): Promise‹string | undefined› | string | undefined

    Inherited from Drop.liquidMethodMissing

    -

    Defined in drop/drop.ts:6

    +

    Defined in drop/drop.ts:6

    Parameters:

    @@ -124,17 +124,17 @@

    Returns: Promise‹string | undefined› | string | undefined


    super

    super(): Iterable‹string›

    -

    Defined in drop/block-drop.ts:10

    +

    Defined in drop/block-drop.ts:10

    Returns: Iterable‹string›


    valueOf

    valueOf(): any

    Inherited from Drop.valueOf

    -

    Defined in drop/drop.ts:2

    +

    Defined in drop/drop.ts:2

    Returns: any

    - +
    diff --git a/api/classes/drop_drop_.drop.html b/api/classes/drop_drop_.drop.html index f272d5a63..4caa063e9 100644 --- a/api/classes/drop_drop_.drop.html +++ b/api/classes/drop_drop_.drop.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Drop

    -
    +
    @@ -100,7 +100,7 @@

    Methods

    liquidMethodMissing

    liquidMethodMissing(key: string): Promise‹string | undefined› | string | undefined

    -

    Defined in drop/drop.ts:6

    +

    Defined in drop/drop.ts:6

    Parameters:

    @@ -117,12 +117,12 @@

    Returns: Promise‹string | undefined› | string | undefined


    valueOf

    valueOf(): any

    -

    Defined in drop/drop.ts:2

    +

    Defined in drop/drop.ts:2

    Returns: any

    - +
    diff --git a/api/classes/drop_empty_drop_.emptydrop.html b/api/classes/drop_empty_drop_.emptydrop.html index 5a6911cc0..d9f2a69aa 100644 --- a/api/classes/drop_empty_drop_.emptydrop.html +++ b/api/classes/drop_empty_drop_.emptydrop.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: EmptyDrop

    -
    +
    @@ -101,7 +101,7 @@
  • Comparable
  • Methods

    equals

    equals(value: any): boolean

    -

    Defined in drop/empty-drop.ts:6

    +

    Defined in drop/empty-drop.ts:6

    Parameters:

    @@ -118,20 +118,20 @@

    Returns: boolean


    geq

    geq(): boolean

    -

    Defined in drop/empty-drop.ts:16

    +

    Defined in drop/empty-drop.ts:16

    Returns: boolean


    gt

    gt(): boolean

    -

    Defined in drop/empty-drop.ts:13

    +

    Defined in drop/empty-drop.ts:13

    Returns: boolean


    leq

    leq(): boolean

    -

    Defined in drop/empty-drop.ts:22

    +

    Defined in drop/empty-drop.ts:22

    Returns: boolean


    liquidMethodMissing

    liquidMethodMissing(key: string): Promise‹string | undefined› | string | undefined

    Inherited from Drop.liquidMethodMissing

    -

    Defined in drop/drop.ts:6

    +

    Defined in drop/drop.ts:6

    Parameters:

    @@ -148,17 +148,17 @@

    Returns: Promise‹string | undefined› | string | undefined


    lt

    lt(): boolean

    -

    Defined in drop/empty-drop.ts:19

    +

    Defined in drop/empty-drop.ts:19

    Returns: boolean


    valueOf

    valueOf(): string

    Overrides Drop.valueOf

    -

    Defined in drop/empty-drop.ts:25

    +

    Defined in drop/empty-drop.ts:25

    Returns: string

    - +
    diff --git a/api/classes/drop_forloop_drop_.forloopdrop.html b/api/classes/drop_forloop_drop_.forloopdrop.html index bb59fa795..af82e9eb9 100644 --- a/api/classes/drop_forloop_drop_.forloopdrop.html +++ b/api/classes/drop_forloop_drop_.forloopdrop.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: ForloopDrop

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new ForloopDrop(length: number): ForloopDrop

    -

    Defined in drop/forloop-drop.ts:5

    +

    Defined in drop/forloop-drop.ts:5

    Parameters:

    @@ -114,29 +114,29 @@

    Returns: ForloopDrop

    Properties

    Protected i

    i: number = 0

    -

    Defined in drop/forloop-drop.ts:4

    +

    Defined in drop/forloop-drop.ts:4


    length

    length: number

    -

    Defined in drop/forloop-drop.ts:5

    +

    Defined in drop/forloop-drop.ts:5

    Methods

    first

    first(): boolean

    -

    Defined in drop/forloop-drop.ts:19

    +

    Defined in drop/forloop-drop.ts:19

    Returns: boolean


    index

    index(): number

    -

    Defined in drop/forloop-drop.ts:16

    +

    Defined in drop/forloop-drop.ts:16

    Returns: number


    index0

    index0(): number

    -

    Defined in drop/forloop-drop.ts:13

    +

    Defined in drop/forloop-drop.ts:13

    Returns: number


    last

    last(): boolean

    -

    Defined in drop/forloop-drop.ts:22

    +

    Defined in drop/forloop-drop.ts:22

    Returns: boolean


    liquidMethodMissing

    liquidMethodMissing(key: string): Promise‹string | undefined› | string | undefined

    Inherited from Drop.liquidMethodMissing

    -

    Defined in drop/drop.ts:6

    +

    Defined in drop/drop.ts:6

    Parameters:

    @@ -153,25 +153,25 @@

    Returns: Promise‹string | undefined› | string | undefined


    next

    next(): void

    -

    Defined in drop/forloop-drop.ts:10

    +

    Defined in drop/forloop-drop.ts:10

    Returns: void


    rindex

    rindex(): number

    -

    Defined in drop/forloop-drop.ts:25

    +

    Defined in drop/forloop-drop.ts:25

    Returns: number


    rindex0

    rindex0(): number

    -

    Defined in drop/forloop-drop.ts:28

    +

    Defined in drop/forloop-drop.ts:28

    Returns: number


    valueOf

    valueOf(): string

    Overrides Drop.valueOf

    -

    Defined in drop/forloop-drop.ts:31

    +

    Defined in drop/forloop-drop.ts:31

    Returns: string

    - +
    diff --git a/api/classes/drop_null_drop_.nulldrop.html b/api/classes/drop_null_drop_.nulldrop.html index 2be2c8e93..0733dcc32 100644 --- a/api/classes/drop_null_drop_.nulldrop.html +++ b/api/classes/drop_null_drop_.nulldrop.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: NullDrop

    -
    +
    @@ -100,7 +100,7 @@
  • Comparable
  • Methods

    equals

    equals(value: any): boolean

    -

    Defined in drop/null-drop.ts:6

    +

    Defined in drop/null-drop.ts:6

    Parameters:

    @@ -117,20 +117,20 @@

    Returns: boolean


    geq

    geq(): boolean

    -

    Defined in drop/null-drop.ts:12

    +

    Defined in drop/null-drop.ts:12

    Returns: boolean


    gt

    gt(): boolean

    -

    Defined in drop/null-drop.ts:9

    +

    Defined in drop/null-drop.ts:9

    Returns: boolean


    leq

    leq(): boolean

    -

    Defined in drop/null-drop.ts:18

    +

    Defined in drop/null-drop.ts:18

    Returns: boolean


    liquidMethodMissing

    liquidMethodMissing(key: string): Promise‹string | undefined› | string | undefined

    Inherited from Drop.liquidMethodMissing

    -

    Defined in drop/drop.ts:6

    +

    Defined in drop/drop.ts:6

    Parameters:

    @@ -147,17 +147,17 @@

    Returns: Promise‹string | undefined› | string | undefined


    lt

    lt(): boolean

    -

    Defined in drop/null-drop.ts:15

    +

    Defined in drop/null-drop.ts:15

    Returns: boolean


    valueOf

    valueOf(): null

    Overrides Drop.valueOf

    -

    Defined in drop/null-drop.ts:21

    +

    Defined in drop/null-drop.ts:21

    Returns: null

    - +
    diff --git a/api/classes/drop_tablerowloop_drop_.tablerowloopdrop.html b/api/classes/drop_tablerowloop_drop_.tablerowloopdrop.html index bd84f52ab..414e40a00 100644 --- a/api/classes/drop_tablerowloop_drop_.tablerowloopdrop.html +++ b/api/classes/drop_tablerowloop_drop_.tablerowloopdrop.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: TablerowloopDrop

    -
    +
    @@ -95,7 +95,7 @@

    TablerowloopDrop

    Constructors

    constructor

    + new TablerowloopDrop(length: number, cols: number): TablerowloopDrop

    Overrides ForloopDrop.constructor

    -

    Defined in drop/tablerowloop-drop.ts:4

    +

    Defined in drop/tablerowloop-drop.ts:4

    Parameters:

    @@ -115,54 +115,54 @@

    Returns: TablerowloopDrop

    Properties

    Private cols

    cols: number

    -

    Defined in drop/tablerowloop-drop.ts:4

    +

    Defined in drop/tablerowloop-drop.ts:4


    Protected i

    i: number = 0

    Inherited from ForloopDrop.i

    -

    Defined in drop/forloop-drop.ts:4

    +

    Defined in drop/forloop-drop.ts:4


    length

    length: number

    Inherited from ForloopDrop.length

    -

    Defined in drop/forloop-drop.ts:5

    +

    Defined in drop/forloop-drop.ts:5

    Methods

    col

    col(): number

    -

    Defined in drop/tablerowloop-drop.ts:16

    +

    Defined in drop/tablerowloop-drop.ts:16

    Returns: number


    col0

    col0(): number

    -

    Defined in drop/tablerowloop-drop.ts:13

    +

    Defined in drop/tablerowloop-drop.ts:13

    Returns: number


    col_first

    col_first(): boolean

    -

    Defined in drop/tablerowloop-drop.ts:19

    +

    Defined in drop/tablerowloop-drop.ts:19

    Returns: boolean


    col_last

    col_last(): boolean

    -

    Defined in drop/tablerowloop-drop.ts:22

    +

    Defined in drop/tablerowloop-drop.ts:22

    Returns: boolean


    first

    first(): boolean

    Inherited from ForloopDrop.first

    -

    Defined in drop/forloop-drop.ts:19

    +

    Defined in drop/forloop-drop.ts:19

    Returns: boolean


    index

    index(): number

    Inherited from ForloopDrop.index

    -

    Defined in drop/forloop-drop.ts:16

    +

    Defined in drop/forloop-drop.ts:16

    Returns: number


    index0

    index0(): number

    Inherited from ForloopDrop.index0

    -

    Defined in drop/forloop-drop.ts:13

    +

    Defined in drop/forloop-drop.ts:13

    Returns: number


    last

    last(): boolean

    Inherited from ForloopDrop.last

    -

    Defined in drop/forloop-drop.ts:22

    +

    Defined in drop/forloop-drop.ts:22

    Returns: boolean


    liquidMethodMissing

    liquidMethodMissing(key: string): Promise‹string | undefined› | string | undefined

    Inherited from Drop.liquidMethodMissing

    -

    Defined in drop/drop.ts:6

    +

    Defined in drop/drop.ts:6

    Parameters:

    @@ -180,32 +180,32 @@

    next

    next(): void

    Inherited from ForloopDrop.next

    -

    Defined in drop/forloop-drop.ts:10

    +

    Defined in drop/forloop-drop.ts:10

    Returns: void


    rindex

    rindex(): number

    Inherited from ForloopDrop.rindex

    -

    Defined in drop/forloop-drop.ts:25

    +

    Defined in drop/forloop-drop.ts:25

    Returns: number


    rindex0

    rindex0(): number

    Inherited from ForloopDrop.rindex0

    -

    Defined in drop/forloop-drop.ts:28

    +

    Defined in drop/forloop-drop.ts:28

    Returns: number


    row

    row(): number

    -

    Defined in drop/tablerowloop-drop.ts:10

    +

    Defined in drop/tablerowloop-drop.ts:10

    Returns: number


    valueOf

    valueOf(): string

    Inherited from ForloopDrop.valueOf

    Overrides Drop.valueOf

    -

    Defined in drop/forloop-drop.ts:31

    +

    Defined in drop/forloop-drop.ts:31

    Returns: string

    - +
    diff --git a/api/classes/emitters_keeping_type_emitter_.keepingtypeemitter.html b/api/classes/emitters_keeping_type_emitter_.keepingtypeemitter.html new file mode 100644 index 000000000..069ad3af3 --- /dev/null +++ b/api/classes/emitters_keeping_type_emitter_.keepingtypeemitter.html @@ -0,0 +1,201 @@ + + + + + Class: KeepingTypeEmitter | LiquidJS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + +
    NameType
    htmlany
    +

    Returns: void

    + +
    + + + + + + + + + + + + + +
    + + + + + + + + + + + \ No newline at end of file diff --git a/api/classes/emitters_simple_emitter_.simpleemitter.html b/api/classes/emitters_simple_emitter_.simpleemitter.html new file mode 100644 index 000000000..28602ac24 --- /dev/null +++ b/api/classes/emitters_simple_emitter_.simpleemitter.html @@ -0,0 +1,206 @@ + + + + + Class: SimpleEmitter | LiquidJS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    +
    +
    + +
    +
    +
    +
    +
    +

    Class: SimpleEmitter

    + + + +
    +
    +

    Hierarchy

      +
    • SimpleEmitter
    • +
    +

    Implements

    +

    Properties

    html

    html: any = “”

    +

    Defined in emitters/simple-emitter.ts:5

    +

    Methods

    end

    end(): any

    +

    Implementation of Emitter

    +

    Defined in emitters/simple-emitter.ts:11

    +

    Returns: any

    +
    +

    write

    write(html: any): void

    +

    Implementation of Emitter

    +

    Defined in emitters/simple-emitter.ts:7

    +

    Parameters:

    + + + + + + + + + + + +
    NameType
    htmlany
    +

    Returns: void

    + +
    +
    + + +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + + + + + + + + + + \ No newline at end of file diff --git a/api/classes/render_emitter_.emitter.html b/api/classes/emitters_streamed_emitter_.streamedemitter.html similarity index 74% rename from api/classes/render_emitter_.emitter.html rename to api/classes/emitters_streamed_emitter_.streamedemitter.html index f9aac4dea..6fb4b4b01 100644 --- a/api/classes/render_emitter_.emitter.html +++ b/api/classes/emitters_streamed_emitter_.streamedemitter.html @@ -2,19 +2,19 @@ - Class: Emitter | LiquidJS + Class: StreamedEmitter | LiquidJS - + - + - + @@ -36,8 +36,8 @@ - - + +
    @@ -55,7 +55,7 @@ - Github + Github @@ -85,44 +85,26 @@
    -

    Class: Emitter

    +

    Class: StreamedEmitter

    -
    +

    Hierarchy

      -
    • Emitter
    • +
    • StreamedEmitter
    -

    Constructors

    constructor

    + new Emitter(keepOutputType: boolean | undefined): Emitter

    -

    Defined in render/emitter.ts:7

    -

    Parameters:

    - - - - - - - - - - - -
    NameType
    keepOutputTypeboolean | undefined
    -

    Returns: Emitter

    -

    Properties

    break

    break: boolean = false

    -

    Defined in render/emitter.ts:5

    +

    Properties

    html

    html: any = “”

    +

    Defined in emitters/streamed-emitter.ts:4


    -

    continue

    continue: boolean = false

    -

    Defined in render/emitter.ts:6

    +

    stream

    stream: any = new (require(‘stream’).PassThrough)()

    +

    Defined in emitters/streamed-emitter.ts:5

    +

    Methods

    end

    end(): void

    +

    Defined in emitters/streamed-emitter.ts:9

    +

    Returns: void


    -

    html

    html: any = “”

    -

    Defined in render/emitter.ts:4

    -
    -

    Private Optional keepOutputType

    keepOutputType? : undefined | false | true = false

    -

    Defined in render/emitter.ts:7

    -

    Methods

    write

    write(html: any): void

    -

    Defined in render/emitter.ts:13

    +

    write

    write(html: any): void

    +

    Defined in emitters/streamed-emitter.ts:6

    Parameters:

    @@ -140,7 +122,7 @@
    - +
    @@ -149,7 +131,7 @@
    Contents -
    1. Hierarchy
    2. Constructors
      1. constructor
    3. Properties
      1. break
      2. continue
      3. html
      4. Private Optional keepOutputType
    4. Methods
      1. write
    +
    1. Hierarchy
    2. Properties
      1. html
      2. stream
    3. Methods
      1. end
      2. write
    Back to Top
    @@ -193,7 +175,7 @@
    English - diff --git a/api/classes/liquid_.liquid.html b/api/classes/liquid_.liquid.html index 3700e0d2f..6d3328d31 100644 --- a/api/classes/liquid_.liquid.html +++ b/api/classes/liquid_.liquid.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Liquid

    -
    +
    @@ -95,7 +95,7 @@
  • Liquid
  • Constructors

    constructor

    + new Liquid(opts: LiquidOptions): Liquid

    -

    Defined in liquid.ts:26

    +

    Defined in liquid.ts:26

    Parameters:

    @@ -113,21 +113,42 @@

    Returns: Liquid

    Properties

    filters

    filters: FilterMap

    -

    Defined in liquid.ts:25

    +

    Defined in liquid.ts:24


    options

    options: NormalizedFullOptions

    -

    Defined in liquid.ts:22

    +

    Defined in liquid.ts:21

    +
    +

    parseFileImpl

    parseFileImpl: function

    +

    Defined in liquid.ts:26

    +

    Type declaration:

    ▸ (file: string, sync?: undefined | false | true): Iterator‹Template[]›

    +

    Parameters:

    + + + + + + + + + + + + + + + +
    NameType
    filestring
    sync?undefined | false | true

    parser

    parser: Parser

    -

    Defined in liquid.ts:24

    +

    Defined in liquid.ts:23


    renderer

    renderer: Render

    -

    Defined in liquid.ts:23

    +

    Defined in liquid.ts:22


    tags

    tags: TagMap

    -

    Defined in liquid.ts:26

    +

    Defined in liquid.ts:25

    Methods

    _evalValue

    _evalValue(str: string, ctx: Context): IterableIterator‹any›

    -

    Defined in liquid.ts:104

    +

    Defined in liquid.ts:105

    Parameters:

    @@ -147,8 +168,8 @@

    Returns: IterableIterator‹any›


    -

    _parseAndRender

    _parseAndRender(html: string, scope?: undefined | object, opts?: LiquidOptions, sync?: undefined | false | true): IterableIterator‹any›

    -

    Defined in liquid.ts:57

    +

    _parseAndRender

    _parseAndRender(html: string, scope?: undefined | object, sync?: undefined | false | true): IterableIterator‹any›

    +

    Defined in liquid.ts:60

    Parameters:

    @@ -166,18 +187,14 @@ - - - -
    undefined | object
    opts?LiquidOptions
    sync? undefined | false | true

    Returns: IterableIterator‹any›


    -

    _parseFile

    _parseFile(file: string, opts?: LiquidOptions, sync?: undefined | false | true): IterableIterator‹any›

    -

    Defined in liquid.ts:68

    +

    Private _parseFile

    _parseFile(file: string, sync?: undefined | false | true): IterableIterator‹Promise‹boolean› | Promise‹string› | Template[]›

    +

    Defined in liquid.ts:80

    Parameters:

    @@ -191,8 +208,25 @@ - - + + + +
    string
    opts?LiquidOptionssync?undefined | false | true
    +

    Returns: IterableIterator‹Promise‹boolean› | Promise‹string› | Template[]›

    +
    +

    Private _parseFileCached

    _parseFileCached(file: string, sync?: undefined | false | true): IterableIterator‹any›

    +

    Defined in liquid.ts:71

    +

    Parameters:

    + + + + + + + + + + @@ -201,8 +235,8 @@
    NameType
    filestring
    sync?

    Returns: IterableIterator‹any›


    -

    _render

    _render(tpl: Template[], scope?: undefined | object, opts?: LiquidOptions, sync?: undefined | false | true): IterableIterator‹any›

    -

    Defined in liquid.ts:44

    +

    _render

    _render(tpl: Template[], scope?: undefined | object, sync?: undefined | false | true): IterableIterator‹any›

    +

    Defined in liquid.ts:45

    Parameters:

    @@ -220,10 +254,6 @@ - - - - @@ -231,7 +261,7 @@

    Returns: IterableIterator‹any›


    evalValue

    evalValue(str: string, ctx: Context): Promise‹any›

    -

    Defined in liquid.ts:108

    +

    Defined in liquid.ts:109

    Parameters:

    undefined | object
    opts?LiquidOptions
    sync? undefined | false | true
    @@ -252,7 +282,7 @@

    Returns: Promise‹any›


    evalValueSync

    evalValueSync(str: string, ctx: Context): any

    -

    Defined in liquid.ts:111

    +

    Defined in liquid.ts:112

    Parameters:

    @@ -273,53 +303,11 @@

    Returns: any


    express

    express(): (Anonymous function)

    -

    Defined in liquid.ts:124

    +

    Defined in liquid.ts:125

    Returns: (Anonymous function)


    -

    getTemplate

    getTemplate(file: string, opts?: LiquidOptions): Promise‹Template[]›

    -

    Defined in liquid.ts:142

    -

    Parameters:

    -
    - - - - - - - - - - - - - - -
    NameType
    filestring
    opts?LiquidOptions
    -

    Returns: Promise‹Template[]›

    -
    -

    getTemplateSync

    getTemplateSync(file: string, opts?: LiquidOptions): Template[]

    -

    Defined in liquid.ts:148

    -

    Parameters:

    - - - - - - - - - - - - - - - -
    NameType
    filestring
    opts?LiquidOptions
    -

    Returns: Template[]

    -

    Private lookupError

    lookupError(file: string, roots: string[]): any

    -

    Defined in liquid.ts:132

    +

    Defined in liquid.ts:149

    Parameters:

    @@ -339,8 +327,29 @@

    Returns: any


    +

    Private lookupFiles

    lookupFiles(file: string, options: NormalizedFullOptions): IterableIterator‹string›

    +

    Defined in liquid.ts:138

    +

    Parameters:

    + + + + + + + + + + + + + + + +
    NameType
    filestring
    optionsNormalizedFullOptions
    +

    Returns: IterableIterator‹string›

    +

    parse

    parse(html: string, filepath?: undefined | string): Template[]

    -

    Defined in liquid.ts:38

    +

    Defined in liquid.ts:39

    Parameters:

    @@ -360,8 +369,8 @@

    Returns: Template[]


    -

    parseAndRender

    parseAndRender(html: string, scope?: undefined | object, opts?: LiquidOptions): Promise‹any›

    -

    Defined in liquid.ts:61

    +

    parseAndRender

    parseAndRender(html: string, scope?: undefined | object): Promise‹any›

    +

    Defined in liquid.ts:64

    Parameters:

    @@ -378,15 +387,11 @@ - - - -
    scope? undefined | object
    opts?LiquidOptions

    Returns: Promise‹any›


    -

    parseAndRenderSync

    parseAndRenderSync(html: string, scope?: undefined | object, opts?: LiquidOptions): any

    -

    Defined in liquid.ts:64

    +

    parseAndRenderSync

    parseAndRenderSync(html: string, scope?: undefined | object): any

    +

    Defined in liquid.ts:67

    Parameters:

    @@ -403,15 +408,11 @@ - - - -
    scope? undefined | object
    opts?LiquidOptions

    Returns: any


    -

    parseFile

    parseFile(file: string, opts?: LiquidOptions): Promise‹Template[]›

    -

    Defined in liquid.ts:89

    +

    parseFile

    parseFile(file: string): Promise‹Template[]›

    +

    Defined in liquid.ts:90

    Parameters:

    @@ -424,15 +425,11 @@ - - - -
    file string
    opts?LiquidOptions

    Returns: Promise‹Template[]›


    -

    parseFileSync

    parseFileSync(file: string, opts?: LiquidOptions): Template[]

    -

    Defined in liquid.ts:92

    +

    parseFileSync

    parseFileSync(file: string): Template[]

    +

    Defined in liquid.ts:93

    Parameters:

    @@ -445,15 +442,11 @@ - - - -
    file string
    opts?LiquidOptions

    Returns: Template[]


    plugin

    plugin(plugin: function): void

    -

    Defined in liquid.ts:121

    +

    Defined in liquid.ts:122

    Parameters:

    plugin: function

    ▸ (this: Liquid, L: Liquid): void

    @@ -477,7 +470,7 @@

    Returns: void


    registerFilter

    registerFilter(name: string, filter: FilterImplOptions): void

    -

    Defined in liquid.ts:115

    +

    Defined in liquid.ts:116

    Parameters:

    @@ -498,7 +491,7 @@

    Returns: void


    registerTag

    registerTag(name: string, tag: TagImplOptions): void

    -

    Defined in liquid.ts:118

    +

    Defined in liquid.ts:119

    Parameters:

    @@ -518,8 +511,8 @@

    Returns: void


    -

    render

    render(tpl: Template[], scope?: undefined | object, opts?: LiquidOptions): Promise‹any›

    -

    Defined in liquid.ts:50

    +

    render

    render(tpl: Template[], scope?: undefined | object): Promise‹any›

    +

    Defined in liquid.ts:49

    Parameters:

    @@ -536,15 +529,11 @@ - - - -
    scope? undefined | object
    opts?LiquidOptions

    Returns: Promise‹any›


    -

    renderFile

    renderFile(file: string, ctx?: undefined | object, opts?: LiquidOptions): Promise‹any›

    -

    Defined in liquid.ts:95

    +

    renderFile

    renderFile(file: string, ctx?: undefined | object): Promise‹any›

    +

    Defined in liquid.ts:96

    Parameters:

    @@ -561,15 +550,11 @@ - - - -
    ctx? undefined | object
    opts?LiquidOptions

    Returns: Promise‹any›


    -

    renderFileSync

    renderFileSync(file: string, ctx?: undefined | object, opts?: LiquidOptions): any

    -

    Defined in liquid.ts:99

    +

    renderFileSync

    renderFileSync(file: string, ctx?: undefined | object): any

    +

    Defined in liquid.ts:100

    Parameters:

    @@ -586,15 +571,11 @@ - - - -
    ctx? undefined | object
    opts?LiquidOptions

    Returns: any


    -

    renderSync

    renderSync(tpl: Template[], scope?: undefined | object, opts?: LiquidOptions): any

    -

    Defined in liquid.ts:53

    +

    renderSync

    renderSync(tpl: Template[], scope?: undefined | object): any

    +

    Defined in liquid.ts:52

    Parameters:

    @@ -611,16 +592,33 @@ - - - -
    scope? undefined | object
    opts?LiquidOptions

    Returns: any

    +
    +

    renderToNodeStream

    renderToNodeStream(tpl: Template[], scope?: undefined | object): ReadableStream

    +

    Defined in liquid.ts:55

    +

    Parameters:

    + + + + + + + + + + + + + + + +
    NameType
    tplTemplate[]
    scope?undefined | object
    +

    Returns: ReadableStream

    - +
    @@ -629,7 +627,7 @@
    Contents -
    1. Hierarchy
    2. Constructors
      1. constructor
    3. Properties
      1. filters
      2. options
      3. parser
      4. renderer
      5. tags
    4. Methods
      1. _evalValue
      2. _parseAndRender
      3. _parseFile
      4. _render
      5. evalValue
      6. evalValueSync
      7. express
      8. getTemplate
      9. getTemplateSync
      10. Private lookupError
      11. parse
      12. parseAndRender
      13. parseAndRenderSync
      14. parseFile
      15. parseFileSync
      16. plugin
      17. registerFilter
      18. registerTag
      19. render
      20. renderFile
      21. renderFileSync
      22. renderSync
    +
    1. Hierarchy
    2. Constructors
      1. constructor
    3. Properties
      1. filters
      2. options
      3. parseFileImpl
        1. Type declaration:
      4. parser
      5. renderer
      6. tags
    4. Methods
      1. _evalValue
      2. _parseAndRender
      3. Private _parseFile
      4. Private _parseFileCached
      5. _render
      6. evalValue
      7. evalValueSync
      8. express
      9. Private lookupError
      10. Private lookupFiles
      11. parse
      12. parseAndRender
      13. parseAndRenderSync
      14. parseFile
      15. parseFileSync
      16. plugin
      17. registerFilter
      18. registerTag
      19. render
      20. renderFile
      21. renderFileSync
      22. renderSync
      23. renderToNodeStream
    Back to Top
    diff --git a/api/classes/parser_parse_stream_.parsestream.html b/api/classes/parser_parse_stream_.parsestream.html index 236449341..699b41340 100644 --- a/api/classes/parser_parse_stream_.parsestream.html +++ b/api/classes/parser_parse_stream_.parsestream.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: ParseStream <T>

    -
    +
    @@ -96,7 +96,7 @@
  • ParseStream
  • Constructors

    constructor

    + new ParseStream(tokens: T[], parseToken: ParseToken‹T›): ParseStream

    -

    Defined in parser/parse-stream.ts:12

    +

    Defined in parser/parse-stream.ts:12

    Parameters:

    @@ -116,7 +116,7 @@

    Returns: ParseStream

    Properties

    Private handlers

    handlers: object

    -

    Defined in parser/parse-stream.ts:10

    +

    Defined in parser/parse-stream.ts:10

    Type declaration:

    • [ key: string]: function
    @@ -136,15 +136,15 @@

    Private parseToken

    parseToken: ParseToken‹T›

    -

    Defined in parser/parse-stream.ts:12

    +

    Defined in parser/parse-stream.ts:12


    Private stopRequested

    stopRequested: boolean = false

    -

    Defined in parser/parse-stream.ts:11

    +

    Defined in parser/parse-stream.ts:11


    Private tokens

    tokens: T[]

    -

    Defined in parser/parse-stream.ts:9

    +

    Defined in parser/parse-stream.ts:9

    Methods

    on

    on<T2>(name: string, cb: function): ParseStream‹T›

    -

    Defined in parser/parse-stream.ts:18

    +

    Defined in parser/parse-stream.ts:18

    Type parameters:

    T2: Template | T | undefined

    Parameters:

    @@ -167,15 +167,15 @@

    Returns: ParseStream‹T›


    start

    start(): this

    -

    Defined in parser/parse-stream.ts:26

    +

    Defined in parser/parse-stream.ts:26

    Returns: this


    stop

    stop(): this

    -

    Defined in parser/parse-stream.ts:40

    +

    Defined in parser/parse-stream.ts:40

    Returns: this


    Private trigger

    trigger<T>(event: string, arg?: T): boolean

    -

    Defined in parser/parse-stream.ts:22

    +

    Defined in parser/parse-stream.ts:22

    Type parameters:

    T: Token | Template

    Parameters:

    @@ -199,7 +199,7 @@
    - +
    diff --git a/api/classes/parser_parser_.parser.html b/api/classes/parser_parser_.parser.html index 70907fc73..1ddca5b48 100644 --- a/api/classes/parser_parser_.parser.html +++ b/api/classes/parser_parser_.parser.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Parser

    -
    +
    @@ -95,7 +95,7 @@
  • Parser
  • Constructors

    constructor

    + new Parser(liquid: Liquid): Parser

    -

    Defined in parser/parser.ts:13

    +

    Defined in parser/parser.ts:13

    Parameters:

    @@ -111,9 +111,9 @@

    Returns: Parser

    Properties

    Private liquid

    liquid: Liquid

    -

    Defined in parser/parser.ts:13

    +

    Defined in parser/parser.ts:13

    Methods

    parse

    parse(tokens: TopLevelToken[]): Template[]

    -

    Defined in parser/parser.ts:18

    +

    Defined in parser/parser.ts:18

    Parameters:

    @@ -130,7 +130,7 @@

    Returns: Template[]


    parseStream

    parseStream(tokens: TopLevelToken[]): ParseStreamTagToken | HTMLToken | OutputToken

    -

    Defined in parser/parser.ts:39

    +

    Defined in parser/parser.ts:39

    Parameters:

    @@ -147,7 +147,7 @@

    Returns: ParseStreamTagToken | HTMLToken | OutputToken


    parseToken

    parseToken(token: TopLevelToken, remainTokens: TopLevelToken[]): Tag | Output | HTML

    -

    Defined in parser/parser.ts:26

    +

    Defined in parser/parser.ts:26

    Parameters:

    @@ -169,7 +169,7 @@
    - +
    diff --git a/api/classes/parser_tokenizer_.tokenizer.html b/api/classes/parser_tokenizer_.tokenizer.html index 372544841..61dc0bd3c 100644 --- a/api/classes/parser_tokenizer_.tokenizer.html +++ b/api/classes/parser_tokenizer_.tokenizer.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Tokenizer

    -
    +
    @@ -95,7 +95,7 @@
  • Tokenizer
  • Constructors

    constructor

    + new Tokenizer(input: string, trie: Trie, file: string): Tokenizer

    -

    Defined in parser/tokenizer.ts:31

    +

    Defined in parser/tokenizer.ts:31

    Parameters:

    @@ -123,24 +123,24 @@

    Returns: Tokenizer

    Properties

    N

    N: number

    -

    Defined in parser/tokenizer.ts:30

    +

    Defined in parser/tokenizer.ts:30


    Private file

    file: string

    -

    Defined in parser/tokenizer.ts:36

    +

    Defined in parser/tokenizer.ts:36


    -

    Private input

    input: string

    -

    Defined in parser/tokenizer.ts:34

    +

    input

    input: string

    +

    Defined in parser/tokenizer.ts:34


    p

    p: number = 0

    -

    Defined in parser/tokenizer.ts:29

    +

    Defined in parser/tokenizer.ts:29


    Private rawBeginAt

    rawBeginAt: number = -1

    -

    Defined in parser/tokenizer.ts:31

    +

    Defined in parser/tokenizer.ts:31


    Private trie

    trie: Trie

    -

    Defined in parser/tokenizer.ts:35

    +

    Defined in parser/tokenizer.ts:35

    Methods

    advance

    advance(i: number): void

    -

    Defined in parser/tokenizer.ts:248

    +

    Defined in parser/tokenizer.ts:248

    Parameters:

    @@ -159,11 +159,11 @@

    Returns: void


    end

    end(): boolean

    -

    Defined in parser/tokenizer.ts:252

    +

    Defined in parser/tokenizer.ts:252

    Returns: boolean


    match

    match(word: string): boolean

    -

    Defined in parser/tokenizer.ts:343

    +

    Defined in parser/tokenizer.ts:343

    Parameters:

    @@ -180,7 +180,7 @@

    Returns: boolean


    mkError

    mkError(msg: string, begin: number): TokenizationError

    -

    Defined in parser/tokenizer.ts:196

    +

    Defined in parser/tokenizer.ts:196

    Parameters:

    @@ -201,7 +201,7 @@

    Returns: TokenizationError


    peek

    peek(n: number): string

    -

    Defined in parser/tokenizer.ts:361

    +

    Defined in parser/tokenizer.ts:361

    Parameters:

    @@ -220,7 +220,7 @@

    Returns: string


    peekType

    peekType(n: number): number

    -

    Defined in parser/tokenizer.ts:357

    +

    Defined in parser/tokenizer.ts:357

    Parameters:

    @@ -239,7 +239,7 @@

    Returns: number


    readEndrawOrRawContent

    readEndrawOrRawContent(options: NormalizedFullOptions): HTMLToken | TagToken

    -

    Defined in parser/tokenizer.ts:169

    +

    Defined in parser/tokenizer.ts:169

    Parameters:

    @@ -256,31 +256,31 @@

    Returns: HTMLToken | TagToken


    readExpression

    readExpression(): Expression

    -

    Defined in parser/tokenizer.ts:41

    +

    Defined in parser/tokenizer.ts:41

    Returns: Expression


    readExpressionTokens

    readExpressionTokens(): IterableIterator‹Token

    -

    Defined in parser/tokenizer.ts:45

    +

    Defined in parser/tokenizer.ts:45

    Returns: IterableIterator‹Token


    readFileName

    readFileName(): IdentifierToken

    -

    Defined in parser/tokenizer.ts:337

    +

    Defined in parser/tokenizer.ts:337

    Returns: IdentifierToken


    readFilter

    readFilter(): FilterToken | null

    -

    Defined in parser/tokenizer.ts:76

    +

    Defined in parser/tokenizer.ts:76

    Returns: FilterToken | null


    readFilterArg

    readFilterArg(): FilterArg | undefined

    -

    Defined in parser/tokenizer.ts:97

    +

    Defined in parser/tokenizer.ts:97

    Returns: FilterArg | undefined


    readFilters

    readFilters(): FilterToken[]

    -

    Defined in parser/tokenizer.ts:68

    +

    Defined in parser/tokenizer.ts:68

    Returns: FilterToken[]


    readHTMLToken

    readHTMLToken(options: NormalizedFullOptions): HTMLToken

    -

    Defined in parser/tokenizer.ts:125

    +

    Defined in parser/tokenizer.ts:125

    Parameters:

    @@ -297,23 +297,23 @@

    Returns: HTMLToken


    readHash

    readHash(): HashToken | undefined

    -

    Defined in parser/tokenizer.ts:228

    +

    Defined in parser/tokenizer.ts:228

    Returns: HashToken | undefined


    readHashes

    readHashes(): HashToken[]

    -

    Defined in parser/tokenizer.ts:219

    +

    Defined in parser/tokenizer.ts:219

    Returns: HashToken[]


    readIdentifier

    readIdentifier(): IdentifierToken

    -

    Defined in parser/tokenizer.ts:212

    +

    Defined in parser/tokenizer.ts:212

    Returns: IdentifierToken


    readOperator

    readOperator(): OperatorToken | undefined

    -

    Defined in parser/tokenizer.ts:62

    +

    Defined in parser/tokenizer.ts:62

    Returns: OperatorToken | undefined


    readOutputToken

    readOutputToken(options: NormalizedFullOptions): OutputToken

    -

    Defined in parser/tokenizer.ts:159

    +

    Defined in parser/tokenizer.ts:159

    Parameters:

    @@ -332,15 +332,15 @@

    Returns: OutputToken


    readQuoted

    readQuoted(): QuotedToken | undefined

    -

    Defined in parser/tokenizer.ts:322

    +

    Defined in parser/tokenizer.ts:322

    Returns: QuotedToken | undefined


    readRange

    readRange(): RangeToken | undefined

    -

    Defined in parser/tokenizer.ts:304

    +

    Defined in parser/tokenizer.ts:304

    Returns: RangeToken | undefined


    readTagToken

    readTagToken(options: NormalizedFullOptions): TagToken

    -

    Defined in parser/tokenizer.ts:136

    +

    Defined in parser/tokenizer.ts:136

    Parameters:

    @@ -359,7 +359,7 @@

    Returns: TagToken


    readTo

    readTo(end: string): number

    -

    Defined in parser/tokenizer.ts:256

    +

    Defined in parser/tokenizer.ts:256

    Parameters:

    @@ -376,7 +376,7 @@

    Returns: number


    readToDelimiter

    readToDelimiter(delimiter: string): number

    -

    Defined in parser/tokenizer.ts:147

    +

    Defined in parser/tokenizer.ts:147

    Parameters:

    @@ -393,7 +393,7 @@

    Returns: number


    readTopLevelToken

    readTopLevelToken(options: NormalizedFullOptions): TopLevelToken

    -

    Defined in parser/tokenizer.ts:117

    +

    Defined in parser/tokenizer.ts:117

    Parameters:

    @@ -410,7 +410,7 @@

    Returns: TopLevelToken


    readTopLevelTokens

    readTopLevelTokens(options: NormalizedFullOptions): TopLevelToken[]

    -

    Defined in parser/tokenizer.ts:107

    +

    Defined in parser/tokenizer.ts:107

    Parameters:

    @@ -429,23 +429,23 @@

    Returns: TopLevelToken[]


    readValue

    readValue(): ValueToken | undefined

    -

    Defined in parser/tokenizer.ts:264

    +

    Defined in parser/tokenizer.ts:264

    Returns: ValueToken | undefined


    readValueOrThrow

    readValueOrThrow(): ValueToken

    -

    Defined in parser/tokenizer.ts:316

    +

    Defined in parser/tokenizer.ts:316

    Returns: ValueToken


    readWord

    readWord(): IdentifierToken

    -

    Defined in parser/tokenizer.ts:207

    +

    Defined in parser/tokenizer.ts:207

    Returns: IdentifierToken


    remaining

    remaining(): string

    -

    Defined in parser/tokenizer.ts:244

    +

    Defined in parser/tokenizer.ts:244

    Returns: string


    rmatch

    rmatch(pattern: string): boolean

    -

    Defined in parser/tokenizer.ts:350

    +

    Defined in parser/tokenizer.ts:350

    Parameters:

    @@ -462,11 +462,11 @@

    Returns: boolean


    skipBlank

    skipBlank(): void

    -

    Defined in parser/tokenizer.ts:365

    +

    Defined in parser/tokenizer.ts:365

    Returns: void


    snapshot

    snapshot(begin: number): string

    -

    Defined in parser/tokenizer.ts:200

    +

    Defined in parser/tokenizer.ts:200

    Parameters:

    @@ -486,7 +486,7 @@
    - +
    @@ -495,7 +495,7 @@
    Contents -
    1. Hierarchy
    2. Constructors
      1. constructor
    3. Properties
      1. N
      2. Private file
      3. Private input
      4. p
      5. Private rawBeginAt
      6. Private trie
    4. Methods
      1. advance
      2. end
      3. match
      4. mkError
      5. peek
      6. peekType
      7. readEndrawOrRawContent
      8. readExpression
      9. readExpressionTokens
      10. readFileName
      11. readFilter
      12. readFilterArg
      13. readFilters
      14. readHTMLToken
      15. readHash
      16. readHashes
      17. readIdentifier
      18. readOperator
      19. readOutputToken
      20. readQuoted
      21. readRange
      22. readTagToken
      23. readTo
      24. readToDelimiter
      25. readTopLevelToken
      26. readTopLevelTokens
      27. readValue
      28. readValueOrThrow
      29. readWord
      30. remaining
      31. rmatch
      32. skipBlank
      33. snapshot
    +
    1. Hierarchy
    2. Constructors
      1. constructor
    3. Properties
      1. N
      2. Private file
      3. input
      4. p
      5. Private rawBeginAt
      6. Private trie
    4. Methods
      1. advance
      2. end
      3. match
      4. mkError
      5. peek
      6. peekType
      7. readEndrawOrRawContent
      8. readExpression
      9. readExpressionTokens
      10. readFileName
      11. readFilter
      12. readFilterArg
      13. readFilters
      14. readHTMLToken
      15. readHash
      16. readHashes
      17. readIdentifier
      18. readOperator
      19. readOutputToken
      20. readQuoted
      21. readRange
      22. readTagToken
      23. readTo
      24. readToDelimiter
      25. readTopLevelToken
      26. readTopLevelTokens
      27. readValue
      28. readValueOrThrow
      29. readWord
      30. remaining
      31. rmatch
      32. skipBlank
      33. snapshot
    Back to Top
    diff --git a/api/classes/render_expression_.expression.html b/api/classes/render_expression_.expression.html index f5eef8106..ae7e08bc5 100644 --- a/api/classes/render_expression_.expression.html +++ b/api/classes/render_expression_.expression.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Expression

    -
    +
    @@ -95,7 +95,7 @@
  • Expression
  • Constructors

    constructor

    + new Expression(tokens: IterableIterator‹Token›): Expression

    -

    Defined in render/expression.ts:18

    +

    Defined in render/expression.ts:18

    Parameters:

    @@ -111,9 +111,9 @@

    Returns: Expression

    Properties

    Private postfix

    postfix: Token[]

    -

    Defined in render/expression.ts:18

    +

    Defined in render/expression.ts:18

    Methods

    evaluate

    evaluate(ctx: Context, lenient: boolean): any

    -

    Defined in render/expression.ts:23

    +

    Defined in render/expression.ts:23

    Parameters:

    @@ -135,7 +135,7 @@
    - +
    diff --git a/api/classes/render_render_.render.html b/api/classes/render_render_.render.html index e44162fe1..6651d7301 100644 --- a/api/classes/render_render_.render.html +++ b/api/classes/render_render_.render.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,15 +87,15 @@

    Class: Render

    -
    +

    Hierarchy

    • Render
    -

    Methods

    renderTemplates

    renderTemplates(templates: Template[], ctx: Context, emitter?: Emitter): IterableIterator‹any›

    -

    Defined in render/render.ts:7

    +

    Methods

    renderTemplates

    renderTemplates(templates: Template[], ctx: Context, emitter?: Emitter): IterableIterator‹any›

    +

    Defined in render/render.ts:16

    Parameters:

    @@ -114,14 +114,35 @@ - +
    emitter?EmitterEmitter

    Returns: IterableIterator‹any›

    +
    +

    renderTemplatesToNodeStream

    renderTemplatesToNodeStream(templates: Template[], ctx: Context): ReadableStream

    +

    Defined in render/render.ts:11

    +

    Parameters:

    + + + + + + + + + + + + + + + +
    NameType
    templatesTemplate[]
    ctxContext
    +

    Returns: ReadableStream

    - +
    @@ -130,7 +151,7 @@
    Contents -
    1. Hierarchy
    2. Methods
      1. renderTemplates
    +
    1. Hierarchy
    2. Methods
      1. renderTemplates
      2. renderTemplatesToNodeStream
    Back to Top
    diff --git a/api/classes/template_filter_filter_.filter.html b/api/classes/template_filter_filter_.filter.html index ed0091d22..17d26ef23 100644 --- a/api/classes/template_filter_filter_.filter.html +++ b/api/classes/template_filter_filter_.filter.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Filter

    -
    +
    @@ -95,7 +95,7 @@
  • Filter
  • Constructors

    constructor

    + new Filter(name: string, impl: FilterImplOptions, args: FilterArg[], liquid: Liquid): Filter

    -

    Defined in template/filter/filter.ts:12

    +

    Defined in template/filter/filter.ts:12

    Parameters:

    @@ -123,18 +123,18 @@

    Returns: Filter

    Properties

    args

    args: FilterArg[]

    -

    Defined in template/filter/filter.ts:10

    +

    Defined in template/filter/filter.ts:10


    Private impl

    impl: FilterImplOptions

    -

    Defined in template/filter/filter.ts:11

    +

    Defined in template/filter/filter.ts:11


    Private liquid

    liquid: Liquid

    -

    Defined in template/filter/filter.ts:12

    +

    Defined in template/filter/filter.ts:12


    name

    name: string

    -

    Defined in template/filter/filter.ts:9

    +

    Defined in template/filter/filter.ts:9

    Methods

    render

    render(value: any, context: Context): any

    -

    Defined in template/filter/filter.ts:20

    +

    Defined in template/filter/filter.ts:20

    Parameters:

    @@ -156,7 +156,7 @@
    - +
    diff --git a/api/classes/template_filter_filter_map_.filtermap.html b/api/classes/template_filter_filter_map_.filtermap.html index a6f6b7a5c..65567ede1 100644 --- a/api/classes/template_filter_filter_map_.filtermap.html +++ b/api/classes/template_filter_filter_map_.filtermap.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: FilterMap

    -
    +
    @@ -95,7 +95,7 @@
  • FilterMap
  • Constructors

    constructor

    + new FilterMap(strictFilters: boolean, liquid: Liquid): FilterMap

    -

    Defined in template/filter/filter-map.ts:8

    +

    Defined in template/filter/filter-map.ts:8

    Parameters:

    @@ -115,18 +115,18 @@

    Returns: FilterMap

    Properties

    Private impls

    impls: object

    -

    Defined in template/filter/filter-map.ts:8

    +

    Defined in template/filter/filter-map.ts:8

    Type declaration:


    Private liquid

    liquid: Liquid

    -

    Defined in template/filter/filter-map.ts:12

    +

    Defined in template/filter/filter-map.ts:12


    Private strictFilters

    strictFilters: boolean

    -

    Defined in template/filter/filter-map.ts:11

    +

    Defined in template/filter/filter-map.ts:11

    Methods

    create

    create(name: string, args: FilterArg[]): Filter

    -

    Defined in template/filter/filter-map.ts:25

    +

    Defined in template/filter/filter-map.ts:25

    Parameters:

    @@ -147,7 +147,7 @@

    Returns: Filter


    get

    get(name: string): FilterImplOptions

    -

    Defined in template/filter/filter-map.ts:15

    +

    Defined in template/filter/filter-map.ts:15

    Parameters:

    @@ -164,7 +164,7 @@

    Returns: FilterImplOptions


    set

    set(name: string, impl: FilterImplOptions): void

    -

    Defined in template/filter/filter-map.ts:21

    +

    Defined in template/filter/filter-map.ts:21

    Parameters:

    @@ -186,7 +186,7 @@
    - +
    diff --git a/api/classes/template_html_.html.html b/api/classes/template_html_.html.html index bf0fe7cce..6ce6d8f00 100644 --- a/api/classes/template_html_.html.html +++ b/api/classes/template_html_.html.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: HTML

    -
    +
    @@ -101,7 +101,7 @@

    Constructors

    constructor

    + new HTML(token: HTMLToken): HTML

    Overrides TemplateImpl.constructor

    -

    Defined in template/html.ts:8

    +

    Defined in template/html.ts:8

    Parameters:

    @@ -117,15 +117,15 @@

    Returns: HTML

    Properties

    Private str

    str: string

    -

    Defined in template/html.ts:8

    +

    Defined in template/html.ts:8


    token

    token: HTMLToken

    Implementation of Template.token

    Inherited from TemplateImpl.token

    -

    Defined in template/template-impl.ts:2

    -

    Methods

    render

    render(ctx: Context, emitter: Emitter): IterableIterator‹void›

    +

    Defined in template/template-impl.ts:2

    +

    Methods

    render

    render(ctx: Context, emitter: Emitter): IterableIterator‹void›

    Implementation of Template

    -

    Defined in template/html.ts:13

    +

    Defined in template/html.ts:13

    Parameters:

    @@ -140,14 +140,14 @@ - +
    emitterEmitterEmitter

    Returns: IterableIterator‹void›

    diff --git a/api/classes/template_output_.output.html b/api/classes/template_output_.output.html index bf3543036..91e3dec31 100644 --- a/api/classes/template_output_.output.html +++ b/api/classes/template_output_.output.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Output

    -
    +
    @@ -101,7 +101,7 @@

    Constructors

    constructor

    + new Output(token: OutputToken, liquid: Liquid): Output

    Overrides TemplateImpl.constructor

    -

    Defined in template/output.ts:10

    +

    Defined in template/output.ts:10

    Parameters:

    @@ -123,13 +123,13 @@

    Properties

    token

    token: OutputToken

    Implementation of Template.token

    Inherited from TemplateImpl.token

    -

    Defined in template/template-impl.ts:2

    +

    Defined in template/template-impl.ts:2


    Private value

    value: Value

    -

    Defined in template/output.ts:10

    -

    Methods

    render

    render(ctx: Context, emitter: Emitter): IterableIterator‹IterableIterator‹any››

    +

    Defined in template/output.ts:10

    +

    Methods

    render

    render(ctx: Context, emitter: Emitter): IterableIterator‹IterableIterator‹any››

    Implementation of Template

    -

    Defined in template/output.ts:15

    +

    Defined in template/output.ts:15

    Parameters:

    @@ -144,14 +144,14 @@ - +
    emitterEmitterEmitter

    Returns: IterableIterator‹IterableIterator‹any››

    diff --git a/api/classes/template_tag_hash_.hash.html b/api/classes/template_tag_hash_.hash.html index 91135525d..a4e31cf19 100644 --- a/api/classes/template_tag_hash_.hash.html +++ b/api/classes/template_tag_hash_.hash.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Hash

    -
    +
    @@ -95,7 +95,7 @@
  • Hash
  • Constructors

    constructor

    + new Hash(markup: string): Hash

    -

    Defined in template/tag/hash.ts:14

    +

    Defined in template/tag/hash.ts:14

    Parameters:

    @@ -111,12 +111,12 @@

    Returns: Hash

    Properties

    hash

    hash: object

    -

    Defined in template/tag/hash.ts:14

    +

    Defined in template/tag/hash.ts:14

    Type declaration:

    Methods

    render

    render(ctx: Context): IterableIterator‹any›

    -

    Defined in template/tag/hash.ts:21

    +

    Defined in template/tag/hash.ts:21

    Parameters:

    @@ -134,7 +134,7 @@
    - +
    diff --git a/api/classes/template_tag_tag_.tag.html b/api/classes/template_tag_tag_.tag.html index ce50c49a0..3d46eb8b6 100644 --- a/api/classes/template_tag_tag_.tag.html +++ b/api/classes/template_tag_tag_.tag.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Tag

    -
    +
    @@ -101,7 +101,7 @@

    Constructors

    constructor

    + new Tag(token: TagToken, tokens: TopLevelToken[], liquid: Liquid): Tag

    Overrides TemplateImpl.constructor

    -

    Defined in template/tag/tag.ts:9

    +

    Defined in template/tag/tag.ts:9

    Parameters:

    @@ -125,18 +125,18 @@

    Returns: Tag

    Properties

    Private impl

    impl: TagImpl

    -

    Defined in template/tag/tag.ts:9

    +

    Defined in template/tag/tag.ts:9


    name

    name: string

    -

    Defined in template/tag/tag.ts:8

    +

    Defined in template/tag/tag.ts:8


    token

    token: TagToken

    Implementation of Template.token

    Inherited from TemplateImpl.token

    -

    Defined in template/template-impl.ts:2

    -

    Methods

    render

    render(ctx: Context, emitter: Emitter): IterableIterator‹any›

    +

    Defined in template/template-impl.ts:2

    +

    Methods

    render

    render(ctx: Context, emitter: Emitter): IterableIterator‹any›

    Implementation of Template

    -

    Defined in template/tag/tag.ts:23

    +

    Defined in template/tag/tag.ts:23

    Parameters:

    @@ -151,14 +151,14 @@ - +
    emitterEmitterEmitter

    Returns: IterableIterator‹any›

    diff --git a/api/classes/template_tag_tag_map_.tagmap.html b/api/classes/template_tag_tag_map_.tagmap.html index 693ab8629..190305e88 100644 --- a/api/classes/template_tag_tag_map_.tagmap.html +++ b/api/classes/template_tag_tag_map_.tagmap.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: TagMap

    -
    +
    @@ -95,12 +95,12 @@
  • TagMap
  • Properties

    Private impls

    impls: object

    -

    Defined in template/tag/tag-map.ts:5

    +

    Defined in template/tag/tag-map.ts:5

    Type declaration:

    Methods

    get

    get(name: string): TagImplOptions

    -

    Defined in template/tag/tag-map.ts:7

    +

    Defined in template/tag/tag-map.ts:7

    Parameters:

    @@ -117,7 +117,7 @@

    Returns: TagImplOptions


    set

    set(name: string, impl: TagImplOptions): void

    -

    Defined in template/tag/tag-map.ts:13

    +

    Defined in template/tag/tag-map.ts:13

    Parameters:

    @@ -139,7 +139,7 @@
    - +
    diff --git a/api/classes/template_template_impl_.templateimpl.html b/api/classes/template_template_impl_.templateimpl.html index d084b5d3b..ba6c12dc7 100644 --- a/api/classes/template_template_impl_.templateimpl.html +++ b/api/classes/template_template_impl_.templateimpl.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: TemplateImpl <T>

    -
    +
    @@ -100,7 +100,7 @@

    Constructors

    constructor

    + new TemplateImpl(token: T): TemplateImpl

    -

    Defined in template/template-impl.ts:2

    +

    Defined in template/template-impl.ts:2

    Parameters:

    @@ -116,11 +116,11 @@

    Returns: TemplateImpl

    Properties

    token

    token: T

    -

    Defined in template/template-impl.ts:2

    +

    Defined in template/template-impl.ts:2

    diff --git a/api/classes/template_value_.value.html b/api/classes/template_value_.value.html index 78c16155f..33fc64cb6 100644 --- a/api/classes/template_value_.value.html +++ b/api/classes/template_value_.value.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Value

    -
    +
    @@ -95,7 +95,7 @@
  • Value
  • Constructors

    constructor

    + new Value(str: string, liquid: Liquid): Value

    -

    Defined in template/value.ts:9

    +

    Defined in template/value.ts:9

    Parameters:

    @@ -118,12 +118,12 @@

    Returns: Value

    Properties

    filters

    filters: Filter[] = []

    -

    Defined in template/value.ts:8

    +

    Defined in template/value.ts:8


    initial

    initial: Expression

    -

    Defined in template/value.ts:9

    +

    Defined in template/value.ts:9

    Methods

    value

    value(ctx: Context, lenient: boolean): IterableIterator‹any›

    -

    Defined in template/value.ts:19

    +

    Defined in template/value.ts:19

    Parameters:

    @@ -145,7 +145,7 @@
    - +
    diff --git a/api/classes/tokens_delimited_token_.delimitedtoken.html b/api/classes/tokens_delimited_token_.delimitedtoken.html index b7ef9af5e..bfba0a487 100644 --- a/api/classes/tokens_delimited_token_.delimitedtoken.html +++ b/api/classes/tokens_delimited_token_.delimitedtoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: DelimitedToken

    -
    +
    @@ -100,7 +100,7 @@

    Constructors

    constructor

    + new DelimitedToken(kind: TokenKind, content: string, input: string, begin: number, end: number, trimLeft: boolean, trimRight: boolean, file?: undefined | string): DelimitedToken

    Overrides Token.constructor

    -

    Defined in tokens/delimited-token.ts:8

    +

    Defined in tokens/delimited-token.ts:8

    Parameters:

    @@ -145,50 +145,50 @@

    Returns: DelimitedToken

    Properties

    begin

    begin: number

    Inherited from Token.begin

    -

    Defined in tokens/token.ts:7

    +

    Defined in tokens/token.ts:7


    content

    content: string

    -

    Defined in tokens/delimited-token.ts:8

    +

    Defined in tokens/delimited-token.ts:8


    end

    end: number

    Inherited from Token.end

    -

    Defined in tokens/token.ts:8

    +

    Defined in tokens/token.ts:8


    Optional file

    file? : undefined | string

    Inherited from Token.file

    -

    Defined in tokens/token.ts:9

    +

    Defined in tokens/token.ts:9


    input

    input: string

    Inherited from Token.input

    -

    Defined in tokens/token.ts:6

    +

    Defined in tokens/token.ts:6


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5


    trimLeft

    trimLeft: boolean = false

    -

    Defined in tokens/delimited-token.ts:6

    +

    Defined in tokens/delimited-token.ts:6


    trimRight

    trimRight: boolean = false

    -

    Defined in tokens/delimited-token.ts:7

    +

    Defined in tokens/delimited-token.ts:7

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    diff --git a/api/classes/tokens_filter_token_.filtertoken.html b/api/classes/tokens_filter_token_.filtertoken.html index 11ff0fda9..49d28b6c6 100644 --- a/api/classes/tokens_filter_token_.filtertoken.html +++ b/api/classes/tokens_filter_token_.filtertoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: FilterToken

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new FilterToken(name: string, args: FilterArg[], input: string, begin: number, end: number, file?: undefined | string): FilterToken

    Overrides Token.constructor

    -

    Defined in tokens/filter-token.ts:5

    +

    Defined in tokens/filter-token.ts:5

    Parameters:

    @@ -134,48 +134,48 @@

    Returns: FilterToken

    Properties

    args

    args: FilterArg[]

    -

    Defined in tokens/filter-token.ts:8

    +

    Defined in tokens/filter-token.ts:8


    begin

    begin: number

    Inherited from Token.begin

    -

    Defined in tokens/token.ts:7

    +

    Defined in tokens/token.ts:7


    end

    end: number

    Inherited from Token.end

    -

    Defined in tokens/token.ts:8

    +

    Defined in tokens/token.ts:8


    Optional file

    file? : undefined | string

    Inherited from Token.file

    -

    Defined in tokens/token.ts:9

    +

    Defined in tokens/token.ts:9


    input

    input: string

    Inherited from Token.input

    -

    Defined in tokens/token.ts:6

    +

    Defined in tokens/token.ts:6


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5


    name

    name: string

    -

    Defined in tokens/filter-token.ts:7

    +

    Defined in tokens/filter-token.ts:7

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    diff --git a/api/classes/tokens_hash_token_.hashtoken.html b/api/classes/tokens_hash_token_.hashtoken.html index 0e332c896..231fa4460 100644 --- a/api/classes/tokens_hash_token_.hashtoken.html +++ b/api/classes/tokens_hash_token_.hashtoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: HashToken

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new HashToken(input: string, begin: number, end: number, name: IdentifierToken, value?: ValueToken, file?: undefined | string): HashToken

    Overrides Token.constructor

    -

    Defined in tokens/hash-token.ts:6

    +

    Defined in tokens/hash-token.ts:6

    Parameters:

    @@ -135,47 +135,47 @@

    Returns: HashToken

    Properties

    begin

    begin: number

    Overrides Token.begin

    -

    Defined in tokens/hash-token.ts:9

    +

    Defined in tokens/hash-token.ts:9


    end

    end: number

    Overrides Token.end

    -

    Defined in tokens/hash-token.ts:10

    +

    Defined in tokens/hash-token.ts:10


    Optional file

    file? : undefined | string

    Overrides Token.file

    -

    Defined in tokens/hash-token.ts:13

    +

    Defined in tokens/hash-token.ts:13


    input

    input: string

    Overrides Token.input

    -

    Defined in tokens/hash-token.ts:8

    +

    Defined in tokens/hash-token.ts:8


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5


    name

    name: IdentifierToken

    -

    Defined in tokens/hash-token.ts:11

    +

    Defined in tokens/hash-token.ts:11


    Optional value

    value? : ValueToken

    -

    Defined in tokens/hash-token.ts:12

    +

    Defined in tokens/hash-token.ts:12

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    diff --git a/api/classes/tokens_html_token_.htmltoken.html b/api/classes/tokens_html_token_.htmltoken.html index 2461be901..6b12b39a8 100644 --- a/api/classes/tokens_html_token_.htmltoken.html +++ b/api/classes/tokens_html_token_.htmltoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: HTMLToken

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new HTMLToken(input: string, begin: number, end: number, file?: undefined | string): HTMLToken

    Overrides Token.constructor

    -

    Defined in tokens/html-token.ts:6

    +

    Defined in tokens/html-token.ts:6

    Parameters:

    @@ -127,51 +127,51 @@

    Returns: HTMLToken

    Properties

    begin

    begin: number

    Overrides Token.begin

    -

    Defined in tokens/html-token.ts:9

    +

    Defined in tokens/html-token.ts:9


    end

    end: number

    Overrides Token.end

    -

    Defined in tokens/html-token.ts:10

    +

    Defined in tokens/html-token.ts:10


    Optional file

    file? : undefined | string

    Overrides Token.file

    -

    Defined in tokens/html-token.ts:11

    +

    Defined in tokens/html-token.ts:11


    input

    input: string

    Overrides Token.input

    -

    Defined in tokens/html-token.ts:8

    +

    Defined in tokens/html-token.ts:8


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5


    trimLeft

    trimLeft: number = 0

    -

    Defined in tokens/html-token.ts:5

    +

    Defined in tokens/html-token.ts:5


    trimRight

    trimRight: number = 0

    -

    Defined in tokens/html-token.ts:6

    +

    Defined in tokens/html-token.ts:6

    Methods

    getContent

    getContent(): string

    -

    Defined in tokens/html-token.ts:15

    +

    Defined in tokens/html-token.ts:15

    Returns: string


    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    diff --git a/api/classes/tokens_identifier_token_.identifiertoken.html b/api/classes/tokens_identifier_token_.identifiertoken.html index 3fe181f72..3f86e869d 100644 --- a/api/classes/tokens_identifier_token_.identifiertoken.html +++ b/api/classes/tokens_identifier_token_.identifiertoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: IdentifierToken

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new IdentifierToken(input: string, begin: number, end: number, file?: undefined | string): IdentifierToken

    Overrides Token.constructor

    -

    Defined in tokens/identifier-token.ts:6

    +

    Defined in tokens/identifier-token.ts:6

    Parameters:

    @@ -127,38 +127,38 @@

    Returns: IdentifierToken

    Properties

    begin

    begin: number

    Overrides Token.begin

    -

    Defined in tokens/identifier-token.ts:9

    +

    Defined in tokens/identifier-token.ts:9


    content

    content: string

    -

    Defined in tokens/identifier-token.ts:6

    +

    Defined in tokens/identifier-token.ts:6


    end

    end: number

    Overrides Token.end

    -

    Defined in tokens/identifier-token.ts:10

    +

    Defined in tokens/identifier-token.ts:10


    Optional file

    file? : undefined | string

    Overrides Token.file

    -

    Defined in tokens/identifier-token.ts:11

    +

    Defined in tokens/identifier-token.ts:11


    input

    input: string

    Overrides Token.input

    -

    Defined in tokens/identifier-token.ts:8

    +

    Defined in tokens/identifier-token.ts:8


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    isNumber

    isNumber(allowSign: boolean): boolean

    -

    Defined in tokens/identifier-token.ts:16

    +

    Defined in tokens/identifier-token.ts:16

    Parameters:

    @@ -178,12 +178,12 @@

    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    diff --git a/api/classes/tokens_literal_token_.literaltoken.html b/api/classes/tokens_literal_token_.literaltoken.html index 6797315f6..63b729ec0 100644 --- a/api/classes/tokens_literal_token_.literaltoken.html +++ b/api/classes/tokens_literal_token_.literaltoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: LiteralToken

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new LiteralToken(input: string, begin: number, end: number, file?: undefined | string): LiteralToken

    Overrides Token.constructor

    -

    Defined in tokens/literal-token.ts:5

    +

    Defined in tokens/literal-token.ts:5

    Parameters:

    @@ -127,44 +127,44 @@

    Returns: LiteralToken

    Properties

    begin

    begin: number

    Overrides Token.begin

    -

    Defined in tokens/literal-token.ts:8

    +

    Defined in tokens/literal-token.ts:8


    end

    end: number

    Overrides Token.end

    -

    Defined in tokens/literal-token.ts:9

    +

    Defined in tokens/literal-token.ts:9


    Optional file

    file? : undefined | string

    Overrides Token.file

    -

    Defined in tokens/literal-token.ts:10

    +

    Defined in tokens/literal-token.ts:10


    input

    input: string

    Overrides Token.input

    -

    Defined in tokens/literal-token.ts:7

    +

    Defined in tokens/literal-token.ts:7


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5


    literal

    literal: string

    -

    Defined in tokens/literal-token.ts:5

    +

    Defined in tokens/literal-token.ts:5

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    diff --git a/api/classes/tokens_number_token_.numbertoken.html b/api/classes/tokens_number_token_.numbertoken.html index 4c0a0a8e6..47059f713 100644 --- a/api/classes/tokens_number_token_.numbertoken.html +++ b/api/classes/tokens_number_token_.numbertoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: NumberToken

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new NumberToken(whole: IdentifierToken, decimal?: IdentifierToken): NumberToken

    Overrides Token.constructor

    -

    Defined in tokens/number-token.ts:5

    +

    Defined in tokens/number-token.ts:5

    Parameters:

    @@ -119,47 +119,47 @@

    Returns: NumberToken

    Properties

    begin

    begin: number

    Inherited from Token.begin

    -

    Defined in tokens/token.ts:7

    +

    Defined in tokens/token.ts:7


    Optional decimal

    decimal? : IdentifierToken

    -

    Defined in tokens/number-token.ts:8

    +

    Defined in tokens/number-token.ts:8


    end

    end: number

    Inherited from Token.end

    -

    Defined in tokens/token.ts:8

    +

    Defined in tokens/token.ts:8


    Optional file

    file? : undefined | string

    Inherited from Token.file

    -

    Defined in tokens/token.ts:9

    +

    Defined in tokens/token.ts:9


    input

    input: string

    Inherited from Token.input

    -

    Defined in tokens/token.ts:6

    +

    Defined in tokens/token.ts:6


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5


    whole

    whole: IdentifierToken

    -

    Defined in tokens/number-token.ts:7

    +

    Defined in tokens/number-token.ts:7

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    diff --git a/api/classes/tokens_operator_token_.operatortoken.html b/api/classes/tokens_operator_token_.operatortoken.html index 15ac3431f..8d225f2e5 100644 --- a/api/classes/tokens_operator_token_.operatortoken.html +++ b/api/classes/tokens_operator_token_.operatortoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: OperatorToken

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new OperatorToken(input: string, begin: number, end: number, file?: undefined | string): OperatorToken

    Overrides Token.constructor

    -

    Defined in tokens/operator-token.ts:17

    +

    Defined in tokens/operator-token.ts:17

    Parameters:

    @@ -127,48 +127,48 @@

    Returns: OperatorToken

    Properties

    begin

    begin: number

    Overrides Token.begin

    -

    Defined in tokens/operator-token.ts:20

    +

    Defined in tokens/operator-token.ts:20


    end

    end: number

    Overrides Token.end

    -

    Defined in tokens/operator-token.ts:21

    +

    Defined in tokens/operator-token.ts:21


    Optional file

    file? : undefined | string

    Overrides Token.file

    -

    Defined in tokens/operator-token.ts:22

    +

    Defined in tokens/operator-token.ts:22


    input

    input: string

    Overrides Token.input

    -

    Defined in tokens/operator-token.ts:19

    +

    Defined in tokens/operator-token.ts:19


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5


    operator

    operator: string

    -

    Defined in tokens/operator-token.ts:17

    +

    Defined in tokens/operator-token.ts:17

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getPrecedence

    getPrecedence(): any

    -

    Defined in tokens/operator-token.ts:27

    +

    Defined in tokens/operator-token.ts:27

    Returns: any


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    diff --git a/api/classes/tokens_output_token_.outputtoken.html b/api/classes/tokens_output_token_.outputtoken.html index 1333bb331..571ff9753 100644 --- a/api/classes/tokens_output_token_.outputtoken.html +++ b/api/classes/tokens_output_token_.outputtoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: OutputToken

    -
    +
    @@ -95,7 +95,7 @@

    OutputToken

    Constructors

    constructor

    + new OutputToken(input: string, begin: number, end: number, options: NormalizedFullOptions, file?: undefined | string): OutputToken

    Overrides DelimitedToken.constructor

    -

    Defined in tokens/output-token.ts:5

    +

    Defined in tokens/output-token.ts:5

    Parameters:

    @@ -128,53 +128,53 @@

    Returns: OutputToken

    Properties

    begin

    begin: number

    Inherited from Token.begin

    -

    Defined in tokens/token.ts:7

    +

    Defined in tokens/token.ts:7


    content

    content: string

    Inherited from DelimitedToken.content

    -

    Defined in tokens/delimited-token.ts:8

    +

    Defined in tokens/delimited-token.ts:8


    end

    end: number

    Inherited from Token.end

    -

    Defined in tokens/token.ts:8

    +

    Defined in tokens/token.ts:8


    Optional file

    file? : undefined | string

    Inherited from Token.file

    -

    Defined in tokens/token.ts:9

    +

    Defined in tokens/token.ts:9


    input

    input: string

    Inherited from Token.input

    -

    Defined in tokens/token.ts:6

    +

    Defined in tokens/token.ts:6


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5


    trimLeft

    trimLeft: boolean = false

    Inherited from DelimitedToken.trimLeft

    -

    Defined in tokens/delimited-token.ts:6

    +

    Defined in tokens/delimited-token.ts:6


    trimRight

    trimRight: boolean = false

    Inherited from DelimitedToken.trimRight

    -

    Defined in tokens/delimited-token.ts:7

    +

    Defined in tokens/delimited-token.ts:7

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    diff --git a/api/classes/tokens_property_access_token_.propertyaccesstoken.html b/api/classes/tokens_property_access_token_.propertyaccesstoken.html index 63f9e1a67..341815e1b 100644 --- a/api/classes/tokens_property_access_token_.propertyaccesstoken.html +++ b/api/classes/tokens_property_access_token_.propertyaccesstoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: PropertyAccessToken

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new PropertyAccessToken(variable: IdentifierToken | QuotedToken, props: IdentifierToken | QuotedToken | PropertyAccessToken[], end: number): PropertyAccessToken

    Overrides Token.constructor

    -

    Defined in tokens/property-access-token.ts:7

    +

    Defined in tokens/property-access-token.ts:8

    Parameters:

    @@ -123,51 +123,50 @@

    Returns: PropertyAccessToken

    Properties

    begin

    begin: number

    Inherited from Token.begin

    -

    Defined in tokens/token.ts:7

    +

    Defined in tokens/token.ts:7


    end

    end: number

    Inherited from Token.end

    -

    Defined in tokens/token.ts:8

    +

    Defined in tokens/token.ts:8


    Optional file

    file? : undefined | string

    Inherited from Token.file

    -

    Defined in tokens/token.ts:9

    +

    Defined in tokens/token.ts:9


    input

    input: string

    Inherited from Token.input

    -

    Defined in tokens/token.ts:6

    +

    Defined in tokens/token.ts:6


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5

    +
    +

    propertyName

    propertyName: string

    +

    Defined in tokens/property-access-token.ts:8


    props

    props: IdentifierToken | QuotedToken | PropertyAccessToken[]

    -

    Defined in tokens/property-access-token.ts:10

    +

    Defined in tokens/property-access-token.ts:11


    variable

    variable: IdentifierToken | QuotedToken

    -

    Defined in tokens/property-access-token.ts:9

    +

    Defined in tokens/property-access-token.ts:10

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    -

    Returns: string

    -
    -

    getVariableAsText

    getVariableAsText(): string

    -

    Defined in tokens/property-access-token.ts:16

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    @@ -176,7 +175,7 @@
    Contents -
    1. Hierarchy
    2. Constructors
      1. constructor
    3. Properties
      1. begin
      2. end
      3. Optional file
      4. input
      5. kind
      6. props
      7. variable
    4. Methods
      1. getPosition
      2. getText
      3. getVariableAsText
      4. size
    +
    1. Hierarchy
    2. Constructors
      1. constructor
    3. Properties
      1. begin
      2. end
      3. Optional file
      4. input
      5. kind
      6. propertyName
      7. props
      8. variable
    4. Methods
      1. getPosition
      2. getText
      3. size
    Back to Top
    diff --git a/api/classes/tokens_quoted_token_.quotedtoken.html b/api/classes/tokens_quoted_token_.quotedtoken.html index 8afda3693..6d609d9d5 100644 --- a/api/classes/tokens_quoted_token_.quotedtoken.html +++ b/api/classes/tokens_quoted_token_.quotedtoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: QuotedToken

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new QuotedToken(input: string, begin: number, end: number, file?: undefined | string): QuotedToken

    Overrides Token.constructor

    -

    Defined in tokens/quoted-token.ts:4

    +

    Defined in tokens/quoted-token.ts:4

    Parameters:

    @@ -127,41 +127,41 @@

    Returns: QuotedToken

    Properties

    begin

    begin: number

    Overrides Token.begin

    -

    Defined in tokens/quoted-token.ts:7

    +

    Defined in tokens/quoted-token.ts:7


    end

    end: number

    Overrides Token.end

    -

    Defined in tokens/quoted-token.ts:8

    +

    Defined in tokens/quoted-token.ts:8


    Optional file

    file? : undefined | string

    Overrides Token.file

    -

    Defined in tokens/quoted-token.ts:9

    +

    Defined in tokens/quoted-token.ts:9


    input

    input: string

    Overrides Token.input

    -

    Defined in tokens/quoted-token.ts:6

    +

    Defined in tokens/quoted-token.ts:6


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    diff --git a/api/classes/tokens_range_token_.rangetoken.html b/api/classes/tokens_range_token_.rangetoken.html index 360ac96b0..355f2fbe2 100644 --- a/api/classes/tokens_range_token_.rangetoken.html +++ b/api/classes/tokens_range_token_.rangetoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: RangeToken

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new RangeToken(input: string, begin: number, end: number, lhs: ValueToken, rhs: ValueToken, file?: undefined | string): RangeToken

    Overrides Token.constructor

    -

    Defined in tokens/range-token.ts:5

    +

    Defined in tokens/range-token.ts:5

    Parameters:

    @@ -135,47 +135,47 @@

    Returns: RangeToken

    Properties

    begin

    begin: number

    Overrides Token.begin

    -

    Defined in tokens/range-token.ts:8

    +

    Defined in tokens/range-token.ts:8


    end

    end: number

    Overrides Token.end

    -

    Defined in tokens/range-token.ts:9

    +

    Defined in tokens/range-token.ts:9


    Optional file

    file? : undefined | string

    Overrides Token.file

    -

    Defined in tokens/range-token.ts:12

    +

    Defined in tokens/range-token.ts:12


    input

    input: string

    Overrides Token.input

    -

    Defined in tokens/range-token.ts:7

    +

    Defined in tokens/range-token.ts:7


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5


    lhs

    lhs: ValueToken

    -

    Defined in tokens/range-token.ts:10

    +

    Defined in tokens/range-token.ts:10


    rhs

    rhs: ValueToken

    -

    Defined in tokens/range-token.ts:11

    +

    Defined in tokens/range-token.ts:11

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    diff --git a/api/classes/tokens_tag_token_.tagtoken.html b/api/classes/tokens_tag_token_.tagtoken.html index 50a029ef9..fb30c2a70 100644 --- a/api/classes/tokens_tag_token_.tagtoken.html +++ b/api/classes/tokens_tag_token_.tagtoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: TagToken

    -
    +
    @@ -95,7 +95,7 @@

    TagToken

    Constructors

    constructor

    + new TagToken(input: string, begin: number, end: number, options: NormalizedFullOptions, file?: undefined | string): TagToken

    Overrides DelimitedToken.constructor

    -

    Defined in tokens/tag-token.ts:9

    +

    Defined in tokens/tag-token.ts:9

    Parameters:

    @@ -127,60 +127,60 @@

    Returns: TagToken

    Properties

    args

    args: string

    -

    Defined in tokens/tag-token.ts:9

    +

    Defined in tokens/tag-token.ts:9


    begin

    begin: number

    Inherited from Token.begin

    -

    Defined in tokens/token.ts:7

    +

    Defined in tokens/token.ts:7


    content

    content: string

    Inherited from DelimitedToken.content

    -

    Defined in tokens/delimited-token.ts:8

    +

    Defined in tokens/delimited-token.ts:8


    end

    end: number

    Inherited from Token.end

    -

    Defined in tokens/token.ts:8

    +

    Defined in tokens/token.ts:8


    Optional file

    file? : undefined | string

    Inherited from Token.file

    -

    Defined in tokens/token.ts:9

    +

    Defined in tokens/token.ts:9


    input

    input: string

    Inherited from Token.input

    -

    Defined in tokens/token.ts:6

    +

    Defined in tokens/token.ts:6


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5


    name

    name: string

    -

    Defined in tokens/tag-token.ts:8

    +

    Defined in tokens/tag-token.ts:8


    trimLeft

    trimLeft: boolean = false

    Inherited from DelimitedToken.trimLeft

    -

    Defined in tokens/delimited-token.ts:6

    +

    Defined in tokens/delimited-token.ts:6


    trimRight

    trimRight: boolean = false

    Inherited from DelimitedToken.trimRight

    -

    Defined in tokens/delimited-token.ts:7

    +

    Defined in tokens/delimited-token.ts:7

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    diff --git a/api/classes/tokens_token_.token.html b/api/classes/tokens_token_.token.html index e50882db8..ca7b0c424 100644 --- a/api/classes/tokens_token_.token.html +++ b/api/classes/tokens_token_.token.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Token

    -
    +
    @@ -107,7 +107,7 @@

    Constructors

    constructor

    + new Token(kind: TokenKind, input: string, begin: number, end: number, file?: undefined | string): Token

    -

    Defined in tokens/token.ts:3

    +

    Defined in tokens/token.ts:3

    Parameters:

    @@ -139,34 +139,34 @@

    Returns: Token

    Properties

    begin

    begin: number

    -

    Defined in tokens/token.ts:7

    +

    Defined in tokens/token.ts:7


    end

    end: number

    -

    Defined in tokens/token.ts:8

    +

    Defined in tokens/token.ts:8


    Optional file

    file? : undefined | string

    -

    Defined in tokens/token.ts:9

    +

    Defined in tokens/token.ts:9


    input

    input: string

    -

    Defined in tokens/token.ts:6

    +

    Defined in tokens/token.ts:6


    kind

    kind: TokenKind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5

    Methods

    getPosition

    getPosition(): number[]

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    diff --git a/api/classes/util_error_.assertionerror.html b/api/classes/util_error_.assertionerror.html index 642bfe2da..98be461d2 100644 --- a/api/classes/util_error_.assertionerror.html +++ b/api/classes/util_error_.assertionerror.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: AssertionError

    -
    +
    @@ -97,7 +97,7 @@

    Constructors

    constructor

    + new AssertionError(message: string): AssertionError

    -

    Defined in util/error.ts:74

    +

    Defined in util/error.ts:74

    Parameters:

    @@ -130,7 +130,7 @@
    - +
    diff --git a/api/classes/util_error_.internalundefinedvariableerror.html b/api/classes/util_error_.internalundefinedvariableerror.html index 3c415d52e..4f2261bc6 100644 --- a/api/classes/util_error_.internalundefinedvariableerror.html +++ b/api/classes/util_error_.internalundefinedvariableerror.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: InternalUndefinedVariableError

    -
    +
    @@ -97,7 +97,7 @@

    Constructors

    constructor

    + new InternalUndefinedVariableError(variableName: string): InternalUndefinedVariableError

    -

    Defined in util/error.ts:65

    +

    Defined in util/error.ts:65

    Parameters:

    @@ -126,14 +126,14 @@

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:975


    variableName

    variableName: string

    -

    Defined in util/error.ts:65

    +

    Defined in util/error.ts:65


    Static Error

    Error: ErrorConstructor

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:984

    - +
    diff --git a/api/classes/util_error_.liquiderror.html b/api/classes/util_error_.liquiderror.html index 682517fcb..a84509036 100644 --- a/api/classes/util_error_.liquiderror.html +++ b/api/classes/util_error_.liquiderror.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: LiquidError

    -
    +
    @@ -101,7 +101,7 @@

    Constructors

    constructor

    + new LiquidError(err: Error, token: Token): LiquidError

    -

    Defined in util/error.ts:8

    +

    Defined in util/error.ts:8

    Parameters:

    @@ -121,7 +121,7 @@

    Returns: LiquidError

    Properties

    context

    context: string

    -

    Defined in util/error.ts:7

    +

    Defined in util/error.ts:7


    message

    message: string

    Inherited from void

    @@ -132,7 +132,7 @@

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:973


    Private originalError

    originalError: Error

    -

    Defined in util/error.ts:8

    +

    Defined in util/error.ts:8


    Optional stack

    stack? : undefined | string

    Inherited from void

    @@ -140,17 +140,17 @@

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:975


    Private token

    token: Token

    -

    Defined in util/error.ts:6

    +

    Defined in util/error.ts:6


    Static Error

    Error: ErrorConstructor

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:984

    Methods

    Protected update

    update(): void

    -

    Defined in util/error.ts:15

    +

    Defined in util/error.ts:15

    Returns: void

    diff --git a/api/classes/util_error_.parseerror.html b/api/classes/util_error_.parseerror.html index 3f84e0bde..33d04a6e0 100644 --- a/api/classes/util_error_.parseerror.html +++ b/api/classes/util_error_.parseerror.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: ParseError

    -
    +
    @@ -95,7 +95,7 @@

    ParseError

    Constructors

    constructor

    + new ParseError(err: Error, token: Token): ParseError

    Overrides LiquidError.constructor

    -

    Defined in util/error.ts:32

    +

    Defined in util/error.ts:32

    Parameters:

    @@ -116,7 +116,7 @@

    Returns: ParseError

    Properties

    context

    context: string

    Inherited from LiquidError.context

    -

    Defined in util/error.ts:7

    +

    Defined in util/error.ts:7


    message

    message: string

    Inherited from void

    @@ -132,12 +132,12 @@

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:975

    Methods

    Protected update

    update(): void

    Inherited from LiquidError.update

    -

    Defined in util/error.ts:15

    +

    Defined in util/error.ts:15

    Returns: void

    - +
    diff --git a/api/classes/util_error_.rendererror.html b/api/classes/util_error_.rendererror.html index e40a38a03..5dbe456db 100644 --- a/api/classes/util_error_.rendererror.html +++ b/api/classes/util_error_.rendererror.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: RenderError

    -
    +
    @@ -95,7 +95,7 @@

    RenderError

    Constructors

    constructor

    + new RenderError(err: Error, tpl: Template): RenderError

    Overrides LiquidError.constructor

    -

    Defined in util/error.ts:41

    +

    Defined in util/error.ts:41

    Parameters:

    @@ -116,7 +116,7 @@

    Returns: RenderError

    Properties

    context

    context: string

    Inherited from LiquidError.context

    -

    Defined in util/error.ts:7

    +

    Defined in util/error.ts:7


    message

    message: string

    Inherited from void

    @@ -132,11 +132,11 @@

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:975

    Methods

    Protected update

    update(): void

    Inherited from LiquidError.update

    -

    Defined in util/error.ts:15

    +

    Defined in util/error.ts:15

    Returns: void


    Static is

    is(obj: any): boolean

    -

    Defined in util/error.ts:48

    +

    Defined in util/error.ts:48

    Parameters:

    @@ -154,7 +154,7 @@
    - +
    diff --git a/api/classes/util_error_.tokenizationerror.html b/api/classes/util_error_.tokenizationerror.html index 1a19e4560..6a3f08aaa 100644 --- a/api/classes/util_error_.tokenizationerror.html +++ b/api/classes/util_error_.tokenizationerror.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: TokenizationError

    -
    +
    @@ -95,7 +95,7 @@

    TokenizationError

    Constructors

    constructor

    + new TokenizationError(message: string, token: Token): TokenizationError

    Overrides LiquidError.constructor

    -

    Defined in util/error.ts:24

    +

    Defined in util/error.ts:24

    Parameters:

    @@ -116,7 +116,7 @@

    Returns: TokenizationError

    Properties

    context

    context: string

    Inherited from LiquidError.context

    -

    Defined in util/error.ts:7

    +

    Defined in util/error.ts:7


    message

    message: string

    Inherited from void

    @@ -132,12 +132,12 @@

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:975

    Methods

    Protected update

    update(): void

    Inherited from LiquidError.update

    -

    Defined in util/error.ts:15

    +

    Defined in util/error.ts:15

    Returns: void

    - +
    diff --git a/api/classes/util_error_.undefinedvariableerror.html b/api/classes/util_error_.undefinedvariableerror.html index a54365138..37c265106 100644 --- a/api/classes/util_error_.undefinedvariableerror.html +++ b/api/classes/util_error_.undefinedvariableerror.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: UndefinedVariableError

    -
    +
    @@ -95,7 +95,7 @@

    UndefinedVariableError

    Constructors

    constructor

    + new UndefinedVariableError(err: Error, token: Token): UndefinedVariableError

    Overrides LiquidError.constructor

    -

    Defined in util/error.ts:53

    +

    Defined in util/error.ts:53

    Parameters:

    @@ -116,7 +116,7 @@

    Returns: UndefinedVariableError

    Properties

    context

    context: string

    Inherited from LiquidError.context

    -

    Defined in util/error.ts:7

    +

    Defined in util/error.ts:7


    message

    message: string

    Inherited from void

    @@ -132,12 +132,12 @@

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:975

    Methods

    Protected update

    update(): void

    Inherited from LiquidError.update

    -

    Defined in util/error.ts:15

    +

    Defined in util/error.ts:15

    Returns: void

    - +
    diff --git a/api/classes/util_strftime_.timezonedate.html b/api/classes/util_strftime_.timezonedate.html deleted file mode 100644 index 77c16831d..000000000 --- a/api/classes/util_strftime_.timezonedate.html +++ /dev/null @@ -1,829 +0,0 @@ - - - - - Class: TimezoneDate | LiquidJS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - -
    NameType
    dateStringstring
    -

    Returns: TimezoneDate

    -

    Properties

    ISO8601_TIMEZONE_PATTERN

    ISO8601_TIMEZONE_PATTERN: RegExp = /([zZ]|([+-])(\d{2}):(\d{2}))$/

    -

    Defined in util/strftime.ts:178

    -
    -

    dateString

    dateString: string

    -

    Defined in util/strftime.ts:182

    -
    -

    inputTimezoneOffset

    inputTimezoneOffset: number = 0

    -

    Defined in util/strftime.ts:180

    -
    -

    Static Date

    Date: DateConstructor

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:907

    -

    Methods

    __@toPrimitive

    __@toPrimitive(hint: “default”): string

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:109

    -

    Parameters:

    - - - - - - - - - - - -
    NameType
    hint“default”
    -

    Returns: string

    -

    __@toPrimitive(hint: “string”): string

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:113

    -

    Parameters:

    - - - - - - - - - - - -
    NameType
    hint“string”
    -

    Returns: string

    -

    __@toPrimitive(hint: “number”): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:117

    -

    Parameters:

    - - - - - - - - - - - -
    NameType
    hint“number”
    -

    Returns: number

    -

    __@toPrimitive(hint: string): string | number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:126

    -

    Parameters:

    - - - - - - - - - - - - - -
    NameTypeDescription
    hintstringThe strings “number”, “string”, or “default” to specify what primitive to return.
    -

    Returns: string | number

    -

    A number if ‘hint’ was “number”, a string if ‘hint’ was “string” or “default”.

    -
    -

    getDate

    getDate(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:755

    -

    Returns: number

    -
    -

    getDay

    getDay(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:759

    -

    Returns: number

    -
    -

    getDisplayDate

    getDisplayDate(): Date

    -

    Defined in util/strftime.ts:194

    -

    Returns: Date

    -
    -

    getFullYear

    getFullYear(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:747

    -

    Returns: number

    -
    -

    getHours

    getHours(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:763

    -

    Returns: number

    -
    -

    getMilliseconds

    getMilliseconds(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:775

    -

    Returns: number

    -
    -

    getMinutes

    getMinutes(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:767

    -

    Returns: number

    -
    -

    getMonth

    getMonth(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:751

    -

    Returns: number

    -
    -

    getSeconds

    getSeconds(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:771

    -

    Returns: number

    -
    -

    getTime

    getTime(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:745

    -

    Returns: number

    -
    -

    getTimezoneOffset

    getTimezoneOffset(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:779

    -

    Returns: number

    -
    -

    getUTCDate

    getUTCDate(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:757

    -

    Returns: number

    -
    -

    getUTCDay

    getUTCDay(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:761

    -

    Returns: number

    -
    -

    getUTCFullYear

    getUTCFullYear(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:749

    -

    Returns: number

    -
    -

    getUTCHours

    getUTCHours(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:765

    -

    Returns: number

    -
    -

    getUTCMilliseconds

    getUTCMilliseconds(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:777

    -

    Returns: number

    -
    -

    getUTCMinutes

    getUTCMinutes(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:769

    -

    Returns: number

    -
    -

    getUTCMonth

    getUTCMonth(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:753

    -

    Returns: number

    -
    -

    getUTCSeconds

    getUTCSeconds(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:773

    -

    Returns: number

    -
    -

    setDate

    setDate(date: number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:842

    -

    Parameters:

    - - - - - - - - - - - - - -
    NameTypeDescription
    datenumberA numeric value equal to the day of the month.
    -

    Returns: number

    -
    -

    setFullYear

    setFullYear(year: number, month?: undefined | number, date?: undefined | number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:866

    -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    yearnumberA numeric value for the year.
    month?undefined | numberA zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
    date?undefined | numberA numeric value equal for the day of the month.
    -

    Returns: number

    -
    -

    setHours

    setHours(hours: number, min?: undefined | number, sec?: undefined | number, ms?: undefined | number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:829

    -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    hoursnumberA numeric value equal to the hours value.
    min?undefined | numberA numeric value equal to the minutes value.
    sec?undefined | numberA numeric value equal to the seconds value.
    ms?undefined | numberA numeric value equal to the milliseconds value.
    -

    Returns: number

    -
    -

    setMilliseconds

    setMilliseconds(ms: number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:789

    -

    Parameters:

    - - - - - - - - - - - - - -
    NameTypeDescription
    msnumberA numeric value equal to the millisecond value.
    -

    Returns: number

    -
    -

    setMinutes

    setMinutes(min: number, sec?: undefined | number, ms?: undefined | number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:814

    -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    minnumberA numeric value equal to the minutes value.
    sec?undefined | numberA numeric value equal to the seconds value.
    ms?undefined | numberA numeric value equal to the milliseconds value.
    -

    Returns: number

    -
    -

    setMonth

    setMonth(month: number, date?: undefined | number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:853

    -

    Parameters:

    - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    monthnumberA numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
    date?undefined | numberA numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.
    -

    Returns: number

    -
    -

    setSeconds

    setSeconds(sec: number, ms?: undefined | number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:801

    -

    Parameters:

    - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    secnumberA numeric value equal to the seconds value.
    ms?undefined | numberA numeric value equal to the milliseconds value.
    -

    Returns: number

    -
    -

    setTime

    setTime(time: number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:784

    -

    Parameters:

    - - - - - - - - - - - - - -
    NameTypeDescription
    timenumberA numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
    -

    Returns: number

    -
    -

    setUTCDate

    setUTCDate(date: number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:847

    -

    Parameters:

    - - - - - - - - - - - - - -
    NameTypeDescription
    datenumberA numeric value equal to the day of the month.
    -

    Returns: number

    -
    -

    setUTCFullYear

    setUTCFullYear(year: number, month?: undefined | number, date?: undefined | number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:873

    -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    yearnumberA numeric value equal to the year.
    month?undefined | numberA numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.
    date?undefined | numberA numeric value equal to the day of the month.
    -

    Returns: number

    -
    -

    setUTCHours

    setUTCHours(hours: number, min?: undefined | number, sec?: undefined | number, ms?: undefined | number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:837

    -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    hoursnumberA numeric value equal to the hours value.
    min?undefined | numberA numeric value equal to the minutes value.
    sec?undefined | numberA numeric value equal to the seconds value.
    ms?undefined | numberA numeric value equal to the milliseconds value.
    -

    Returns: number

    -
    -

    setUTCMilliseconds

    setUTCMilliseconds(ms: number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:794

    -

    Parameters:

    - - - - - - - - - - - - - -
    NameTypeDescription
    msnumberA numeric value equal to the millisecond value.
    -

    Returns: number

    -
    -

    setUTCMinutes

    setUTCMinutes(min: number, sec?: undefined | number, ms?: undefined | number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:821

    -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    minnumberA numeric value equal to the minutes value.
    sec?undefined | numberA numeric value equal to the seconds value.
    ms?undefined | numberA numeric value equal to the milliseconds value.
    -

    Returns: number

    -
    -

    setUTCMonth

    setUTCMonth(month: number, date?: undefined | number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:859

    -

    Parameters:

    - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    monthnumberA numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
    date?undefined | numberA numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.
    -

    Returns: number

    -
    -

    setUTCSeconds

    setUTCSeconds(sec: number, ms?: undefined | number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:807

    -

    Parameters:

    - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    secnumberA numeric value equal to the seconds value.
    ms?undefined | numberA numeric value equal to the milliseconds value.
    -

    Returns: number

    -
    -

    toDateString

    toDateString(): string

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:733

    -

    Returns: string

    -
    -

    toISOString

    toISOString(): string

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:877

    -

    Returns: string

    -
    -

    toJSON

    toJSON(key?: any): string

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:879

    -

    Parameters:

    - - - - - - - - - - - -
    NameType
    key?any
    -

    Returns: string

    -
    -

    toLocaleDateString

    toLocaleDateString(): string

    -

    Inherited from void

    -

    Overrides void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:739

    -

    Returns: string

    -
    -

    toLocaleString

    toLocaleString(): string

    -

    Inherited from void

    -

    Overrides void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:737

    -

    Returns: string

    -
    -

    toLocaleTimeString

    toLocaleTimeString(): string

    -

    Inherited from void

    -

    Overrides void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:741

    -

    Returns: string

    -
    -

    toString

    toString(): string

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:731

    -

    Returns: string

    -
    -

    toTimeString

    toTimeString(): string

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:735

    -

    Returns: string

    -
    -

    toUTCString

    toUTCString(): string

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:875

    -

    Returns: string

    -
    -

    valueOf

    valueOf(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:743

    -

    Returns: number

    - -
    - - - - - - - - - - - - - -
    - - - - - - - - - - - \ No newline at end of file diff --git a/api/enums/context_block_mode_.blockmode.html b/api/enums/context_block_mode_.blockmode.html index 08943c345..55bd0aa8c 100644 --- a/api/enums/context_block_mode_.blockmode.html +++ b/api/enums/context_block_mode_.blockmode.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,19 +87,19 @@

    Enumeration: BlockMode

    -
    +

    Enumeration members

    OUTPUT

    OUTPUT:

    -

    Defined in context/block-mode.ts:3

    +

    Defined in context/block-mode.ts:3


    STORE

    STORE:

    -

    Defined in context/block-mode.ts:5

    +

    Defined in context/block-mode.ts:5

    diff --git a/api/enums/parser_token_kind_.tokenkind.html b/api/enums/parser_token_kind_.tokenkind.html index 49a597902..e722879e2 100644 --- a/api/enums/parser_token_kind_.tokenkind.html +++ b/api/enums/parser_token_kind_.tokenkind.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,52 +87,52 @@

    Enumeration: TokenKind

    -
    +

    Enumeration members

    Delimited

    Delimited: = Tag | Output

    -

    Defined in parser/token-kind.ts:14

    +

    Defined in parser/token-kind.ts:14


    Filter

    Filter: = 32

    -

    Defined in parser/token-kind.ts:7

    +

    Defined in parser/token-kind.ts:7


    HTML

    HTML: = 16

    -

    Defined in parser/token-kind.ts:6

    +

    Defined in parser/token-kind.ts:6


    Hash

    Hash: = 64

    -

    Defined in parser/token-kind.ts:8

    +

    Defined in parser/token-kind.ts:8


    Literal

    Literal: = 2

    -

    Defined in parser/token-kind.ts:3

    +

    Defined in parser/token-kind.ts:3


    Number

    Number: = 1

    -

    Defined in parser/token-kind.ts:2

    +

    Defined in parser/token-kind.ts:2


    Operator

    Operator: = 2048

    -

    Defined in parser/token-kind.ts:13

    +

    Defined in parser/token-kind.ts:13


    Output

    Output: = 8

    -

    Defined in parser/token-kind.ts:5

    +

    Defined in parser/token-kind.ts:5


    PropertyAccess

    PropertyAccess: = 128

    -

    Defined in parser/token-kind.ts:9

    +

    Defined in parser/token-kind.ts:9


    Quoted

    Quoted: = 1024

    -

    Defined in parser/token-kind.ts:12

    +

    Defined in parser/token-kind.ts:12


    Range

    Range: = 512

    -

    Defined in parser/token-kind.ts:11

    +

    Defined in parser/token-kind.ts:11


    Tag

    Tag: = 4

    -

    Defined in parser/token-kind.ts:4

    +

    Defined in parser/token-kind.ts:4


    Word

    Word: = 256

    -

    Defined in parser/token-kind.ts:10

    +

    Defined in parser/token-kind.ts:10

    diff --git a/api/globals.html b/api/globals.html index fba05d6c8..990f76d36 100644 --- a/api/globals.html +++ b/api/globals.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    liquidjs

    -
    +
    diff --git a/api/interfaces/cache_cache_.cache.html b/api/interfaces/cache_cache_.cache.html index 809b65ae1..2ffb9ef6d 100644 --- a/api/interfaces/cache_cache_.cache.html +++ b/api/interfaces/cache_cache_.cache.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: Cache <T>

    -
    +
    @@ -99,7 +99,7 @@
  • LRU
  • Methods

    read

    read(key: string): T | undefined | Promise‹T | undefined›

    -

    Defined in cache/cache.ts:3

    +

    Defined in cache/cache.ts:3

    Parameters:

    @@ -116,7 +116,7 @@

    Returns: T | undefined | Promise‹T | undefined›


    write

    write(key: string, value: T): void | Promise‹void›

    -

    Defined in cache/cache.ts:2

    +

    Defined in cache/cache.ts:2

    Parameters:

    @@ -138,7 +138,7 @@
    - +
    diff --git a/api/interfaces/context_scope_.plainobject.html b/api/interfaces/context_scope_.plainobject.html index f264605ca..2232d5ceb 100644 --- a/api/interfaces/context_scope_.plainobject.html +++ b/api/interfaces/context_scope_.plainobject.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: PlainObject

    -
    +
    @@ -98,11 +98,11 @@
  • [ key: string]: any
  • Properties

    Optional toLiquid

    toLiquid? : undefined | function

    -

    Defined in context/scope.ts:5

    +

    Defined in context/scope.ts:5

    - +
    diff --git a/api/interfaces/drop_comparable_.comparable.html b/api/interfaces/drop_comparable_.comparable.html index a02bfbb26..058af51ca 100644 --- a/api/interfaces/drop_comparable_.comparable.html +++ b/api/interfaces/drop_comparable_.comparable.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: Comparable

    -
    +
    @@ -100,7 +100,7 @@
  • NullDrop
  • Properties

    equals

    equals: function

    -

    Defined in drop/comparable.ts:4

    +

    Defined in drop/comparable.ts:4

    Type declaration:

    ▸ (rhs: any): boolean

    Parameters:

    @@ -117,7 +117,7 @@

    geq

    geq: function

    -

    Defined in drop/comparable.ts:6

    +

    Defined in drop/comparable.ts:6

    Type declaration:

    ▸ (rhs: any): boolean

    Parameters:

    @@ -134,7 +134,7 @@

    gt

    gt: function

    -

    Defined in drop/comparable.ts:5

    +

    Defined in drop/comparable.ts:5

    Type declaration:

    ▸ (rhs: any): boolean

    Parameters:

    @@ -151,7 +151,7 @@

    leq

    leq: function

    -

    Defined in drop/comparable.ts:8

    +

    Defined in drop/comparable.ts:8

    Type declaration:

    ▸ (rhs: any): boolean

    Parameters:

    @@ -168,7 +168,7 @@

    lt

    lt: function

    -

    Defined in drop/comparable.ts:7

    +

    Defined in drop/comparable.ts:7

    Type declaration:

    ▸ (rhs: any): boolean

    Parameters:

    @@ -186,7 +186,7 @@
    - +
    diff --git a/api/interfaces/emitters_emitter_.emitter.html b/api/interfaces/emitters_emitter_.emitter.html new file mode 100644 index 000000000..084b2dc29 --- /dev/null +++ b/api/interfaces/emitters_emitter_.emitter.html @@ -0,0 +1,202 @@ + + + + + Interface: Emitter | LiquidJS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + +
    NameType
    htmlany
    +

    Returns: void

    + +
    + + + + + + + + + + + + + +
    + + + + + + + + + + + \ No newline at end of file diff --git a/api/interfaces/fs_fs_.fs.html b/api/interfaces/fs_fs_.fs.html index 4f0757e89..7aeb973ae 100644 --- a/api/interfaces/fs_fs_.fs.html +++ b/api/interfaces/fs_fs_.fs.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: FS

    -
    +
    @@ -95,7 +95,7 @@
  • FS
  • Properties

    exists

    exists: function

    -

    Defined in fs/fs.ts:2

    +

    Defined in fs/fs.ts:2

    Type declaration:

    ▸ (filepath: string): Promise‹boolean›

    Parameters:

    @@ -112,7 +112,7 @@

    existsSync

    existsSync: function

    -

    Defined in fs/fs.ts:4

    +

    Defined in fs/fs.ts:4

    Type declaration:

    ▸ (filepath: string): boolean

    Parameters:

    @@ -129,10 +129,10 @@

    Optional fallback

    fallback? : undefined | function

    -

    Defined in fs/fs.ts:7

    +

    Defined in fs/fs.ts:7


    readFile

    readFile: function

    -

    Defined in fs/fs.ts:3

    +

    Defined in fs/fs.ts:3

    Type declaration:

    ▸ (filepath: string): Promise‹string›

    Parameters:

    @@ -149,7 +149,7 @@

    readFileSync

    readFileSync: function

    -

    Defined in fs/fs.ts:5

    +

    Defined in fs/fs.ts:5

    Type declaration:

    ▸ (filepath: string): string

    Parameters:

    @@ -166,7 +166,7 @@

    resolve

    resolve: function

    -

    Defined in fs/fs.ts:6

    +

    Defined in fs/fs.ts:6

    Type declaration:

    ▸ (root: string, file: string, ext: string): string

    Parameters:

    @@ -192,7 +192,7 @@
    - +
    diff --git a/api/interfaces/liquid_options_.liquidoptions.html b/api/interfaces/liquid_options_.liquidoptions.html index e6f77001d..7d16b1e27 100644 --- a/api/interfaces/liquid_options_.liquidoptions.html +++ b/api/interfaces/liquid_options_.liquidoptions.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: LiquidOptions

    -
    +
    @@ -97,74 +97,80 @@

    Properties

    Optional cache

    cache? : boolean | number | CacheTemplate[]›

    -

    Defined in liquid-options.ts:16

    +

    Defined in liquid-options.ts:17


    Optional dynamicPartials

    dynamicPartials? : undefined | false | true

    -

    Defined in liquid-options.ts:20

    +

    Defined in liquid-options.ts:21


    Optional extname

    extname? : undefined | string

    -

    Defined in liquid-options.ts:14

    +

    Defined in liquid-options.ts:15


    Optional fs

    fs? : FS

    -

    Defined in liquid-options.ts:48

    +

    Defined in liquid-options.ts:51


    Optional globals

    globals? : undefined | object

    -

    Defined in liquid-options.ts:50

    +

    Defined in liquid-options.ts:53


    Optional greedy

    greedy? : undefined | false | true

    -

    Defined in liquid-options.ts:46

    +

    Defined in liquid-options.ts:49


    Optional jsTruthy

    jsTruthy? : undefined | false | true

    -

    Defined in liquid-options.ts:18

    +

    Defined in liquid-options.ts:19


    Optional keepOutputType

    keepOutputType? : undefined | false | true

    -

    Defined in liquid-options.ts:52

    +

    Defined in liquid-options.ts:55


    Optional lenientIf

    lenientIf? : undefined | false | true

    -

    Defined in liquid-options.ts:26

    +

    Defined in liquid-options.ts:27


    Optional operators

    operators? : Operators

    -

    Defined in liquid-options.ts:54

    +

    Defined in liquid-options.ts:57

    +
    +

    Optional orderedFilterParameters

    orderedFilterParameters? : undefined | false | true

    +

    Defined in liquid-options.ts:59


    Optional outputDelimiterLeft

    outputDelimiterLeft? : undefined | string

    -

    Defined in liquid-options.ts:40

    +

    Defined in liquid-options.ts:43


    Optional outputDelimiterRight

    outputDelimiterRight? : undefined | string

    -

    Defined in liquid-options.ts:42

    +

    Defined in liquid-options.ts:45


    Optional preserveTimezones

    preserveTimezones? : undefined | false | true

    -

    Defined in liquid-options.ts:44

    +

    Defined in liquid-options.ts:47


    Optional root

    root? : string | string[]

    -

    Defined in liquid-options.ts:12

    +

    Defined in liquid-options.ts:13


    Optional strictFilters

    strictFilters? : undefined | false | true

    -

    Defined in liquid-options.ts:22

    +

    Defined in liquid-options.ts:23


    Optional strictVariables

    strictVariables? : undefined | false | true

    -

    Defined in liquid-options.ts:24

    +

    Defined in liquid-options.ts:25


    Optional tagDelimiterLeft

    tagDelimiterLeft? : undefined | string

    -

    Defined in liquid-options.ts:36

    +

    Defined in liquid-options.ts:39


    Optional tagDelimiterRight

    tagDelimiterRight? : undefined | string

    -

    Defined in liquid-options.ts:38

    +

    Defined in liquid-options.ts:41

    +
    +

    Optional timezoneOffset

    timezoneOffset? : undefined | number

    +

    Defined in liquid-options.ts:29


    Optional trimOutputLeft

    trimOutputLeft? : undefined | false | true

    -

    Defined in liquid-options.ts:34

    +

    Defined in liquid-options.ts:37


    Optional trimOutputRight

    trimOutputRight? : undefined | false | true

    -

    Defined in liquid-options.ts:32

    +

    Defined in liquid-options.ts:35


    Optional trimTagLeft

    trimTagLeft? : undefined | false | true

    -

    Defined in liquid-options.ts:30

    +

    Defined in liquid-options.ts:33


    Optional trimTagRight

    trimTagRight? : undefined | false | true

    -

    Defined in liquid-options.ts:28

    +

    Defined in liquid-options.ts:31

    - +
    @@ -173,7 +179,7 @@
    Contents -
    1. Hierarchy
    2. Properties
      1. Optional cache
      2. Optional dynamicPartials
      3. Optional extname
      4. Optional fs
      5. Optional globals
      6. Optional greedy
      7. Optional jsTruthy
      8. Optional keepOutputType
      9. Optional lenientIf
      10. Optional operators
      11. Optional outputDelimiterLeft
      12. Optional outputDelimiterRight
      13. Optional preserveTimezones
      14. Optional root
      15. Optional strictFilters
      16. Optional strictVariables
      17. Optional tagDelimiterLeft
      18. Optional tagDelimiterRight
      19. Optional trimOutputLeft
      20. Optional trimOutputRight
      21. Optional trimTagLeft
      22. Optional trimTagRight
    +
    1. Hierarchy
    2. Properties
      1. Optional cache
      2. Optional dynamicPartials
      3. Optional extname
      4. Optional fs
      5. Optional globals
      6. Optional greedy
      7. Optional jsTruthy
      8. Optional keepOutputType
      9. Optional lenientIf
      10. Optional operators
      11. Optional orderedFilterParameters
      12. Optional outputDelimiterLeft
      13. Optional outputDelimiterRight
      14. Optional preserveTimezones
      15. Optional root
      16. Optional strictFilters
      17. Optional strictVariables
      18. Optional tagDelimiterLeft
      19. Optional tagDelimiterRight
      20. Optional timezoneOffset
      21. Optional trimOutputLeft
      22. Optional trimOutputRight
      23. Optional trimTagLeft
      24. Optional trimTagRight
    Back to Top
    diff --git a/api/interfaces/liquid_options_.normalizedfulloptions.html b/api/interfaces/liquid_options_.normalizedfulloptions.html index 71ab1519c..e2a92a2af 100644 --- a/api/interfaces/liquid_options_.normalizedfulloptions.html +++ b/api/interfaces/liquid_options_.normalizedfulloptions.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: NormalizedFullOptions

    -
    +
    @@ -95,99 +95,107 @@

    NormalizedFullOptions

    Properties

    cache

    cache: undefined | CacheTemplate[]›

    Overrides NormalizedOptions.cache

    -

    Defined in liquid-options.ts:66

    +

    Defined in liquid-options.ts:71


    dynamicPartials

    dynamicPartials: boolean

    Overrides LiquidOptions.dynamicPartials

    -

    Defined in liquid-options.ts:68

    +

    Defined in liquid-options.ts:73


    extname

    extname: string

    Overrides LiquidOptions.extname

    -

    Defined in liquid-options.ts:65

    +

    Defined in liquid-options.ts:70


    fs

    fs: FS

    Overrides LiquidOptions.fs

    -

    Defined in liquid-options.ts:69

    +

    Defined in liquid-options.ts:74


    globals

    globals: object

    Overrides LiquidOptions.globals

    -

    Defined in liquid-options.ts:83

    +

    Defined in liquid-options.ts:88


    greedy

    greedy: boolean

    Overrides LiquidOptions.greedy

    -

    Defined in liquid-options.ts:82

    +

    Defined in liquid-options.ts:87


    jsTruthy

    jsTruthy: boolean

    Overrides LiquidOptions.jsTruthy

    -

    Defined in liquid-options.ts:67

    +

    Defined in liquid-options.ts:72


    keepOutputType

    keepOutputType: boolean

    Overrides LiquidOptions.keepOutputType

    -

    Defined in liquid-options.ts:84

    +

    Defined in liquid-options.ts:89


    lenientIf

    lenientIf: boolean

    Overrides LiquidOptions.lenientIf

    -

    Defined in liquid-options.ts:72

    +

    Defined in liquid-options.ts:77


    operators

    operators: Operators

    Overrides LiquidOptions.operators

    -

    Defined in liquid-options.ts:85

    +

    Defined in liquid-options.ts:90


    operatorsTrie

    operatorsTrie: Trie

    Overrides NormalizedOptions.operatorsTrie

    -

    Defined in liquid-options.ts:86

    +

    Defined in liquid-options.ts:91

    +
    +

    Optional orderedFilterParameters

    orderedFilterParameters? : undefined | false | true

    +

    Inherited from LiquidOptions.orderedFilterParameters

    +

    Defined in liquid-options.ts:59


    outputDelimiterLeft

    outputDelimiterLeft: string

    Overrides LiquidOptions.outputDelimiterLeft

    -

    Defined in liquid-options.ts:79

    +

    Defined in liquid-options.ts:84


    outputDelimiterRight

    outputDelimiterRight: string

    Overrides LiquidOptions.outputDelimiterRight

    -

    Defined in liquid-options.ts:80

    +

    Defined in liquid-options.ts:85


    preserveTimezones

    preserveTimezones: boolean

    Overrides LiquidOptions.preserveTimezones

    -

    Defined in liquid-options.ts:81

    +

    Defined in liquid-options.ts:86


    root

    root: string[]

    Overrides NormalizedOptions.root

    -

    Defined in liquid-options.ts:64

    +

    Defined in liquid-options.ts:69


    strictFilters

    strictFilters: boolean

    Overrides LiquidOptions.strictFilters

    -

    Defined in liquid-options.ts:70

    +

    Defined in liquid-options.ts:75


    strictVariables

    strictVariables: boolean

    Overrides LiquidOptions.strictVariables

    -

    Defined in liquid-options.ts:71

    +

    Defined in liquid-options.ts:76


    tagDelimiterLeft

    tagDelimiterLeft: string

    Overrides LiquidOptions.tagDelimiterLeft

    -

    Defined in liquid-options.ts:77

    +

    Defined in liquid-options.ts:82


    tagDelimiterRight

    tagDelimiterRight: string

    Overrides LiquidOptions.tagDelimiterRight

    -

    Defined in liquid-options.ts:78

    +

    Defined in liquid-options.ts:83

    +
    +

    Optional timezoneOffset

    timezoneOffset? : undefined | number

    +

    Inherited from LiquidOptions.timezoneOffset

    +

    Defined in liquid-options.ts:29


    trimOutputLeft

    trimOutputLeft: boolean

    Overrides LiquidOptions.trimOutputLeft

    -

    Defined in liquid-options.ts:76

    +

    Defined in liquid-options.ts:81


    trimOutputRight

    trimOutputRight: boolean

    Overrides LiquidOptions.trimOutputRight

    -

    Defined in liquid-options.ts:75

    +

    Defined in liquid-options.ts:80


    trimTagLeft

    trimTagLeft: boolean

    Overrides LiquidOptions.trimTagLeft

    -

    Defined in liquid-options.ts:74

    +

    Defined in liquid-options.ts:79


    trimTagRight

    trimTagRight: boolean

    Overrides LiquidOptions.trimTagRight

    -

    Defined in liquid-options.ts:73

    +

    Defined in liquid-options.ts:78

    - +
    @@ -196,7 +204,7 @@
    Contents -
    1. Hierarchy
    2. Properties
      1. cache
      2. dynamicPartials
      3. extname
      4. fs
      5. globals
      6. greedy
      7. jsTruthy
      8. keepOutputType
      9. lenientIf
      10. operators
      11. operatorsTrie
      12. outputDelimiterLeft
      13. outputDelimiterRight
      14. preserveTimezones
      15. root
      16. strictFilters
      17. strictVariables
      18. tagDelimiterLeft
      19. tagDelimiterRight
      20. trimOutputLeft
      21. trimOutputRight
      22. trimTagLeft
      23. trimTagRight
    +
    1. Hierarchy
    2. Properties
      1. cache
      2. dynamicPartials
      3. extname
      4. fs
      5. globals
      6. greedy
      7. jsTruthy
      8. keepOutputType
      9. lenientIf
      10. operators
      11. operatorsTrie
      12. Optional orderedFilterParameters
      13. outputDelimiterLeft
      14. outputDelimiterRight
      15. preserveTimezones
      16. root
      17. strictFilters
      18. strictVariables
      19. tagDelimiterLeft
      20. tagDelimiterRight
      21. Optional timezoneOffset
      22. trimOutputLeft
      23. trimOutputRight
      24. trimTagLeft
      25. trimTagRight
    Back to Top
    diff --git a/api/interfaces/liquid_options_.normalizedoptions.html b/api/interfaces/liquid_options_.normalizedoptions.html index 167c52aa9..9a99d2050 100644 --- a/api/interfaces/liquid_options_.normalizedoptions.html +++ b/api/interfaces/liquid_options_.normalizedoptions.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: NormalizedOptions

    -
    +
    @@ -99,98 +99,106 @@

    Properties

    Optional cache

    cache? : CacheTemplate[]›

    Overrides LiquidOptions.cache

    -

    Defined in liquid-options.ts:59

    +

    Defined in liquid-options.ts:64


    Optional dynamicPartials

    dynamicPartials? : undefined | false | true

    Inherited from LiquidOptions.dynamicPartials

    -

    Defined in liquid-options.ts:20

    +

    Defined in liquid-options.ts:21


    Optional extname

    extname? : undefined | string

    Inherited from LiquidOptions.extname

    -

    Defined in liquid-options.ts:14

    +

    Defined in liquid-options.ts:15


    Optional fs

    fs? : FS

    Inherited from LiquidOptions.fs

    -

    Defined in liquid-options.ts:48

    +

    Defined in liquid-options.ts:51


    Optional globals

    globals? : undefined | object

    Inherited from LiquidOptions.globals

    -

    Defined in liquid-options.ts:50

    +

    Defined in liquid-options.ts:53


    Optional greedy

    greedy? : undefined | false | true

    Inherited from LiquidOptions.greedy

    -

    Defined in liquid-options.ts:46

    +

    Defined in liquid-options.ts:49


    Optional jsTruthy

    jsTruthy? : undefined | false | true

    Inherited from LiquidOptions.jsTruthy

    -

    Defined in liquid-options.ts:18

    +

    Defined in liquid-options.ts:19


    Optional keepOutputType

    keepOutputType? : undefined | false | true

    Inherited from LiquidOptions.keepOutputType

    -

    Defined in liquid-options.ts:52

    +

    Defined in liquid-options.ts:55


    Optional lenientIf

    lenientIf? : undefined | false | true

    Inherited from LiquidOptions.lenientIf

    -

    Defined in liquid-options.ts:26

    +

    Defined in liquid-options.ts:27


    Optional operators

    operators? : Operators

    Inherited from LiquidOptions.operators

    -

    Defined in liquid-options.ts:54

    +

    Defined in liquid-options.ts:57


    Optional operatorsTrie

    operatorsTrie? : Trie

    -

    Defined in liquid-options.ts:60

    +

    Defined in liquid-options.ts:65

    +
    +

    Optional orderedFilterParameters

    orderedFilterParameters? : undefined | false | true

    +

    Inherited from LiquidOptions.orderedFilterParameters

    +

    Defined in liquid-options.ts:59


    Optional outputDelimiterLeft

    outputDelimiterLeft? : undefined | string

    Inherited from LiquidOptions.outputDelimiterLeft

    -

    Defined in liquid-options.ts:40

    +

    Defined in liquid-options.ts:43


    Optional outputDelimiterRight

    outputDelimiterRight? : undefined | string

    Inherited from LiquidOptions.outputDelimiterRight

    -

    Defined in liquid-options.ts:42

    +

    Defined in liquid-options.ts:45


    Optional preserveTimezones

    preserveTimezones? : undefined | false | true

    Inherited from LiquidOptions.preserveTimezones

    -

    Defined in liquid-options.ts:44

    +

    Defined in liquid-options.ts:47


    Optional root

    root? : string[]

    Overrides LiquidOptions.root

    -

    Defined in liquid-options.ts:58

    +

    Defined in liquid-options.ts:63


    Optional strictFilters

    strictFilters? : undefined | false | true

    Inherited from LiquidOptions.strictFilters

    -

    Defined in liquid-options.ts:22

    +

    Defined in liquid-options.ts:23


    Optional strictVariables

    strictVariables? : undefined | false | true

    Inherited from LiquidOptions.strictVariables

    -

    Defined in liquid-options.ts:24

    +

    Defined in liquid-options.ts:25


    Optional tagDelimiterLeft

    tagDelimiterLeft? : undefined | string

    Inherited from LiquidOptions.tagDelimiterLeft

    -

    Defined in liquid-options.ts:36

    +

    Defined in liquid-options.ts:39


    Optional tagDelimiterRight

    tagDelimiterRight? : undefined | string

    Inherited from LiquidOptions.tagDelimiterRight

    -

    Defined in liquid-options.ts:38

    +

    Defined in liquid-options.ts:41

    +
    +

    Optional timezoneOffset

    timezoneOffset? : undefined | number

    +

    Inherited from LiquidOptions.timezoneOffset

    +

    Defined in liquid-options.ts:29


    Optional trimOutputLeft

    trimOutputLeft? : undefined | false | true

    Inherited from LiquidOptions.trimOutputLeft

    -

    Defined in liquid-options.ts:34

    +

    Defined in liquid-options.ts:37


    Optional trimOutputRight

    trimOutputRight? : undefined | false | true

    Inherited from LiquidOptions.trimOutputRight

    -

    Defined in liquid-options.ts:32

    +

    Defined in liquid-options.ts:35


    Optional trimTagLeft

    trimTagLeft? : undefined | false | true

    Inherited from LiquidOptions.trimTagLeft

    -

    Defined in liquid-options.ts:30

    +

    Defined in liquid-options.ts:33


    Optional trimTagRight

    trimTagRight? : undefined | false | true

    Inherited from LiquidOptions.trimTagRight

    -

    Defined in liquid-options.ts:28

    +

    Defined in liquid-options.ts:31

    - +
    @@ -199,7 +207,7 @@
    Contents -
    1. Hierarchy
    2. Properties
      1. Optional cache
      2. Optional dynamicPartials
      3. Optional extname
      4. Optional fs
      5. Optional globals
      6. Optional greedy
      7. Optional jsTruthy
      8. Optional keepOutputType
      9. Optional lenientIf
      10. Optional operators
      11. Optional operatorsTrie
      12. Optional outputDelimiterLeft
      13. Optional outputDelimiterRight
      14. Optional preserveTimezones
      15. Optional root
      16. Optional strictFilters
      17. Optional strictVariables
      18. Optional tagDelimiterLeft
      19. Optional tagDelimiterRight
      20. Optional trimOutputLeft
      21. Optional trimOutputRight
      22. Optional trimTagLeft
      23. Optional trimTagRight
    +
    1. Hierarchy
    2. Properties
      1. Optional cache
      2. Optional dynamicPartials
      3. Optional extname
      4. Optional fs
      5. Optional globals
      6. Optional greedy
      7. Optional jsTruthy
      8. Optional keepOutputType
      9. Optional lenientIf
      10. Optional operators
      11. Optional operatorsTrie
      12. Optional orderedFilterParameters
      13. Optional outputDelimiterLeft
      14. Optional outputDelimiterRight
      15. Optional preserveTimezones
      16. Optional root
      17. Optional strictFilters
      18. Optional strictVariables
      19. Optional tagDelimiterLeft
      20. Optional tagDelimiterRight
      21. Optional timezoneOffset
      22. Optional trimOutputLeft
      23. Optional trimOutputRight
      24. Optional trimTagLeft
      25. Optional trimTagRight
    Back to Top
    diff --git a/api/interfaces/render_emitter_.emitter.html b/api/interfaces/render_emitter_.emitter.html new file mode 100644 index 000000000..ded454ead --- /dev/null +++ b/api/interfaces/render_emitter_.emitter.html @@ -0,0 +1,205 @@ + + + + + Interface: Emitter | LiquidJS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +
    NameTypeDescription
    htmlanystring, Drop or other primitive value
    +

    Returns: void

    + +
    + + + + + + + + + + + + + +
    + + + + + + + + + + + \ No newline at end of file diff --git a/api/interfaces/render_operator_.operators.html b/api/interfaces/render_operator_.operators.html index 30a2fc13d..83ea209e3 100644 --- a/api/interfaces/render_operator_.operators.html +++ b/api/interfaces/render_operator_.operators.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: Operators

    -
    +
    @@ -122,7 +122,7 @@
    diff --git a/api/interfaces/template_filter_filter_impl_.filterimpl.html b/api/interfaces/template_filter_filter_impl_.filterimpl.html index 9418bc3b5..c1cf11f89 100644 --- a/api/interfaces/template_filter_filter_impl_.filterimpl.html +++ b/api/interfaces/template_filter_filter_impl_.filterimpl.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: FilterImpl

    -
    +
    @@ -95,14 +95,14 @@
  • FilterImpl
  • Properties

    context

    context: Context

    -

    Defined in template/filter/filter-impl.ts:5

    +

    Defined in template/filter/filter-impl.ts:5


    liquid

    liquid: Liquid

    -

    Defined in template/filter/filter-impl.ts:6

    +

    Defined in template/filter/filter-impl.ts:6

    diff --git a/api/interfaces/template_filter_filter_impl_options_.filterimploptions.html b/api/interfaces/template_filter_filter_impl_options_.filterimploptions.html index 729c67d6f..75e093094 100644 --- a/api/interfaces/template_filter_filter_impl_options_.filterimploptions.html +++ b/api/interfaces/template_filter_filter_impl_options_.filterimploptions.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: FilterImplOptions

    -
    +
    @@ -95,7 +95,7 @@
  • FilterImplOptions
  • Callable

    ▸ (this: FilterImpl, value: any, …args: any[]): any

    -

    Defined in template/filter/filter-impl-options.ts:3

    +

    Defined in template/filter/filter-impl-options.ts:3

    Parameters:

    @@ -121,7 +121,7 @@
    - +
    diff --git a/api/interfaces/template_tag_tag_impl_.tagimpl.html b/api/interfaces/template_tag_tag_impl_.tagimpl.html index e6ae9a3bb..8fefded66 100644 --- a/api/interfaces/template_tag_tag_impl_.tagimpl.html +++ b/api/interfaces/template_tag_tag_impl_.tagimpl.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: TagImpl

    -
    +
    @@ -100,16 +100,16 @@
  • [ key: string]: any
  • Properties

    liquid

    liquid: Liquid

    -

    Defined in template/tag/tag-impl.ts:5

    +

    Defined in template/tag/tag-impl.ts:5


    Optional parse

    parse? : undefined | function

    Inherited from TagImplOptions.parse

    -

    Defined in template/tag/tag-impl-options.ts:9

    +

    Defined in template/tag/tag-impl-options.ts:9


    render

    render: function

    Inherited from TagImplOptions.render

    -

    Defined in template/tag/tag-impl-options.ts:10

    -

    Type declaration:

    ▸ (this: TagImpl, ctx: Context, emitter: Emitter, hash: Hash): any

    +

    Defined in template/tag/tag-impl-options.ts:10

    +

    Type declaration:

    ▸ (this: TagImpl, ctx: Context, emitter: Emitter, hash: Hash): any

    Parameters:

    @@ -128,7 +128,7 @@ - + @@ -138,7 +138,7 @@
    - +
    diff --git a/api/interfaces/template_tag_tag_impl_options_.tagimploptions.html b/api/interfaces/template_tag_tag_impl_options_.tagimploptions.html index ca6385eeb..52c351be4 100644 --- a/api/interfaces/template_tag_tag_impl_options_.tagimploptions.html +++ b/api/interfaces/template_tag_tag_impl_options_.tagimploptions.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: TagImplOptions

    -
    +
    @@ -97,11 +97,11 @@

    Properties

    Optional parse

    parse? : undefined | function

    -

    Defined in template/tag/tag-impl-options.ts:9

    +

    Defined in template/tag/tag-impl-options.ts:9


    render

    render: function

    -

    Defined in template/tag/tag-impl-options.ts:10

    -

    Type declaration:

    ▸ (this: TagImpl, ctx: Context, emitter: Emitter, hash: Hash): any

    +

    Defined in template/tag/tag-impl-options.ts:10

    +

    Type declaration:

    ▸ (this: TagImpl, ctx: Context, emitter: Emitter, hash: Hash): any

    Parameters:

    emitterEmitterEmitter
    hash
    @@ -120,7 +120,7 @@ - + @@ -130,7 +130,7 @@
    - +
    diff --git a/api/interfaces/template_template_.template.html b/api/interfaces/template_template_.template.html index 2b15412df..240f0dc04 100644 --- a/api/interfaces/template_template_.template.html +++ b/api/interfaces/template_template_.template.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: Template

    -
    +
    @@ -100,9 +100,9 @@
  • Tag
  • Properties

    token

    token: Token

    -

    Defined in template/template.ts:6

    -

    Methods

    render

    render(ctx: Context, emitter: Emitter): any

    -

    Defined in template/template.ts:7

    +

    Defined in template/template.ts:6

    +

    Methods

    render

    render(ctx: Context, emitter: Emitter): any

    +

    Defined in template/template.ts:7

    Parameters:

    emitterEmitterEmitter
    hash
    @@ -117,14 +117,14 @@ - +
    emitterEmitterEmitter

    Returns: any

    diff --git a/api/interfaces/util_async_.thenable.html b/api/interfaces/util_async_.thenable.html index 1f9106287..a8d232356 100644 --- a/api/interfaces/util_async_.thenable.html +++ b/api/interfaces/util_async_.thenable.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: Thenable

    -
    +
    @@ -95,7 +95,7 @@
  • Thenable
  • Methods

    catch

    catch(reject: resolver): Thenable

    -

    Defined in util/async.ts:7

    +

    Defined in util/async.ts:7

    Parameters:

    @@ -112,7 +112,7 @@

    Returns: Thenable


    then

    then(resolve: resolver, reject?: resolver): Thenable

    -

    Defined in util/async.ts:6

    +

    Defined in util/async.ts:6

    Parameters:

    @@ -134,7 +134,7 @@
    - +
    diff --git a/api/interfaces/util_operator_trie_.trie.html b/api/interfaces/util_operator_trie_.trie.html index 6a58f5cca..192373e91 100644 --- a/api/interfaces/util_operator_trie_.trie.html +++ b/api/interfaces/util_operator_trie_.trie.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: Trie

    -
    +
    @@ -100,7 +100,7 @@
    - +
    diff --git a/api/interfaces/util_strftime_.formatoptions.html b/api/interfaces/util_strftime_.formatoptions.html index 4fd3735ba..ceb06b26c 100644 --- a/api/interfaces/util_strftime_.formatoptions.html +++ b/api/interfaces/util_strftime_.formatoptions.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: FormatOptions

    -
    +
    @@ -95,17 +95,17 @@
  • FormatOptions
  • Properties

    flags

    flags: object

    -

    Defined in util/strftime.ts:20

    +

    Defined in util/strftime.ts:22


    Optional modifier

    modifier? : undefined | string

    -

    Defined in util/strftime.ts:22

    +

    Defined in util/strftime.ts:24


    Optional width

    width? : undefined | string

    -

    Defined in util/strftime.ts:21

    +

    Defined in util/strftime.ts:23

    - +
    diff --git a/api/modules/builtin_filters_array_.html b/api/modules/builtin_filters_array_.html index d3b18f36d..ddc8aaa87 100644 --- a/api/modules/builtin_filters_array_.html +++ b/api/modules/builtin_filters_array_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "builtin/filters/array"

    -
    +

    Functions

    compact

    compact<T>(this: FilterImpl, arr: T[]): any[]

    -

    Defined in builtin/filters/array.ts:27

    +

    Defined in builtin/filters/array.ts:27

    Type parameters:

    T

    Parameters:

    @@ -115,7 +115,7 @@

    Returns: any[]


    concat

    concat<T1, T2>(v: T1[], arg: T2[] | T2): T1 | T2[]

    -

    Defined in builtin/filters/array.ts:31

    +

    Defined in builtin/filters/array.ts:31

    Type parameters:

    T1

    T2

    @@ -139,7 +139,7 @@

    Returns: T1 | T2[]


    Const first

    first(v: any): any

    -

    Defined in builtin/filters/array.ts:9

    +

    Defined in builtin/filters/array.ts:9

    Parameters:

    @@ -156,7 +156,7 @@

    Returns: any


    Const join

    join(v: any[], arg: string): string

    -

    Defined in builtin/filters/array.ts:7

    +

    Defined in builtin/filters/array.ts:7

    Parameters:

    @@ -177,7 +177,7 @@

    Returns: string


    Const last

    last(v: any): any

    -

    Defined in builtin/filters/array.ts:8

    +

    Defined in builtin/filters/array.ts:8

    Parameters:

    @@ -194,7 +194,7 @@

    Returns: any


    map

    map<T1, T2>(this: FilterImpl, arr: Scope[], property: string): object[]

    -

    Defined in builtin/filters/array.ts:23

    +

    Defined in builtin/filters/array.ts:23

    Type parameters:

    T1

    T2

    @@ -222,7 +222,7 @@

    Returns: object[]


    Const reverse

    reverse(v: any[]): any[]

    -

    Defined in builtin/filters/array.ts:10

    +

    Defined in builtin/filters/array.ts:10

    Parameters:

    @@ -239,7 +239,7 @@

    Returns: any[]


    Const size

    size(v: string | any[]): number

    -

    Defined in builtin/filters/array.ts:21

    +

    Defined in builtin/filters/array.ts:21

    Parameters:

    @@ -256,7 +256,7 @@

    Returns: number


    slice

    slice<T>(v: T[], begin: number, length: number): T[]

    -

    Defined in builtin/filters/array.ts:35

    +

    Defined in builtin/filters/array.ts:35

    Type parameters:

    T

    Parameters:

    @@ -287,7 +287,7 @@

    Returns: T[]


    sort

    sort<T>(this: FilterImpl, arr: T[], property?: undefined | string): any[]

    -

    Defined in builtin/filters/array.ts:12

    +

    Defined in builtin/filters/array.ts:12

    Type parameters:

    T

    Parameters:

    @@ -314,7 +314,7 @@

    Returns: any[]


    uniq

    uniq<T>(arr: T[]): T[]

    -

    Defined in builtin/filters/array.ts:47

    +

    Defined in builtin/filters/array.ts:47

    Type parameters:

    T

    Parameters:

    @@ -333,7 +333,7 @@

    Returns: T[]


    where

    where<T>(this: FilterImpl, arr: T[], property: string, expected?: any): T[]

    -

    Defined in builtin/filters/array.ts:40

    +

    Defined in builtin/filters/array.ts:40

    Type parameters:

    T: object

    Parameters:

    @@ -365,7 +365,7 @@
    - +
    diff --git a/api/modules/builtin_filters_date_.html b/api/modules/builtin_filters_date_.html index ee900658b..3c3e3b1a8 100644 --- a/api/modules/builtin_filters_date_.html +++ b/api/modules/builtin_filters_date_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "builtin/filters/date"

    -
    +

    Functions

    date

    date(this: FilterImpl, v: string | Date, arg: string): string | Date

    -

    Defined in builtin/filters/date.ts:5

    +

    Defined in builtin/filters/date.ts:5

    Parameters:

    @@ -117,7 +117,7 @@

    Returns: string | Date


    isValidDate

    isValidDate(date: any): boolean

    -

    Defined in builtin/filters/date.ts:23

    +

    Defined in builtin/filters/date.ts:25

    Parameters:

    @@ -135,7 +135,7 @@
    - +
    diff --git a/api/modules/builtin_filters_html_.html b/api/modules/builtin_filters_html_.html index f1785707d..34882f755 100644 --- a/api/modules/builtin_filters_html_.html +++ b/api/modules/builtin_filters_html_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "builtin/filters/html"

    -
    +

    Functions

    escape

    escape(str: string): string

    -

    Defined in builtin/filters/html.ts:18

    +

    Defined in builtin/filters/html.ts:18

    Parameters:

    @@ -109,7 +109,7 @@

    Returns: string


    escapeOnce

    escapeOnce(str: string): string

    -

    Defined in builtin/filters/html.ts:26

    +

    Defined in builtin/filters/html.ts:26

    Parameters:

    @@ -126,7 +126,7 @@

    Returns: string


    newlineToBr

    newlineToBr(v: string): string

    -

    Defined in builtin/filters/html.ts:30

    +

    Defined in builtin/filters/html.ts:30

    Parameters:

    @@ -143,7 +143,7 @@

    Returns: string


    stripHtml

    stripHtml(v: string): string

    -

    Defined in builtin/filters/html.ts:34

    +

    Defined in builtin/filters/html.ts:34

    Parameters:

    @@ -160,7 +160,7 @@

    Returns: string


    unescape

    unescape(str: string): string

    -

    Defined in builtin/filters/html.ts:22

    +

    Defined in builtin/filters/html.ts:22

    Parameters:

    @@ -175,33 +175,33 @@

    Returns: string

    -

    Object literals

    Const escapeMap

    escapeMap: object

    Defined in builtin/filters/html.ts:3

    +

    Object literals

    Const escapeMap

    escapeMap: object

    Defined in builtin/filters/html.ts:3

    : string = “"”

    -

    Defined in builtin/filters/html.ts:7

    +

    Defined in builtin/filters/html.ts:7

    &

    &: string = “&”

    -

    Defined in builtin/filters/html.ts:4

    +

    Defined in builtin/filters/html.ts:4

    : string = “'”

    -

    Defined in builtin/filters/html.ts:8

    +

    Defined in builtin/filters/html.ts:8

    <

    <: string = “<”

    -

    Defined in builtin/filters/html.ts:5

    +

    Defined in builtin/filters/html.ts:5

    >

    >: string = “>”

    -

    Defined in builtin/filters/html.ts:6

    +

    Defined in builtin/filters/html.ts:6


    -

    Const unescapeMap

    unescapeMap: object

    Defined in builtin/filters/html.ts:10

    +

    Const unescapeMap

    unescapeMap: object

    Defined in builtin/filters/html.ts:10

    "

    ": string = “””

    -

    Defined in builtin/filters/html.ts:14

    +

    Defined in builtin/filters/html.ts:14

    '

    ': string = “‘“

    -

    Defined in builtin/filters/html.ts:15

    +

    Defined in builtin/filters/html.ts:15

    &

    &: string = “&”

    -

    Defined in builtin/filters/html.ts:11

    +

    Defined in builtin/filters/html.ts:11

    >

    >: string = “>”

    -

    Defined in builtin/filters/html.ts:13

    +

    Defined in builtin/filters/html.ts:13

    <

    <: string = “<”

    -

    Defined in builtin/filters/html.ts:12

    +

    Defined in builtin/filters/html.ts:12

    @@ -210,7 +210,7 @@
    Contents -
    1. Functions
      1. escape
      2. escapeOnce
      3. newlineToBr
      4. stripHtml
      5. unescape
    2. Object literals
      1. Const escapeMap
      2. ▪ escapeMap: object
      3. &
      4. <
      5. >
      6. Const unescapeMap
      7. ▪ unescapeMap: object
      8. &#34;
      9. '
      10. &
      11. >
      12. <
    +
    1. Functions
      1. escape
      2. escapeOnce
      3. newlineToBr
      4. stripHtml
      5. unescape
    2. Object literals
      1. Const escapeMap
      2. ▪ escapeMap: object
      3. &
      4. <
      5. >
      6. Const unescapeMap
      7. ▪ unescapeMap: object
      8. "
      9. '
      10. &
      11. >
      12. <
    Back to Top
    diff --git a/api/modules/builtin_filters_index_.html b/api/modules/builtin_filters_index_.html index 5b1be7844..972d89207 100644 --- a/api/modules/builtin_filters_index_.html +++ b/api/modules/builtin_filters_index_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/filters/index"

    -
    +
    diff --git a/api/modules/builtin_filters_math_.html b/api/modules/builtin_filters_math_.html index e7eb6f737..a42afa69a 100644 --- a/api/modules/builtin_filters_math_.html +++ b/api/modules/builtin_filters_math_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,26 +87,26 @@

    External module: "builtin/filters/math"

    -
    +

    Variables

    Const abs

    abs: abs = Math.abs

    -

    Defined in builtin/filters/math.ts:3

    +

    Defined in builtin/filters/math.ts:3


    Const atLeast

    atLeast: max = Math.max

    -

    Defined in builtin/filters/math.ts:4

    +

    Defined in builtin/filters/math.ts:4


    Const atMost

    atMost: min = Math.min

    -

    Defined in builtin/filters/math.ts:5

    +

    Defined in builtin/filters/math.ts:5


    Const ceil

    ceil: ceil = Math.ceil

    -

    Defined in builtin/filters/math.ts:6

    +

    Defined in builtin/filters/math.ts:6


    Const floor

    floor: floor = Math.floor

    -

    Defined in builtin/filters/math.ts:8

    +

    Defined in builtin/filters/math.ts:8

    Functions

    Const dividedBy

    dividedBy(v: number, arg: number): number

    -

    Defined in builtin/filters/math.ts:7

    +

    Defined in builtin/filters/math.ts:7

    Parameters:

    @@ -127,7 +127,7 @@

    Returns: number


    Const minus

    minus(v: number, arg: number): number

    -

    Defined in builtin/filters/math.ts:9

    +

    Defined in builtin/filters/math.ts:9

    Parameters:

    @@ -148,7 +148,7 @@

    Returns: number


    Const modulo

    modulo(v: number, arg: number): number

    -

    Defined in builtin/filters/math.ts:10

    +

    Defined in builtin/filters/math.ts:10

    Parameters:

    @@ -169,7 +169,7 @@

    Returns: number


    plus

    plus(v: number, arg: number): number

    -

    Defined in builtin/filters/math.ts:18

    +

    Defined in builtin/filters/math.ts:18

    Parameters:

    @@ -190,7 +190,7 @@

    Returns: number


    round

    round(v: number, arg: number): number

    -

    Defined in builtin/filters/math.ts:13

    +

    Defined in builtin/filters/math.ts:13

    Parameters:

    @@ -214,7 +214,7 @@

    Returns: number


    sortNatural

    sortNatural(input: any[], property?: undefined | string): any[]

    -

    Defined in builtin/filters/math.ts:22

    +

    Defined in builtin/filters/math.ts:22

    Parameters:

    @@ -235,7 +235,7 @@

    Returns: any[]


    Const times

    times(v: number, arg: number): number

    -

    Defined in builtin/filters/math.ts:11

    +

    Defined in builtin/filters/math.ts:11

    Parameters:

    @@ -257,7 +257,7 @@
    - +
    diff --git a/api/modules/builtin_filters_object_.html b/api/modules/builtin_filters_object_.html index d55987e53..00d78001f 100644 --- a/api/modules/builtin_filters_object_.html +++ b/api/modules/builtin_filters_object_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "builtin/filters/object"

    -
    +

    Functions

    Default

    Default<T1, T2>(this: FilterImpl, v: string | T1, arg: T2): string | T1 | T2

    -

    Defined in builtin/filters/object.ts:5

    +

    Defined in builtin/filters/object.ts:5

    Type parameters:

    T1

    T2

    @@ -120,7 +120,7 @@

    Returns: string | T1 | T2


    json

    json(v: any): string

    -

    Defined in builtin/filters/object.ts:9

    +

    Defined in builtin/filters/object.ts:9

    Parameters:

    @@ -138,7 +138,7 @@
    - +
    diff --git a/api/modules/builtin_filters_string_.html b/api/modules/builtin_filters_string_.html index 52e4db23b..4cf5abb84 100644 --- a/api/modules/builtin_filters_string_.html +++ b/api/modules/builtin_filters_string_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "builtin/filters/string"

    -
    +

    Functions

    append

    append(v: string, arg: string): string

    -

    Defined in builtin/filters/string.ts:9

    +

    Defined in builtin/filters/string.ts:9

    Parameters:

    @@ -113,7 +113,7 @@

    Returns: string


    capitalize

    capitalize(str: string): string

    -

    Defined in builtin/filters/string.ts:55

    +

    Defined in builtin/filters/string.ts:55

    Parameters:

    @@ -130,7 +130,7 @@

    Returns: string


    downcase

    downcase(v: string): string

    -

    Defined in builtin/filters/string.ts:23

    +

    Defined in builtin/filters/string.ts:23

    Parameters:

    @@ -147,7 +147,7 @@

    Returns: string


    lstrip

    lstrip(v: string): string

    -

    Defined in builtin/filters/string.ts:19

    +

    Defined in builtin/filters/string.ts:19

    Parameters:

    @@ -164,7 +164,7 @@

    Returns: string


    prepend

    prepend(v: string, arg: string): string

    -

    Defined in builtin/filters/string.ts:14

    +

    Defined in builtin/filters/string.ts:14

    Parameters:

    @@ -185,7 +185,7 @@

    Returns: string


    remove

    remove(v: string, arg: string): string

    -

    Defined in builtin/filters/string.ts:31

    +

    Defined in builtin/filters/string.ts:31

    Parameters:

    @@ -206,7 +206,7 @@

    Returns: string


    removeFirst

    removeFirst(v: string, l: string): string

    -

    Defined in builtin/filters/string.ts:35

    +

    Defined in builtin/filters/string.ts:35

    Parameters:

    @@ -227,7 +227,7 @@

    Returns: string


    replace

    replace(v: string, pattern: string, replacement: string): string

    -

    Defined in builtin/filters/string.ts:60

    +

    Defined in builtin/filters/string.ts:60

    Parameters:

    @@ -252,7 +252,7 @@

    Returns: string


    replaceFirst

    replaceFirst(v: string, arg1: string, arg2: string): string

    -

    Defined in builtin/filters/string.ts:64

    +

    Defined in builtin/filters/string.ts:64

    Parameters:

    @@ -277,7 +277,7 @@

    Returns: string


    rstrip

    rstrip(str: string): string

    -

    Defined in builtin/filters/string.ts:39

    +

    Defined in builtin/filters/string.ts:39

    Parameters:

    @@ -294,7 +294,7 @@

    Returns: string


    split

    split(v: string, arg: string): string[]

    -

    Defined in builtin/filters/string.ts:43

    +

    Defined in builtin/filters/string.ts:43

    Parameters:

    @@ -315,7 +315,7 @@

    Returns: string[]


    strip

    strip(v: string): string

    -

    Defined in builtin/filters/string.ts:47

    +

    Defined in builtin/filters/string.ts:47

    Parameters:

    @@ -332,7 +332,7 @@

    Returns: string


    stripNewlines

    stripNewlines(v: string): string

    -

    Defined in builtin/filters/string.ts:51

    +

    Defined in builtin/filters/string.ts:51

    Parameters:

    @@ -349,7 +349,7 @@

    Returns: string


    truncate

    truncate(v: string, l: number, o: string): string

    -

    Defined in builtin/filters/string.ts:68

    +

    Defined in builtin/filters/string.ts:68

    Parameters:

    @@ -378,7 +378,7 @@

    Returns: string


    truncatewords

    truncatewords(v: string, l: number, o: string): string

    -

    Defined in builtin/filters/string.ts:74

    +

    Defined in builtin/filters/string.ts:74

    Parameters:

    @@ -407,7 +407,7 @@

    Returns: string


    upcase

    upcase(str: string): string

    -

    Defined in builtin/filters/string.ts:27

    +

    Defined in builtin/filters/string.ts:27

    Parameters:

    @@ -425,7 +425,7 @@
    - +
    diff --git a/api/modules/builtin_filters_url_.html b/api/modules/builtin_filters_url_.html index 5c4c8d19e..f55244265 100644 --- a/api/modules/builtin_filters_url_.html +++ b/api/modules/builtin_filters_url_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "builtin/filters/url"

    -
    +

    Functions

    Const urlDecode

    urlDecode(x: string): string

    -

    Defined in builtin/filters/url.ts:1

    +

    Defined in builtin/filters/url.ts:1

    Parameters:

    @@ -109,7 +109,7 @@

    Returns: string


    Const urlEncode

    urlEncode(x: string): string

    -

    Defined in builtin/filters/url.ts:2

    +

    Defined in builtin/filters/url.ts:2

    Parameters:

    @@ -127,7 +127,7 @@
    - +
    diff --git a/api/modules/builtin_tags_assign_.html b/api/modules/builtin_tags_assign_.html index 48ab4239c..e19c29a8a 100644 --- a/api/modules/builtin_tags_assign_.html +++ b/api/modules/builtin_tags_assign_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/assign"

    -
    +
    - +
    diff --git a/api/modules/builtin_tags_block_.html b/api/modules/builtin_tags_block_.html index a7918e478..5df1f4baa 100644 --- a/api/modules/builtin_tags_block_.html +++ b/api/modules/builtin_tags_block_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/block"

    -
    +
    - +
    diff --git a/api/modules/builtin_tags_break_.html b/api/modules/builtin_tags_break_.html index 87615a314..61154320d 100644 --- a/api/modules/builtin_tags_break_.html +++ b/api/modules/builtin_tags_break_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/break"

    -
    +
    - +
    diff --git a/api/modules/builtin_tags_capture_.html b/api/modules/builtin_tags_capture_.html index 1665a7515..bb922296e 100644 --- a/api/modules/builtin_tags_capture_.html +++ b/api/modules/builtin_tags_capture_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "builtin/tags/capture"

    -
    +

    Functions

    readVariableName

    readVariableName(tokenizer: Tokenizer): undefined | string

    -

    Defined in builtin/tags/capture.ts:27

    +

    Defined in builtin/tags/capture.ts:27

    Parameters:

    @@ -110,7 +110,7 @@
    - +
    diff --git a/api/modules/builtin_tags_case_.html b/api/modules/builtin_tags_case_.html index c2ceef539..46b996484 100644 --- a/api/modules/builtin_tags_case_.html +++ b/api/modules/builtin_tags_case_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/case"

    -
    +
    - +
    diff --git a/api/modules/builtin_tags_comment_.html b/api/modules/builtin_tags_comment_.html index 1582b1df8..2ace98d59 100644 --- a/api/modules/builtin_tags_comment_.html +++ b/api/modules/builtin_tags_comment_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/comment"

    -
    +
    - +
    diff --git a/api/modules/builtin_tags_continue_.html b/api/modules/builtin_tags_continue_.html index 5f91bfb37..3077c6bb8 100644 --- a/api/modules/builtin_tags_continue_.html +++ b/api/modules/builtin_tags_continue_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/continue"

    -
    +
    - +
    diff --git a/api/modules/builtin_tags_cycle_.html b/api/modules/builtin_tags_cycle_.html index 2c21c68f6..205697c19 100644 --- a/api/modules/builtin_tags_cycle_.html +++ b/api/modules/builtin_tags_cycle_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/cycle"

    -
    +
    - +
    diff --git a/api/modules/builtin_tags_decrement_.html b/api/modules/builtin_tags_decrement_.html index 78536982b..a6f61c4ec 100644 --- a/api/modules/builtin_tags_decrement_.html +++ b/api/modules/builtin_tags_decrement_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/decrement"

    -
    +
    - +
    diff --git a/api/modules/builtin_tags_for_.html b/api/modules/builtin_tags_for_.html index 6c8f79dc5..29d72833b 100644 --- a/api/modules/builtin_tags_for_.html +++ b/api/modules/builtin_tags_for_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,82 @@

    External module: "builtin/tags/for"

    -
    +
    - +

    Type aliases

    valueof

    Ƭ valueof: T[keyof T]

    +

    Defined in builtin/tags/for.ts:8

    +

    Variables

    Const MODIFIERS

    MODIFIERS: string[] = [‘offset’, ‘limit’, ‘reversed’]

    +

    Defined in builtin/tags/for.ts:6

    +

    Functions

    limit

    limit<T>(arr: Array‹T›, count: number): T[]

    +

    Defined in builtin/tags/for.ts:85

    +

    Type parameters:

    +

    T

    +

    Parameters:

    +
    + + + + + + + + + + + + + + +
    NameType
    arrArray‹T›
    countnumber
    +

    Returns: T[]

    +
    +

    offset

    offset<T>(arr: Array‹T›, count: number): T[]

    +

    Defined in builtin/tags/for.ts:81

    +

    Type parameters:

    +

    T

    +

    Parameters:

    + + + + + + + + + + + + + + + +
    NameType
    arrArray‹T›
    countnumber
    +

    Returns: T[]

    +
    +

    reversed

    reversed<T>(arr: Array‹T›): T[]

    +

    Defined in builtin/tags/for.ts:77

    +

    Type parameters:

    +

    T

    +

    Parameters:

    + + + + + + + + + + + +
    NameType
    arrArray‹T›
    +

    Returns: T[]

    +
    @@ -103,7 +171,7 @@
    Contents - +
    1. Type aliases
      1. valueof
    2. Variables
      1. Const MODIFIERS
    3. Functions
      1. limit
      2. offset
      3. reversed
    Back to Top
    diff --git a/api/modules/builtin_tags_if_.html b/api/modules/builtin_tags_if_.html index 70c25c978..9a6ca1252 100644 --- a/api/modules/builtin_tags_if_.html +++ b/api/modules/builtin_tags_if_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/if"

    -
    +
    diff --git a/api/modules/builtin_tags_include_.html b/api/modules/builtin_tags_include_.html index a7c2f9dcf..ecdea8a40 100644 --- a/api/modules/builtin_tags_include_.html +++ b/api/modules/builtin_tags_include_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/include"

    -
    +
    diff --git a/api/modules/builtin_tags_increment_.html b/api/modules/builtin_tags_increment_.html index c2d9d1caa..3e6fbaa76 100644 --- a/api/modules/builtin_tags_increment_.html +++ b/api/modules/builtin_tags_increment_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/increment"

    -
    +
    diff --git a/api/modules/builtin_tags_index_.html b/api/modules/builtin_tags_index_.html index a3a9fd649..28ef95fa2 100644 --- a/api/modules/builtin_tags_index_.html +++ b/api/modules/builtin_tags_index_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,67 +87,67 @@

    External module: "builtin/tags/index"

    -
    +
    -

    Object literals

    Const tags

    tags: object

    Defined in builtin/tags/index.ts:21

    +

    Object literals

    Const tags

    tags: object

    Defined in builtin/tags/index.ts:21

    assign

    assign: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    block

    block: object

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    Type declaration:

    break

    break: object = Break

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    Type declaration:

    capture

    capture: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    case

    case: TagImplOptions = Case

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    comment

    comment: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    continue

    continue: object = Continue

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    Type declaration:

    cycle

    cycle: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    decrement

    decrement: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    for

    for: TagImplOptions = For

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    if

    if: TagImplOptions = If

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    include

    include: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    increment

    increment: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    layout

    layout: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    raw

    raw: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    render

    render: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    tablerow

    tablerow: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    unless

    unless: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    @@ -156,7 +156,7 @@
    Contents -
    1. Object literals
      1. Const tags
      2. ▪ tags: object
      3. assign
      4. block
        1. Type declaration:
      5. break
        1. Type declaration:
      6. capture
      7. case
      8. comment
      9. continue
        1. Type declaration:
      10. cycle
      11. decrement
      12. for
      13. if
      14. include
      15. increment
      16. layout
      17. raw
      18. render
      19. tablerow
      20. unless
    +
    1. Object literals
      1. Const tags
      2. ▪ tags: object
      3. assign
      4. block
        1. Type declaration:
      5. break
        1. Type declaration:
      6. capture
      7. case
      8. comment
      9. continue
        1. Type declaration:
      10. cycle
      11. decrement
      12. for
      13. if
      14. include
      15. increment
      16. layout
      17. raw
      18. render
      19. tablerow
      20. unless
    Back to Top
    diff --git a/api/modules/builtin_tags_layout_.html b/api/modules/builtin_tags_layout_.html index 60e36b66f..ffe4e1071 100644 --- a/api/modules/builtin_tags_layout_.html +++ b/api/modules/builtin_tags_layout_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/layout"

    -
    +
    diff --git a/api/modules/builtin_tags_raw_.html b/api/modules/builtin_tags_raw_.html index d10e309c1..2a1661663 100644 --- a/api/modules/builtin_tags_raw_.html +++ b/api/modules/builtin_tags_raw_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/raw"

    -
    +
    diff --git a/api/modules/builtin_tags_render_.html b/api/modules/builtin_tags_render_.html index 8f15bc6fa..9b15112f4 100644 --- a/api/modules/builtin_tags_render_.html +++ b/api/modules/builtin_tags_render_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,62 @@

    External module: "builtin/tags/render"

    -
    +
    - +

    Type aliases

    ParsedFileName

    Ƭ ParsedFileName: Template[] | Token | string | undefined

    +

    Defined in builtin/tags/render.ts:73

    +

    Functions

    parseFilePath

    parseFilePath(tokenizer: Tokenizer, liquid: Liquid): ParsedFileName | null

    +

    Defined in builtin/tags/render.ts:81

    +

    Parameters:

    + + + + + + + + + + + + + + + +
    NameType
    tokenizerTokenizer
    liquidLiquid
    +

    Returns: ParsedFileName | null

    +

    null for “none”,

    +
    +

    renderFilePath

    renderFilePath(file: ParsedFileName, ctx: Context, liquid: Liquid): any

    +

    Defined in builtin/tags/render.ts:102

    +

    Parameters:

    + + + + + + + + + + + + + + + + + + + +
    NameType
    fileParsedFileName
    ctxContext
    liquidLiquid
    +

    Returns: any

    +
    @@ -103,7 +151,7 @@
    Contents - +
    1. Type aliases
      1. ParsedFileName
    2. Functions
      1. parseFilePath
      2. renderFilePath
    Back to Top
    diff --git a/api/modules/builtin_tags_tablerow_.html b/api/modules/builtin_tags_tablerow_.html index 22a5d7ead..661888ddc 100644 --- a/api/modules/builtin_tags_tablerow_.html +++ b/api/modules/builtin_tags_tablerow_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/tablerow"

    -
    +
    diff --git a/api/modules/builtin_tags_unless_.html b/api/modules/builtin_tags_unless_.html index dfc506633..a1a61433d 100644 --- a/api/modules/builtin_tags_unless_.html +++ b/api/modules/builtin_tags_unless_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/unless"

    -
    +
    diff --git a/api/modules/cache_cache_.html b/api/modules/cache_cache_.html index 5f6892730..8a7dbadaa 100644 --- a/api/modules/cache_cache_.html +++ b/api/modules/cache_cache_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "cache/cache"

    -
    +
    diff --git a/api/modules/cache_lru_.html b/api/modules/cache_lru_.html index 21cfcc56a..356df18d3 100644 --- a/api/modules/cache_lru_.html +++ b/api/modules/cache_lru_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "cache/lru"

    -
    +
    diff --git a/api/modules/context_block_mode_.html b/api/modules/context_block_mode_.html index 63400989c..0661918e4 100644 --- a/api/modules/context_block_mode_.html +++ b/api/modules/context_block_mode_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "context/block-mode"

    -
    +
    diff --git a/api/modules/context_context_.html b/api/modules/context_context_.html index 9ac7456bc..868fd8d35 100644 --- a/api/modules/context_context_.html +++ b/api/modules/context_context_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "context/context"

    -
    +

    Functions

    readFirst

    readFirst(obj: Scope): any

    -

    Defined in context/context.ts:84

    +

    Defined in context/context.ts:84

    Parameters:

    @@ -109,7 +109,7 @@

    Returns: any


    readLast

    readLast(obj: Scope): any

    -

    Defined in context/context.ts:89

    +

    Defined in context/context.ts:89

    Parameters:

    @@ -126,7 +126,7 @@

    Returns: any


    readProperty

    readProperty(obj: Scope, key: string): any

    -

    Defined in context/context.ts:70

    +

    Defined in context/context.ts:70

    Parameters:

    @@ -147,7 +147,7 @@

    Returns: any


    readSize

    readSize(obj: Scope): any

    -

    Defined in context/context.ts:94

    +

    Defined in context/context.ts:94

    Parameters:

    @@ -165,7 +165,7 @@
    - +
    diff --git a/api/modules/context_scope_.html b/api/modules/context_scope_.html index 0989aeb06..8a9c200c3 100644 --- a/api/modules/context_scope_.html +++ b/api/modules/context_scope_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,16 +87,16 @@

    External module: "context/scope"

    -
    +

    Type aliases

    Scope

    Ƭ Scope: PlainObject | Drop

    -

    Defined in context/scope.ts:8

    +

    Defined in context/scope.ts:8

    - +
    diff --git a/api/modules/drop_blank_drop_.html b/api/modules/drop_blank_drop_.html index 4d750d5d5..3bc5b7abe 100644 --- a/api/modules/drop_blank_drop_.html +++ b/api/modules/drop_blank_drop_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "drop/blank-drop"

    -
    +
    - +
    diff --git a/api/modules/drop_block_drop_.html b/api/modules/drop_block_drop_.html index 1bc8af62a..739de104a 100644 --- a/api/modules/drop_block_drop_.html +++ b/api/modules/drop_block_drop_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "drop/block-drop"

    -
    +
    - +
    diff --git a/api/modules/drop_comparable_.html b/api/modules/drop_comparable_.html index c9b929f29..1a91bb96e 100644 --- a/api/modules/drop_comparable_.html +++ b/api/modules/drop_comparable_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "drop/comparable"

    -
    +

    Functions

    isComparable

    isComparable(arg: any): boolean

    -

    Defined in drop/comparable.ts:11

    +

    Defined in drop/comparable.ts:11

    Parameters:

    @@ -110,7 +110,7 @@
    - +
    diff --git a/api/modules/drop_drop_.html b/api/modules/drop_drop_.html index 57098a80d..63f5fe6f2 100644 --- a/api/modules/drop_drop_.html +++ b/api/modules/drop_drop_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "drop/drop"

    -
    +
    - +
    diff --git a/api/modules/drop_empty_drop_.html b/api/modules/drop_empty_drop_.html index 8dd170af6..013d980aa 100644 --- a/api/modules/drop_empty_drop_.html +++ b/api/modules/drop_empty_drop_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "drop/empty-drop"

    -
    +
    - +
    diff --git a/api/modules/drop_forloop_drop_.html b/api/modules/drop_forloop_drop_.html index 6630b661c..738feb75d 100644 --- a/api/modules/drop_forloop_drop_.html +++ b/api/modules/drop_forloop_drop_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "drop/forloop-drop"

    -
    +
    - +
    diff --git a/api/modules/drop_null_drop_.html b/api/modules/drop_null_drop_.html index a5ddbb7b1..43de715d4 100644 --- a/api/modules/drop_null_drop_.html +++ b/api/modules/drop_null_drop_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "drop/null-drop"

    -
    +
    - +
    diff --git a/api/modules/drop_tablerowloop_drop_.html b/api/modules/drop_tablerowloop_drop_.html index b8a83776e..a491ea3e2 100644 --- a/api/modules/drop_tablerowloop_drop_.html +++ b/api/modules/drop_tablerowloop_drop_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "drop/tablerowloop-drop"

    -
    +
    - +
    diff --git a/api/modules/emitters_emitter_.html b/api/modules/emitters_emitter_.html new file mode 100644 index 000000000..ce563f1a1 --- /dev/null +++ b/api/modules/emitters_emitter_.html @@ -0,0 +1,176 @@ + + + + + External module: "emitters/emitter" | LiquidJS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + +
    +
    + +
    +
    + + + + + + + + + + + \ No newline at end of file diff --git a/api/modules/emitters_keeping_type_emitter_.html b/api/modules/emitters_keeping_type_emitter_.html new file mode 100644 index 000000000..866dbdeb3 --- /dev/null +++ b/api/modules/emitters_keeping_type_emitter_.html @@ -0,0 +1,176 @@ + + + + + External module: "emitters/keeping-type-emitter" | LiquidJS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + +
    +
    + +
    +
    + + + + + + + + + + + \ No newline at end of file diff --git a/api/modules/emitters_simple_emitter_.html b/api/modules/emitters_simple_emitter_.html new file mode 100644 index 000000000..cff14eb35 --- /dev/null +++ b/api/modules/emitters_simple_emitter_.html @@ -0,0 +1,176 @@ + + + + + External module: "emitters/simple-emitter" | LiquidJS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + +
    +
    + +
    +
    + + + + + + + + + + + \ No newline at end of file diff --git a/api/modules/emitters_streamed_emitter_.html b/api/modules/emitters_streamed_emitter_.html new file mode 100644 index 000000000..214ea8324 --- /dev/null +++ b/api/modules/emitters_streamed_emitter_.html @@ -0,0 +1,176 @@ + + + + + External module: "emitters/streamed-emitter" | LiquidJS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + +
    +
    + +
    +
    + + + + + + + + + + + \ No newline at end of file diff --git a/api/modules/fs_browser_.html b/api/modules/fs_browser_.html index 87ff40cd8..058929427 100644 --- a/api/modules/fs_browser_.html +++ b/api/modules/fs_browser_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "fs/browser"

    -
    +

    Functions

    domResolve

    domResolve(root: string, path: string): string

    -

    Defined in fs/browser.ts:3

    +

    Defined in fs/browser.ts:3

    Parameters:

    @@ -113,7 +113,7 @@

    Returns: string


    exists

    exists(filepath: string): Promise‹boolean›

    -

    Defined in fs/browser.ts:56

    +

    Defined in fs/browser.ts:56

    Parameters:

    @@ -130,7 +130,7 @@

    Returns: Promise‹boolean›


    existsSync

    existsSync(filepath: string): boolean

    -

    Defined in fs/browser.ts:60

    +

    Defined in fs/browser.ts:60

    Parameters:

    @@ -147,7 +147,7 @@

    Returns: boolean


    readFile

    readFile(url: string): Promise‹string›

    -

    Defined in fs/browser.ts:28

    +

    Defined in fs/browser.ts:28

    Parameters:

    @@ -164,7 +164,7 @@

    Returns: Promise‹string›


    readFileSync

    readFileSync(url: string): string

    -

    Defined in fs/browser.ts:46

    +

    Defined in fs/browser.ts:46

    Parameters:

    @@ -181,7 +181,7 @@

    Returns: string


    resolve

    resolve(root: string, filepath: string, ext: string): string

    -

    Defined in fs/browser.ts:18

    +

    Defined in fs/browser.ts:18

    Parameters:

    @@ -207,7 +207,7 @@
    - +
    diff --git a/api/modules/fs_fs_.html b/api/modules/fs_fs_.html index 75cd2473c..8ba9c0df0 100644 --- a/api/modules/fs_fs_.html +++ b/api/modules/fs_fs_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "fs/fs"

    -
    +
    - +
    diff --git a/api/modules/fs_node_.html b/api/modules/fs_node_.html index 4dcb5cf07..36ef09099 100644 --- a/api/modules/fs_node_.html +++ b/api/modules/fs_node_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "fs/node"

    -
    +

    Variables

    Const readFileAsync

    readFileAsync: function = _.promisify<string, string, string>(nodeReadFile)

    -

    Defined in fs/node.ts:6

    +

    Defined in fs/node.ts:6

    Type declaration:

    ▸ (arg1: T1, arg2: T2): Promise‹T3›

    Parameters:

    @@ -113,7 +113,7 @@

    Const statAsync

    statAsync: function = _.promisify(stat)

    -

    Defined in fs/node.ts:5

    +

    Defined in fs/node.ts:5

    Type declaration:

    ▸ (arg1: T1): Promise‹T2›

    Parameters:

    @@ -129,7 +129,7 @@

    Functions

    exists

    exists(filepath: string): Promise‹boolean›

    -

    Defined in fs/node.ts:8

    +

    Defined in fs/node.ts:8

    Parameters:

    @@ -146,7 +146,7 @@

    Returns: Promise‹boolean›


    existsSync

    existsSync(filepath: string): boolean

    -

    Defined in fs/node.ts:14

    +

    Defined in fs/node.ts:14

    Parameters:

    @@ -163,7 +163,7 @@

    Returns: boolean


    fallback

    fallback(file: string): undefined | string

    -

    Defined in fs/node.ts:29

    +

    Defined in fs/node.ts:29

    Parameters:

    @@ -180,7 +180,7 @@

    Returns: undefined | string


    readFile

    readFile(filepath: string): Promise‹string›

    -

    Defined in fs/node.ts:11

    +

    Defined in fs/node.ts:11

    Parameters:

    @@ -197,7 +197,7 @@

    Returns: Promise‹string›


    readFileSync

    readFileSync(filepath: string): string

    -

    Defined in fs/node.ts:22

    +

    Defined in fs/node.ts:22

    Parameters:

    @@ -214,7 +214,7 @@

    Returns: string


    resolve

    resolve(root: string, file: string, ext: string): string

    -

    Defined in fs/node.ts:25

    +

    Defined in fs/node.ts:25

    Parameters:

    @@ -240,7 +240,7 @@
    - +
    diff --git a/api/modules/liquid_.html b/api/modules/liquid_.html index fa2f4ab74..9619ce985 100644 --- a/api/modules/liquid_.html +++ b/api/modules/liquid_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "liquid"

    -
    +
    - +
    diff --git a/api/modules/liquid_options_.html b/api/modules/liquid_options_.html index 111e07785..1549096ef 100644 --- a/api/modules/liquid_options_.html +++ b/api/modules/liquid_options_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "liquid-options"

    -
    +

    Functions

    applyDefault

    applyDefault(options: NormalizedOptions): NormalizedFullOptions

    -

    Defined in liquid-options.ts:133

    +

    Defined in liquid-options.ts:139

    Parameters:

    @@ -109,7 +109,7 @@

    Returns: NormalizedFullOptions


    normalize

    normalize(options?: LiquidOptions): NormalizedOptions

    -

    Defined in liquid-options.ts:115

    +

    Defined in liquid-options.ts:121

    Parameters:

    @@ -126,7 +126,7 @@

    Returns: NormalizedOptions


    normalizeStringArray

    normalizeStringArray(value: any): string[]

    -

    Defined in liquid-options.ts:137

    +

    Defined in liquid-options.ts:143

    Parameters:

    @@ -141,57 +141,83 @@

    Returns: string[]

    -

    Object literals

    Const defaultOptions

    defaultOptions: object

    Defined in liquid-options.ts:89

    +

    Object literals

    Const defaultOptions

    defaultOptions: object

    Defined in liquid-options.ts:94

    cache

    cache: undefined = undefined

    -

    Defined in liquid-options.ts:91

    +

    Defined in liquid-options.ts:96

    dynamicPartials

    dynamicPartials: true = true

    -

    Defined in liquid-options.ts:94

    +

    Defined in liquid-options.ts:99

    extname

    extname: string = “”

    -

    Defined in liquid-options.ts:92

    +

    Defined in liquid-options.ts:97

    fs

    fs: “fs/node” = fs

    -

    Defined in liquid-options.ts:93

    +

    Defined in liquid-options.ts:98

    globals

    globals: object

    -

    Defined in liquid-options.ts:109

    +

    Defined in liquid-options.ts:114

    Type declaration:

    greedy

    greedy: true = true

    -

    Defined in liquid-options.ts:100

    +

    Defined in liquid-options.ts:105

    jsTruthy

    jsTruthy: false = false

    -

    Defined in liquid-options.ts:95

    +

    Defined in liquid-options.ts:100

    keepOutputType

    keepOutputType: false = false

    -

    Defined in liquid-options.ts:110

    +

    Defined in liquid-options.ts:115

    lenientIf

    lenientIf: false = false

    -

    Defined in liquid-options.ts:108

    +

    Defined in liquid-options.ts:113

    operators

    operators: Operators = defaultOperators

    -

    Defined in liquid-options.ts:111

    +

    Defined in liquid-options.ts:117

    operatorsTrie

    operatorsTrie: Trie = createTrie(defaultOperators)

    -

    Defined in liquid-options.ts:112

    -

    outputDelimiterLeft

    outputDelimiterLeft: string = “{{“

    -

    Defined in liquid-options.ts:103

    -

    outputDelimiterRight

    outputDelimiterRight: string = “}}”

    -

    Defined in liquid-options.ts:104

    -

    preserveTimezones

    preserveTimezones: false = false

    -

    Defined in liquid-options.ts:105

    -

    root

    root: string[] = [‘.’]

    -

    Defined in liquid-options.ts:90

    -

    strictFilters

    strictFilters: false = false

    -

    Defined in liquid-options.ts:106

    -

    strictVariables

    strictVariables: false = false

    -

    Defined in liquid-options.ts:107

    -

    tagDelimiterLeft

    tagDelimiterLeft: string = “{%“

    -

    Defined in liquid-options.ts:101

    +

    Defined in liquid-options.ts:118

    +

    outputDelimiterLeft

    outputDelimiterLeft: string = “{{" + +*Defined in [liquid-options.ts:108](https://github.com/harttle/liquidjs/blob/master/src/liquid-options.ts#L108)* + +### outputDelimiterRight + +• **outputDelimiterRight**: *string* = "}}" + +*Defined in [liquid-options.ts:109](https://github.com/harttle/liquidjs/blob/master/src/liquid-options.ts#L109)* + +### preserveTimezones + +• **preserveTimezones**: *false* = false + +*Defined in [liquid-options.ts:110](https://github.com/harttle/liquidjs/blob/master/src/liquid-options.ts#L110)* + +### root + +• **root**: *string[]* = ['.'] + +*Defined in [liquid-options.ts:95](https://github.com/harttle/liquidjs/blob/master/src/liquid-options.ts#L95)* + +### strictFilters + +• **strictFilters**: *false* = false + +*Defined in [liquid-options.ts:111](https://github.com/harttle/liquidjs/blob/master/src/liquid-options.ts#L111)* + +### strictVariables + +• **strictVariables**: *false* = false + +*Defined in [liquid-options.ts:112](https://github.com/harttle/liquidjs/blob/master/src/liquid-options.ts#L112)* + +### tagDelimiterLeft + +• **tagDelimiterLeft**: *string* = "{%“

    +

    Defined in liquid-options.ts:106

    tagDelimiterRight

    tagDelimiterRight: string = “%}”

    -

    Defined in liquid-options.ts:102

    +

    Defined in liquid-options.ts:107

    +

    timezoneOffset

    timezoneOffset: number = timezoneOffset

    +

    Defined in liquid-options.ts:116

    trimOutputLeft

    trimOutputLeft: false = false

    -

    Defined in liquid-options.ts:99

    +

    Defined in liquid-options.ts:104

    trimOutputRight

    trimOutputRight: false = false

    -

    Defined in liquid-options.ts:98

    +

    Defined in liquid-options.ts:103

    trimTagLeft

    trimTagLeft: false = false

    -

    Defined in liquid-options.ts:97

    +

    Defined in liquid-options.ts:102

    trimTagRight

    trimTagRight: false = false

    -

    Defined in liquid-options.ts:96

    +

    Defined in liquid-options.ts:101

    @@ -200,7 +226,7 @@
    Contents -
    1. Functions
      1. applyDefault
      2. normalize
      3. normalizeStringArray
    2. Object literals
      1. Const defaultOptions
      2. ▪ defaultOptions: object
      3. cache
      4. dynamicPartials
      5. extname
      6. fs
      7. globals
        1. Type declaration:
      8. greedy
      9. jsTruthy
      10. keepOutputType
      11. lenientIf
      12. operators
      13. operatorsTrie
      14. outputDelimiterLeft
      15. outputDelimiterRight
      16. preserveTimezones
      17. root
      18. strictFilters
      19. strictVariables
      20. tagDelimiterLeft
      21. tagDelimiterRight
      22. trimOutputLeft
      23. trimOutputRight
      24. trimTagLeft
      25. trimTagRight
    +
    1. Functions
      1. applyDefault
      2. normalize
      3. normalizeStringArray
    2. Object literals
      1. Const defaultOptions
      2. ▪ defaultOptions: object
      3. cache
      4. dynamicPartials
      5. extname
      6. fs
      7. globals
        1. Type declaration:
      8. greedy
      9. jsTruthy
      10. keepOutputType
      11. lenientIf
      12. operators
      13. operatorsTrie
      14. outputDelimiterLeft
      15. tagDelimiterRight
      16. timezoneOffset
      17. trimOutputLeft
      18. trimOutputRight
      19. trimTagLeft
      20. trimTagRight
    Back to Top
    diff --git a/api/modules/parser_filter_arg_.html b/api/modules/parser_filter_arg_.html index a9651b755..f3b3af8e1 100644 --- a/api/modules/parser_filter_arg_.html +++ b/api/modules/parser_filter_arg_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,17 +87,17 @@

    External module: "parser/filter-arg"

    -
    +

    Type aliases

    FilterArg

    Ƭ FilterArg: ValueToken | KeyValuePair

    -

    Defined in parser/filter-arg.ts:6

    +

    Defined in parser/filter-arg.ts:6


    KeyValuePair

    Ƭ KeyValuePair: [undefined | string, undefined | QuotedToken | PropertyAccessToken | LiteralToken | RangeToken]

    -

    Defined in parser/filter-arg.ts:4

    +

    Defined in parser/filter-arg.ts:4

    Functions

    isKeyValuePair

    isKeyValuePair(arr: FilterArg): boolean

    -

    Defined in parser/filter-arg.ts:8

    +

    Defined in parser/filter-arg.ts:8

    Parameters:

    @@ -115,7 +115,7 @@
    - +
    diff --git a/api/modules/parser_match_operator_.html b/api/modules/parser_match_operator_.html index 1f6230120..0408d7acc 100644 --- a/api/modules/parser_match_operator_.html +++ b/api/modules/parser_match_operator_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "parser/match-operator"

    -
    +

    Functions

    matchOperator

    matchOperator(str: string, begin: number, trie: Trie, end: number): number

    -

    Defined in parser/match-operator.ts:4

    +

    Defined in parser/match-operator.ts:4

    Parameters:

    @@ -127,7 +127,7 @@
    - +
    diff --git a/api/modules/parser_parse_stream_.html b/api/modules/parser_parse_stream_.html index 4e22d3a44..a634249e6 100644 --- a/api/modules/parser_parse_stream_.html +++ b/api/modules/parser_parse_stream_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "parser/parse-stream"

    -
    +

    Type aliases

    ParseToken

    Ƭ ParseToken: function

    -

    Defined in parser/parse-stream.ts:6

    +

    Defined in parser/parse-stream.ts:6

    Type declaration:

    ▸ (token: T, remainTokens: T[]): Template

    Parameters:

    @@ -114,7 +114,7 @@
    - +
    diff --git a/api/modules/parser_parse_string_literal_.html b/api/modules/parser_parse_string_literal_.html index 57d50d616..9b81db64f 100644 --- a/api/modules/parser_parse_string_literal_.html +++ b/api/modules/parser_parse_string_literal_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,17 +87,17 @@

    External module: "parser/parse-string-literal"

    -
    +

    Variables

    Const rHex

    rHex: RegExp = /[\da-fA-F]/

    -

    Defined in parser/parse-string-literal.ts:1

    +

    Defined in parser/parse-string-literal.ts:1


    Const rOct

    rOct: RegExp = /[0-7]/

    -

    Defined in parser/parse-string-literal.ts:2

    +

    Defined in parser/parse-string-literal.ts:2

    Functions

    hexVal

    hexVal(c: string): number

    -

    Defined in parser/parse-string-literal.ts:12

    +

    Defined in parser/parse-string-literal.ts:12

    Parameters:

    @@ -114,7 +114,7 @@

    Returns: number


    parseStringLiteral

    parseStringLiteral(str: string): string

    -

    Defined in parser/parse-string-literal.ts:19

    +

    Defined in parser/parse-string-literal.ts:19

    Parameters:

    @@ -129,23 +129,23 @@

    Returns: string

    -

    Object literals

    Const escapeChar

    escapeChar: object

    Defined in parser/parse-string-literal.ts:3

    +

    Object literals

    Const escapeChar

    escapeChar: object

    Defined in parser/parse-string-literal.ts:3

    b

    b: string = “”

    -

    Defined in parser/parse-string-literal.ts:4

    +

    Defined in parser/parse-string-literal.ts:4

    f

    f: string = “ “

    -

    Defined in parser/parse-string-literal.ts:5

    +

    Defined in parser/parse-string-literal.ts:5

    n

    n: string = “

    -

    Defined in parser/parse-string-literal.ts:6

    +

    Defined in parser/parse-string-literal.ts:6

    r

    r: string = “

    -

    Defined in parser/parse-string-literal.ts:7

    +

    Defined in parser/parse-string-literal.ts:7

    t

    t: string = “ “

    -

    Defined in parser/parse-string-literal.ts:8

    +

    Defined in parser/parse-string-literal.ts:8

    v

    v: string = “ “

    -

    Defined in parser/parse-string-literal.ts:9

    +

    Defined in parser/parse-string-literal.ts:9

    @@ -154,7 +154,7 @@
    Contents -
    1. Variables
      1. Const rHex
      2. Const rOct
    2. Functions
      1. hexVal
      2. parseStringLiteral
    3. Object literals
      1. Const escapeChar
      2. ▪ escapeChar: object
      3. b
      4. f
      5. n
      6. r
      7. t
      8. v
    +
    1. Variables
      1. Const rHex
      2. Const rOct
    2. Functions
      1. hexVal
      2. parseStringLiteral
    3. Object literals
      1. Const escapeChar
      2. ▪ escapeChar: object
      3. b
      4. f
      5. n
      6. r
      7. t
      8. v
    Back to Top
    diff --git a/api/modules/parser_parser_.html b/api/modules/parser_parser_.html index 19546bf61..399791de9 100644 --- a/api/modules/parser_parser_.html +++ b/api/modules/parser_parser_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "parser/parser"

    -
    +
    diff --git a/api/modules/parser_token_kind_.html b/api/modules/parser_token_kind_.html index 170137e4c..45bd2d2c6 100644 --- a/api/modules/parser_token_kind_.html +++ b/api/modules/parser_token_kind_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "parser/token-kind"

    -
    +
    diff --git a/api/modules/parser_tokenizer_.html b/api/modules/parser_tokenizer_.html index 7603a8b0f..afd813cb5 100644 --- a/api/modules/parser_tokenizer_.html +++ b/api/modules/parser_tokenizer_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "parser/tokenizer"

    -
    +
    diff --git a/api/modules/parser_whitespace_ctrl_.html b/api/modules/parser_whitespace_ctrl_.html index 7bff22a02..6cf1ac589 100644 --- a/api/modules/parser_whitespace_ctrl_.html +++ b/api/modules/parser_whitespace_ctrl_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "parser/whitespace-ctrl"

    -
    +

    Functions

    trimLeft

    trimLeft(token: Token, greedy: boolean): void

    -

    Defined in parser/whitespace-ctrl.ts:27

    +

    Defined in parser/whitespace-ctrl.ts:27

    Parameters:

    @@ -113,7 +113,7 @@

    Returns: void


    trimRight

    trimRight(token: Token, greedy: boolean): void

    -

    Defined in parser/whitespace-ctrl.ts:34

    +

    Defined in parser/whitespace-ctrl.ts:34

    Parameters:

    @@ -134,7 +134,7 @@

    Returns: void


    whiteSpaceCtrl

    whiteSpaceCtrl(tokens: Token[], options: NormalizedFullOptions): void

    -

    Defined in parser/whitespace-ctrl.ts:6

    +

    Defined in parser/whitespace-ctrl.ts:6

    Parameters:

    @@ -156,7 +156,7 @@
    - +
    diff --git a/api/modules/render_boolean_.html b/api/modules/render_boolean_.html index c883c27b9..4e9af9c26 100644 --- a/api/modules/render_boolean_.html +++ b/api/modules/render_boolean_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "render/boolean"

    -
    +

    Functions

    isFalsy

    isFalsy(val: any, ctx: Context): boolean

    -

    Defined in render/boolean.ts:7

    +

    Defined in render/boolean.ts:7

    Parameters:

    @@ -113,7 +113,7 @@

    Returns: boolean


    isTruthy

    isTruthy(val: any, ctx: Context): boolean

    -

    Defined in render/boolean.ts:3

    +

    Defined in render/boolean.ts:3

    Parameters:

    @@ -135,7 +135,7 @@
    - +
    diff --git a/api/modules/render_emitter_.html b/api/modules/render_emitter_.html index 8f075aa85..0e286b445 100644 --- a/api/modules/render_emitter_.html +++ b/api/modules/render_emitter_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "render/emitter"

    -
    +
    - +
    diff --git a/api/modules/render_expression_.html b/api/modules/render_expression_.html index 8d0dba686..542cfeab8 100644 --- a/api/modules/render_expression_.html +++ b/api/modules/render_expression_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "render/expression"

    -
    +

    Functions

    evalLiteralToken

    evalLiteralToken(token: LiteralToken): any

    -

    Defined in render/expression.ts:74

    +

    Defined in render/expression.ts:73

    Parameters:

    @@ -109,7 +109,7 @@

    Returns: any


    evalNumberToken

    evalNumberToken(token: NumberToken): number

    -

    Defined in render/expression.ts:60

    +

    Defined in render/expression.ts:59

    Parameters:

    @@ -126,7 +126,7 @@

    Returns: number


    evalOperatorToken

    evalOperatorToken(operators: Operators, token: OperatorToken, lhs: any, rhs: any, ctx: Context): boolean

    -

    Defined in render/expression.ts:69

    +

    Defined in render/expression.ts:68

    Parameters:

    @@ -159,7 +159,7 @@

    Returns: boolean


    evalPropertyAccessToken

    evalPropertyAccessToken(token: PropertyAccessToken, ctx: Context, lenient: boolean): null | object

    -

    Defined in render/expression.ts:49

    +

    Defined in render/expression.ts:49

    Parameters:

    @@ -184,7 +184,7 @@

    Returns: null | object


    evalQuotedToken

    evalQuotedToken(token: QuotedToken): string

    -

    Defined in render/expression.ts:65

    +

    Defined in render/expression.ts:64

    Parameters:

    @@ -201,7 +201,7 @@

    Returns: string


    evalRangeToken

    evalRangeToken(token: RangeToken, ctx: Context): number[]

    -

    Defined in render/expression.ts:78

    +

    Defined in render/expression.ts:77

    Parameters:

    @@ -222,7 +222,7 @@

    Returns: number[]


    evalToken

    evalToken(token: Token | undefined, ctx: Context, lenient: boolean): any

    -

    Defined in render/expression.ts:40

    +

    Defined in render/expression.ts:40

    Parameters:

    @@ -251,7 +251,7 @@

    Returns: any


    toPostfix

    toPostfix(tokens: IterableIterator‹Token›): IterableIterator‹Token

    -

    Defined in render/expression.ts:84

    +

    Defined in render/expression.ts:83

    Parameters:

    @@ -269,7 +269,7 @@
    - +
    diff --git a/api/modules/render_operator_.html b/api/modules/render_operator_.html index 98b9d63dc..ebe4843ef 100644 --- a/api/modules/render_operator_.html +++ b/api/modules/render_operator_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,13 +87,13 @@

    External module: "render/operator"

    -
    +
    -

    Object literals

    Const defaultOperators

    defaultOperators: object

    Defined in render/operator.ts:10

    +

    Object literals

    Const defaultOperators

    defaultOperators: object

    Defined in render/operator.ts:10

    !=

    !=(l: any, r: any): boolean

    -

    Defined in render/operator.ts:16

    +

    Defined in render/operator.ts:16

    Parameters:

    @@ -113,7 +113,7 @@

    Returns: boolean

    <

    <(l: any, r: any): boolean

    -

    Defined in render/operator.ts:26

    +

    Defined in render/operator.ts:26

    Parameters:

    @@ -133,7 +133,7 @@

    Returns: boolean

    <=

    <=(l: any, r: any): boolean

    -

    Defined in render/operator.ts:36

    +

    Defined in render/operator.ts:36

    Parameters:

    @@ -153,7 +153,7 @@

    Returns: boolean

    ==

    ==(l: any, r: any): boolean

    -

    Defined in render/operator.ts:11

    +

    Defined in render/operator.ts:11

    Parameters:

    @@ -173,7 +173,7 @@

    Returns: boolean

    >

    >(l: any, r: any): boolean

    -

    Defined in render/operator.ts:21

    +

    Defined in render/operator.ts:21

    Parameters:

    @@ -193,7 +193,7 @@

    Returns: boolean

    >=

    >=(l: any, r: any): boolean

    -

    Defined in render/operator.ts:31

    +

    Defined in render/operator.ts:31

    Parameters:

    @@ -213,7 +213,7 @@

    Returns: boolean

    and

    and(l: any, r: any, ctx: Context): boolean

    -

    Defined in render/operator.ts:44

    +

    Defined in render/operator.ts:44

    Parameters:

    @@ -237,7 +237,7 @@

    Returns: boolean

    contains

    contains(l: any, r: any): boolean

    -

    Defined in render/operator.ts:41

    +

    Defined in render/operator.ts:41

    Parameters:

    @@ -257,7 +257,7 @@

    Returns: boolean

    or

    or(l: any, r: any, ctx: Context): boolean

    -

    Defined in render/operator.ts:45

    +

    Defined in render/operator.ts:45

    Parameters:

    @@ -283,7 +283,7 @@
    - +
    @@ -292,7 +292,7 @@
    Contents -
    1. Object literals
      1. Const defaultOperators
      2. ▪ defaultOperators: object
      3. !=
      4. <
      5. <=
      6. ==
      7. >
      8. >=
      9. and
      10. contains
      11. or
    +
    1. Object literals
      1. Const defaultOperators
      2. ▪ defaultOperators: object
      3. !=
      4. <
      5. <=
      6. ==
      7. >
      8. >=
      9. and
      10. contains
      11. or
    Back to Top
    diff --git a/api/modules/render_render_.html b/api/modules/render_render_.html index 7db5828f7..fcd4664a4 100644 --- a/api/modules/render_render_.html +++ b/api/modules/render_render_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "render/render"

    -
    +
    - +
    diff --git a/api/modules/template_filter_filter_.html b/api/modules/template_filter_filter_.html index e6e441759..46326b815 100644 --- a/api/modules/template_filter_filter_.html +++ b/api/modules/template_filter_filter_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/filter/filter"

    -
    +
    - +
    diff --git a/api/modules/template_filter_filter_impl_.html b/api/modules/template_filter_filter_impl_.html index ba988e170..1dbd33aac 100644 --- a/api/modules/template_filter_filter_impl_.html +++ b/api/modules/template_filter_filter_impl_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/filter/filter-impl"

    -
    +
    - +
    diff --git a/api/modules/template_filter_filter_impl_options_.html b/api/modules/template_filter_filter_impl_options_.html index b2b97354b..b4b7c5641 100644 --- a/api/modules/template_filter_filter_impl_options_.html +++ b/api/modules/template_filter_filter_impl_options_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/filter/filter-impl-options"

    -
    +
    - +
    diff --git a/api/modules/template_filter_filter_map_.html b/api/modules/template_filter_filter_map_.html index 5e0af2803..f2658398f 100644 --- a/api/modules/template_filter_filter_map_.html +++ b/api/modules/template_filter_filter_map_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/filter/filter-map"

    -
    +
    - +
    diff --git a/api/modules/template_html_.html b/api/modules/template_html_.html index 2afa61577..ea4f52cf5 100644 --- a/api/modules/template_html_.html +++ b/api/modules/template_html_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/html"

    -
    +
    - +
    diff --git a/api/modules/template_output_.html b/api/modules/template_output_.html index 31ca27f96..fee1614ec 100644 --- a/api/modules/template_output_.html +++ b/api/modules/template_output_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/output"

    -
    +
    - +
    diff --git a/api/modules/template_tag_hash_.html b/api/modules/template_tag_hash_.html index 8fb07dc0f..26409bb9d 100644 --- a/api/modules/template_tag_hash_.html +++ b/api/modules/template_tag_hash_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/tag/hash"

    -
    +
    - +
    diff --git a/api/modules/template_tag_tag_.html b/api/modules/template_tag_tag_.html index db4b0c6f5..73b72f958 100644 --- a/api/modules/template_tag_tag_.html +++ b/api/modules/template_tag_tag_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/tag/tag"

    -
    +
    - +
    diff --git a/api/modules/template_tag_tag_impl_.html b/api/modules/template_tag_tag_impl_.html index ebb909c2e..b2e7120f4 100644 --- a/api/modules/template_tag_tag_impl_.html +++ b/api/modules/template_tag_tag_impl_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/tag/tag-impl"

    -
    +
    - +
    diff --git a/api/modules/template_tag_tag_impl_options_.html b/api/modules/template_tag_tag_impl_options_.html index 1bad80895..50bda967e 100644 --- a/api/modules/template_tag_tag_impl_options_.html +++ b/api/modules/template_tag_tag_impl_options_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/tag/tag-impl-options"

    -
    +
    - +
    diff --git a/api/modules/template_tag_tag_map_.html b/api/modules/template_tag_tag_map_.html index 9c6af84ae..6c352b932 100644 --- a/api/modules/template_tag_tag_map_.html +++ b/api/modules/template_tag_tag_map_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/tag/tag-map"

    -
    +
    - +
    diff --git a/api/modules/template_template_.html b/api/modules/template_template_.html index c7ad4864d..4b3f88744 100644 --- a/api/modules/template_template_.html +++ b/api/modules/template_template_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/template"

    -
    +
    - +
    diff --git a/api/modules/template_template_impl_.html b/api/modules/template_template_impl_.html index 687b5bb36..59df89111 100644 --- a/api/modules/template_template_impl_.html +++ b/api/modules/template_template_impl_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/template-impl"

    -
    +
    - +
    diff --git a/api/modules/template_value_.html b/api/modules/template_value_.html index 68325b6ae..823158676 100644 --- a/api/modules/template_value_.html +++ b/api/modules/template_value_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/value"

    -
    +
    - +
    diff --git a/api/modules/tokens_delimited_token_.html b/api/modules/tokens_delimited_token_.html index 1c687a5b8..442151276 100644 --- a/api/modules/tokens_delimited_token_.html +++ b/api/modules/tokens_delimited_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/delimited-token"

    -
    +
    - +
    diff --git a/api/modules/tokens_filter_token_.html b/api/modules/tokens_filter_token_.html index 8097e8918..d57c2e881 100644 --- a/api/modules/tokens_filter_token_.html +++ b/api/modules/tokens_filter_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/filter-token"

    -
    +
    - +
    diff --git a/api/modules/tokens_hash_token_.html b/api/modules/tokens_hash_token_.html index 59b5f536a..b012fa020 100644 --- a/api/modules/tokens_hash_token_.html +++ b/api/modules/tokens_hash_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/hash-token"

    -
    +
    - +
    diff --git a/api/modules/tokens_html_token_.html b/api/modules/tokens_html_token_.html index 399cbabfe..bc7f7fbb9 100644 --- a/api/modules/tokens_html_token_.html +++ b/api/modules/tokens_html_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/html-token"

    -
    +
    - +
    diff --git a/api/modules/tokens_identifier_token_.html b/api/modules/tokens_identifier_token_.html index 03ec0c616..13f05fd3e 100644 --- a/api/modules/tokens_identifier_token_.html +++ b/api/modules/tokens_identifier_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/identifier-token"

    -
    +
    - +
    diff --git a/api/modules/tokens_literal_token_.html b/api/modules/tokens_literal_token_.html index ebd4d3bf7..f2ac522cd 100644 --- a/api/modules/tokens_literal_token_.html +++ b/api/modules/tokens_literal_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/literal-token"

    -
    +
    - +
    diff --git a/api/modules/tokens_number_token_.html b/api/modules/tokens_number_token_.html index bb1499bb4..fc23c25e7 100644 --- a/api/modules/tokens_number_token_.html +++ b/api/modules/tokens_number_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/number-token"

    -
    +
    - +
    diff --git a/api/modules/tokens_operator_token_.html b/api/modules/tokens_operator_token_.html index 8ec953d41..e9dd4c807 100644 --- a/api/modules/tokens_operator_token_.html +++ b/api/modules/tokens_operator_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,33 +87,33 @@

    External module: "tokens/operator-token"

    -
    +
    -

    Object literals

    Const precedence

    precedence: object

    Defined in tokens/operator-token.ts:4

    +

    Object literals

    Const precedence

    precedence: object

    Defined in tokens/operator-token.ts:4

    !=

    !=: number = 1

    -

    Defined in tokens/operator-token.ts:6

    +

    Defined in tokens/operator-token.ts:6

    <

    <: number = 1

    -

    Defined in tokens/operator-token.ts:8

    +

    Defined in tokens/operator-token.ts:8

    <=

    <=: number = 1

    -

    Defined in tokens/operator-token.ts:10

    +

    Defined in tokens/operator-token.ts:10

    ==

    ==: number = 1

    -

    Defined in tokens/operator-token.ts:5

    +

    Defined in tokens/operator-token.ts:5

    >

    >: number = 1

    -

    Defined in tokens/operator-token.ts:7

    +

    Defined in tokens/operator-token.ts:7

    >=

    >=: number = 1

    -

    Defined in tokens/operator-token.ts:9

    +

    Defined in tokens/operator-token.ts:9

    and

    and: number = 0

    -

    Defined in tokens/operator-token.ts:12

    +

    Defined in tokens/operator-token.ts:12

    contains

    contains: number = 1

    -

    Defined in tokens/operator-token.ts:11

    +

    Defined in tokens/operator-token.ts:11

    or

    or: number = 0

    -

    Defined in tokens/operator-token.ts:13

    +

    Defined in tokens/operator-token.ts:13

    - +
    @@ -122,7 +122,7 @@
    Contents -
    1. Object literals
      1. Const precedence
      2. ▪ precedence: object
      3. !=
      4. <
      5. <=
      6. ==
      7. >
      8. >=
      9. and
      10. contains
      11. or
    +
    1. Object literals
      1. Const precedence
      2. ▪ precedence: object
      3. !=
      4. <
      5. <=
      6. ==
      7. >
      8. >=
      9. and
      10. contains
      11. or
    Back to Top
    diff --git a/api/modules/tokens_output_token_.html b/api/modules/tokens_output_token_.html index d16d553bc..81b8c70d1 100644 --- a/api/modules/tokens_output_token_.html +++ b/api/modules/tokens_output_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/output-token"

    -
    +
    - +
    diff --git a/api/modules/tokens_property_access_token_.html b/api/modules/tokens_property_access_token_.html index 2a104972a..3fe7cc30f 100644 --- a/api/modules/tokens_property_access_token_.html +++ b/api/modules/tokens_property_access_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/property-access-token"

    -
    +
    - +
    diff --git a/api/modules/tokens_quoted_token_.html b/api/modules/tokens_quoted_token_.html index 2d315fae4..ada5a5b4c 100644 --- a/api/modules/tokens_quoted_token_.html +++ b/api/modules/tokens_quoted_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/quoted-token"

    -
    +
    - +
    diff --git a/api/modules/tokens_range_token_.html b/api/modules/tokens_range_token_.html index 2fc72ad38..75c968315 100644 --- a/api/modules/tokens_range_token_.html +++ b/api/modules/tokens_range_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/range-token"

    -
    +
    - +
    diff --git a/api/modules/tokens_tag_token_.html b/api/modules/tokens_tag_token_.html index 6b29a8777..616f0593e 100644 --- a/api/modules/tokens_tag_token_.html +++ b/api/modules/tokens_tag_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/tag-token"

    -
    +
    - +
    diff --git a/api/modules/tokens_token_.html b/api/modules/tokens_token_.html index c5b395295..abe2f6305 100644 --- a/api/modules/tokens_token_.html +++ b/api/modules/tokens_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/token"

    -
    +
    - +
    diff --git a/api/modules/tokens_toplevel_token_.html b/api/modules/tokens_toplevel_token_.html index be38dcb43..f56e92a03 100644 --- a/api/modules/tokens_toplevel_token_.html +++ b/api/modules/tokens_toplevel_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,16 +87,16 @@

    External module: "tokens/toplevel-token"

    -
    +

    Type aliases

    TopLevelToken

    Ƭ TopLevelToken: TagToken | OutputToken | HTMLToken

    -

    Defined in tokens/toplevel-token.ts:5

    +

    Defined in tokens/toplevel-token.ts:5

    - +
    diff --git a/api/modules/tokens_value_token_.html b/api/modules/tokens_value_token_.html index 45d048c48..50d23780b 100644 --- a/api/modules/tokens_value_token_.html +++ b/api/modules/tokens_value_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,16 +87,16 @@

    External module: "tokens/value-token"

    -
    +

    Type aliases

    ValueToken

    Ƭ ValueToken: RangeToken | LiteralToken | QuotedToken | PropertyAccessToken

    -

    Defined in tokens/value-token.ts:6

    +

    Defined in tokens/value-token.ts:6

    - +
    diff --git a/api/modules/types_.html b/api/modules/types_.html index 3282edf7f..09d719aff 100644 --- a/api/modules/types_.html +++ b/api/modules/types_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "types"

    -
    +
    - +
    diff --git a/api/modules/util_assert_.html b/api/modules/util_assert_.html index d8aee2bf3..9fe185dec 100644 --- a/api/modules/util_assert_.html +++ b/api/modules/util_assert_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "util/assert"

    -
    +

    Functions

    assert

    assert<T>(predicate: T | null | undefined, message?: undefined | function): void

    -

    Defined in util/assert.ts:3

    +

    Defined in util/assert.ts:3

    Type parameters:

    T

    Parameters:

    @@ -116,7 +116,7 @@
    - +
    diff --git a/api/modules/util_async_.html b/api/modules/util_async_.html index cec25469e..3579d0f4f 100644 --- a/api/modules/util_async_.html +++ b/api/modules/util_async_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "util/async"

    -
    +

    Type aliases

    resolver

    Ƭ resolver: function

    -

    Defined in util/async.ts:3

    +

    Defined in util/async.ts:3

    Type declaration:

    ▸ (x?: any): any

    Parameters:

    @@ -108,7 +108,7 @@

    Functions

    createRejectedThenable

    createRejectedThenable(err: Error): Thenable

    -

    Defined in util/async.ts:18

    +

    Defined in util/async.ts:18

    Parameters:

    @@ -125,7 +125,7 @@

    Returns: Thenable


    createResolvedThenable

    createResolvedThenable(value: any): Thenable

    -

    Defined in util/async.ts:10

    +

    Defined in util/async.ts:10

    Parameters:

    @@ -142,7 +142,7 @@

    Returns: Thenable


    isAsyncIterator

    isAsyncIterator(val: any): boolean

    -

    Defined in util/async.ts:33

    +

    Defined in util/async.ts:33

    Parameters:

    @@ -159,7 +159,7 @@

    Returns: boolean


    isThenable

    isThenable(val: any): boolean

    -

    Defined in util/async.ts:29

    +

    Defined in util/async.ts:29

    Parameters:

    @@ -176,7 +176,7 @@

    Returns: boolean


    toPromise

    toPromise(val: IterableIterator‹any› | Thenable | any): Promise‹any›

    -

    Defined in util/async.ts:65

    +

    Defined in util/async.ts:65

    Parameters:

    @@ -193,7 +193,7 @@

    Returns: Promise‹any›


    toThenable

    toThenable(val: IterableIterator‹any› | Thenable | any): Thenable

    -

    Defined in util/async.ts:38

    +

    Defined in util/async.ts:38

    Parameters:

    @@ -210,7 +210,7 @@

    Returns: Thenable


    toValue

    toValue(val: IterableIterator‹any› | Thenable | any): any

    -

    Defined in util/async.ts:70

    +

    Defined in util/async.ts:70

    Parameters:

    @@ -228,7 +228,7 @@
    - +
    diff --git a/api/modules/util_character_.html b/api/modules/util_character_.html index dfd1bc57a..48701304a 100644 --- a/api/modules/util_character_.html +++ b/api/modules/util_character_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,37 +87,37 @@

    External module: "util/character"

    -
    +

    Variables

    Const BLANK

    BLANK: 4 = 4

    -

    Defined in util/character.ts:8

    +

    Defined in util/character.ts:8


    Const IDENTIFIER

    IDENTIFIER: 1 = 1

    -

    Defined in util/character.ts:6

    +

    Defined in util/character.ts:6


    Const INLINE_BLANK

    INLINE_BLANK: 16 = 16

    -

    Defined in util/character.ts:10

    +

    Defined in util/character.ts:10


    Const NUMBER

    NUMBER: 32 = 32

    -

    Defined in util/character.ts:11

    +

    Defined in util/character.ts:11


    Const OPERATOR

    OPERATOR: 2 = 2

    -

    Defined in util/character.ts:7

    +

    Defined in util/character.ts:7


    Const QUOTE

    QUOTE: 8 = 8

    -

    Defined in util/character.ts:9

    +

    Defined in util/character.ts:9


    Const SIGN

    SIGN: 64 = 64

    -

    Defined in util/character.ts:12

    +

    Defined in util/character.ts:12


    Const TYPES

    TYPES: number[] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 4, 4, 4, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 2, 8, 0, 0, 0, 0, 8, 0, 0, 0, 64, 0, 65, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 0, 2, 2, 2, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]

    -

    Defined in util/character.ts:5

    +

    Defined in util/character.ts:5

    - +
    diff --git a/api/modules/util_collection_.html b/api/modules/util_collection_.html index 39345cb0c..51553f29a 100644 --- a/api/modules/util_collection_.html +++ b/api/modules/util_collection_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "util/collection"

    -
    +

    Functions

    toArray

    toArray(val: any): any[]

    -

    Defined in util/collection.ts:10

    +

    Defined in util/collection.ts:10

    Parameters:

    @@ -109,7 +109,7 @@

    Returns: any[]


    toEnumerable

    toEnumerable(val: any): any[]

    -

    Defined in util/collection.ts:3

    +

    Defined in util/collection.ts:3

    Parameters:

    @@ -127,7 +127,7 @@
    - +
    diff --git a/api/modules/util_error_.html b/api/modules/util_error_.html index 528646348..3be872f7c 100644 --- a/api/modules/util_error_.html +++ b/api/modules/util_error_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "util/error"

    -
    +

    Functions

    mkContext

    mkContext(token: Token): string

    -

    Defined in util/error.ts:82

    +

    Defined in util/error.ts:82

    Parameters:

    @@ -109,7 +109,7 @@

    Returns: string


    mkMessage

    mkMessage(msg: string, token: Token): string

    -

    Defined in util/error.ts:101

    +

    Defined in util/error.ts:101

    Parameters:

    @@ -131,7 +131,7 @@
    - +
    diff --git a/api/modules/util_literal_.html b/api/modules/util_literal_.html index 7e850e7ce..bf4740835 100644 --- a/api/modules/util_literal_.html +++ b/api/modules/util_literal_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,29 +87,29 @@

    External module: "util/literal"

    -
    +

    Variables

    Const nil

    nil: NullDrop = new NullDrop()

    -

    Defined in util/literal.ts:5

    -

    Object literals

    Const literalValues

    literalValues: object

    Defined in util/literal.ts:6

    +

    Defined in util/literal.ts:5

    +

    Object literals

    Const literalValues

    literalValues: object

    Defined in util/literal.ts:6

    blank

    blank: BlankDrop = new BlankDrop()

    -

    Defined in util/literal.ts:12

    +

    Defined in util/literal.ts:12

    empty

    empty: EmptyDrop = new EmptyDrop()

    -

    Defined in util/literal.ts:11

    +

    Defined in util/literal.ts:11

    false

    false: boolean = false

    -

    Defined in util/literal.ts:8

    +

    Defined in util/literal.ts:8

    nil

    nil: NullDrop = nil

    -

    Defined in util/literal.ts:9

    +

    Defined in util/literal.ts:9

    null

    null: NullDrop = nil

    -

    Defined in util/literal.ts:10

    +

    Defined in util/literal.ts:10

    true

    true: boolean = true

    -

    Defined in util/literal.ts:7

    +

    Defined in util/literal.ts:7

    - +
    @@ -118,7 +118,7 @@
    Contents -
    1. Variables
      1. Const nil
    2. Object literals
      1. Const literalValues
      2. ▪ literalValues: object
      3. blank
      4. empty
      5. false
      6. nil
      7. null
      8. true
    +
    1. Variables
      1. Const nil
    2. Object literals
      1. Const literalValues
      2. ▪ literalValues: object
      3. blank
      4. empty
      5. false
      6. nil
      7. null
      8. true
    Back to Top
    diff --git a/api/modules/util_operator_trie_.html b/api/modules/util_operator_trie_.html index ef831de7a..d7ddc44e0 100644 --- a/api/modules/util_operator_trie_.html +++ b/api/modules/util_operator_trie_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "util/operator-trie"

    -
    +

    Functions

    createTrie

    createTrie(operators: Operators): Trie

    -

    Defined in util/operator-trie.ts:8

    +

    Defined in util/operator-trie.ts:8

    Parameters:

    @@ -110,7 +110,7 @@
    - +
    diff --git a/api/modules/util_strftime_.html b/api/modules/util_strftime_.html index 199564959..ba41157ac 100644 --- a/api/modules/util_strftime_.html +++ b/api/modules/util_strftime_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,26 +87,32 @@

    External module: "util/strftime"

    -
    +
    -

    Variables

    Const dayNames

    dayNames: string[] = [
    ‘Sunday’, ‘Monday’, ‘Tuesday’, ‘Wednesday’, ‘Thursday’, ‘Friday’, ‘Saturday’
    ]

    -

    Defined in util/strftime.ts:8

    +

    Variables

    Const ISO8601_TIMEZONE_PATTERN

    ISO8601_TIMEZONE_PATTERN: RegExp = /([zZ]|([+-])(\d{2}):(\d{2}))$/

    +

    Defined in util/strftime.ts:4

    +
    +

    Const dayNames

    dayNames: string[] = [
    ‘Sunday’, ‘Monday’, ‘Tuesday’, ‘Wednesday’, ‘Thursday’, ‘Friday’, ‘Saturday’
    ]

    +

    Defined in util/strftime.ts:10


    Const dayNamesShort

    dayNamesShort: string[] = dayNames.map(abbr)

    -

    Defined in util/strftime.ts:12

    +

    Defined in util/strftime.ts:14


    Const monthNames

    monthNames: string[] = [
    ‘January’, ‘February’, ‘March’, ‘April’, ‘May’, ‘June’, ‘July’, ‘August’,
    ‘September’, ‘October’, ‘November’, ‘December’
    ]

    -

    Defined in util/strftime.ts:4

    +

    Defined in util/strftime.ts:6


    Const monthNamesShort

    monthNamesShort: string[] = monthNames.map(abbr)

    -

    Defined in util/strftime.ts:11

    +

    Defined in util/strftime.ts:13


    Const rFormat

    rFormat: RegExp = /%([-_0^#:]+)?(\d+)?([EO])?(.)/

    -

    Defined in util/strftime.ts:3

    +

    Defined in util/strftime.ts:5

    +
    +

    Const timezoneOffset

    timezoneOffset: number = new Date().getTimezoneOffset()

    +

    Defined in util/strftime.ts:3

    Functions

    abbr

    abbr(str: string): string

    -

    Defined in util/strftime.ts:25

    +

    Defined in util/strftime.ts:27

    Parameters:

    @@ -123,7 +129,7 @@

    Returns: string


    century

    century(d: Date): number

    -

    Defined in util/strftime.ts:58

    +

    Defined in util/strftime.ts:60

    Parameters:

    @@ -139,8 +145,25 @@

    Returns: number


    +

    createDateFixedToTimezone

    createDateFixedToTimezone(dateString: string): Date

    +

    Defined in util/strftime.ts:186

    +

    Parameters:

    + + + + + + + + + + + +
    NameType
    dateStringstring
    +

    Returns: Date

    +

    daysInMonth

    daysInMonth(d: Date): number[]

    -

    Defined in util/strftime.ts:30

    +

    Defined in util/strftime.ts:32

    Parameters:

    @@ -156,8 +179,8 @@

    Returns: number[]


    -

    default

    default(inputDate: Date, formatStr: string): string

    -

    Defined in util/strftime.ts:141

    +

    default

    default(d: Date, formatStr: string): string

    +

    Defined in util/strftime.ts:142

    Parameters:

    @@ -167,7 +190,7 @@ - + @@ -178,7 +201,7 @@

    Returns: string


    format

    format(d: Date, match: RegExpExecArray): any

    -

    Defined in util/strftime.ts:160

    +

    Defined in util/strftime.ts:156

    Parameters:

    inputDated Date
    @@ -199,7 +222,7 @@

    Returns: any


    getDayOfYear

    getDayOfYear(d: Date): number

    -

    Defined in util/strftime.ts:34

    +

    Defined in util/strftime.ts:36

    Parameters:

    @@ -216,7 +239,7 @@

    Returns: number


    getSuffix

    getSuffix(d: Date): any

    -

    Defined in util/strftime.ts:53

    +

    Defined in util/strftime.ts:55

    Parameters:

    @@ -233,7 +256,7 @@

    Returns: any


    getWeekOfYear

    getWeekOfYear(d: Date, startDay: number): string

    -

    Defined in util/strftime.ts:41

    +

    Defined in util/strftime.ts:43

    Parameters:

    @@ -254,7 +277,7 @@

    Returns: string


    isLeapYear

    isLeapYear(d: Date): boolean

    -

    Defined in util/strftime.ts:49

    +

    Defined in util/strftime.ts:51

    Parameters:

    @@ -269,12 +292,12 @@

    Returns: boolean

    -

    Object literals

    Const formatCodes

    formatCodes: object

    Defined in util/strftime.ts:92

    +

    Object literals

    Const formatCodes

    formatCodes: object

    Defined in util/strftime.ts:94

    %

    %(): string

    -

    Defined in util/strftime.ts:139

    +

    Defined in util/strftime.ts:140

    Returns: string

    A

    A(d: Date): string

    -

    Defined in util/strftime.ts:94

    +

    Defined in util/strftime.ts:96

    Parameters:

    @@ -290,7 +313,7 @@

    Returns: string

    B

    B(d: Date): string

    -

    Defined in util/strftime.ts:96

    +

    Defined in util/strftime.ts:98

    Parameters:

    @@ -306,7 +329,7 @@

    Returns: string

    C

    C(d: Date): number

    -

    Defined in util/strftime.ts:98

    +

    Defined in util/strftime.ts:100

    Parameters:

    @@ -322,7 +345,7 @@

    Returns: number

    H

    H(d: Date): number

    -

    Defined in util/strftime.ts:101

    +

    Defined in util/strftime.ts:103

    Parameters:

    @@ -338,7 +361,7 @@

    Returns: number

    I

    I(d: Date): string

    -

    Defined in util/strftime.ts:102

    +

    Defined in util/strftime.ts:104

    Parameters:

    @@ -354,7 +377,7 @@

    Returns: string

    L

    L(d: Date): number

    -

    Defined in util/strftime.ts:106

    +

    Defined in util/strftime.ts:108

    Parameters:

    @@ -370,7 +393,7 @@

    Returns: number

    M

    M(d: Date): number

    -

    Defined in util/strftime.ts:108

    +

    Defined in util/strftime.ts:110

    Parameters:

    @@ -386,7 +409,7 @@

    Returns: number

    N

    N(d: Date, opts: FormatOptions): any

    -

    Defined in util/strftime.ts:109

    +

    Defined in util/strftime.ts:111

    Parameters:

    @@ -406,7 +429,7 @@

    Returns: any

    P

    P(d: Date): *”am” | “pm”*

    -

    Defined in util/strftime.ts:115

    +

    Defined in util/strftime.ts:117

    Parameters:

    @@ -422,7 +445,7 @@

    Returns: *”am” | “pm”*

    S

    S(d: Date): number

    -

    Defined in util/strftime.ts:118

    +

    Defined in util/strftime.ts:120

    Parameters:

    @@ -438,7 +461,7 @@

    Returns: number

    U

    U(d: Date): string

    -

    Defined in util/strftime.ts:120

    +

    Defined in util/strftime.ts:122

    Parameters:

    @@ -454,7 +477,7 @@

    Returns: string

    W

    W(d: Date): string

    -

    Defined in util/strftime.ts:122

    +

    Defined in util/strftime.ts:124

    Parameters:

    @@ -470,7 +493,7 @@

    Returns: string

    X

    X(d: Date): string

    -

    Defined in util/strftime.ts:124

    +

    Defined in util/strftime.ts:126

    Parameters:

    @@ -486,7 +509,7 @@

    Returns: string

    Y

    Y(d: Date): number

    -

    Defined in util/strftime.ts:126

    +

    Defined in util/strftime.ts:128

    Parameters:

    @@ -502,7 +525,7 @@

    Returns: number

    a

    a(d: Date): string

    -

    Defined in util/strftime.ts:93

    +

    Defined in util/strftime.ts:95

    Parameters:

    @@ -518,7 +541,7 @@

    Returns: string

    b

    b(d: Date): string

    -

    Defined in util/strftime.ts:95

    +

    Defined in util/strftime.ts:97

    Parameters:

    @@ -534,7 +557,7 @@

    Returns: string

    c

    c(d: Date): string

    -

    Defined in util/strftime.ts:97

    +

    Defined in util/strftime.ts:99

    Parameters:

    @@ -550,7 +573,7 @@

    Returns: string

    d

    d(d: Date): number

    -

    Defined in util/strftime.ts:99

    +

    Defined in util/strftime.ts:101

    Parameters:

    @@ -566,7 +589,7 @@

    Returns: number

    e

    e(d: Date): number

    -

    Defined in util/strftime.ts:100

    +

    Defined in util/strftime.ts:102

    Parameters:

    @@ -582,7 +605,7 @@

    Returns: number

    j

    j(d: Date): number

    -

    Defined in util/strftime.ts:103

    +

    Defined in util/strftime.ts:105

    Parameters:

    @@ -598,7 +621,7 @@

    Returns: number

    k

    k(d: Date): number

    -

    Defined in util/strftime.ts:104

    +

    Defined in util/strftime.ts:106

    Parameters:

    @@ -614,7 +637,7 @@

    Returns: number

    l

    l(d: Date): string

    -

    Defined in util/strftime.ts:105

    +

    Defined in util/strftime.ts:107

    Parameters:

    @@ -630,7 +653,7 @@

    Returns: string

    m

    m(d: Date): number

    -

    Defined in util/strftime.ts:107

    +

    Defined in util/strftime.ts:109

    Parameters:

    @@ -646,10 +669,10 @@

    Returns: number

    n

    n(): string

    -

    Defined in util/strftime.ts:138

    +

    Defined in util/strftime.ts:139

    Returns: string

    p

    p(d: Date): *”AM” | “PM”*

    -

    Defined in util/strftime.ts:114

    +

    Defined in util/strftime.ts:116

    Parameters:

    @@ -665,7 +688,7 @@

    Returns: *”AM” | “PM”*

    q

    q(d: Date): any

    -

    Defined in util/strftime.ts:116

    +

    Defined in util/strftime.ts:118

    Parameters:

    @@ -681,7 +704,7 @@

    Returns: any

    s

    s(d: Date): number

    -

    Defined in util/strftime.ts:117

    +

    Defined in util/strftime.ts:119

    Parameters:

    @@ -697,10 +720,10 @@

    Returns: number

    t

    t(): string

    -

    Defined in util/strftime.ts:137

    +

    Defined in util/strftime.ts:138

    Returns: string

    u

    u(d: Date): number

    -

    Defined in util/strftime.ts:119

    +

    Defined in util/strftime.ts:121

    Parameters:

    @@ -716,7 +739,7 @@

    Returns: number

    w

    w(d: Date): number

    -

    Defined in util/strftime.ts:121

    +

    Defined in util/strftime.ts:123

    Parameters:

    @@ -732,7 +755,7 @@

    Returns: number

    x

    x(d: Date): string

    -

    Defined in util/strftime.ts:123

    +

    Defined in util/strftime.ts:125

    Parameters:

    @@ -748,7 +771,7 @@

    Returns: string

    y

    y(d: Date): string

    -

    Defined in util/strftime.ts:125

    +

    Defined in util/strftime.ts:127

    Parameters:

    @@ -764,7 +787,7 @@

    Returns: string

    z

    z(d: Date, opts: FormatOptions): string

    -

    Defined in util/strftime.ts:127

    +

    Defined in util/strftime.ts:129

    Parameters:

    @@ -784,69 +807,69 @@

    Returns: string


    -

    Const padChars

    padChars: object

    Defined in util/strftime.ts:80

    +

    Const padChars

    padChars: object

    Defined in util/strftime.ts:82

    A

    A: string = “ “

    -

    Defined in util/strftime.ts:82

    +

    Defined in util/strftime.ts:84

    B

    B: string = “ “

    -

    Defined in util/strftime.ts:84

    +

    Defined in util/strftime.ts:86

    P

    P: string = “ “

    -

    Defined in util/strftime.ts:90

    +

    Defined in util/strftime.ts:92

    a

    a: string = “ “

    -

    Defined in util/strftime.ts:81

    +

    Defined in util/strftime.ts:83

    b

    b: string = “ “

    -

    Defined in util/strftime.ts:83

    +

    Defined in util/strftime.ts:85

    c

    c: string = “ “

    -

    Defined in util/strftime.ts:85

    +

    Defined in util/strftime.ts:87

    e

    e: string = “ “

    -

    Defined in util/strftime.ts:86

    +

    Defined in util/strftime.ts:88

    k

    k: string = “ “

    -

    Defined in util/strftime.ts:87

    +

    Defined in util/strftime.ts:89

    l

    l: string = “ “

    -

    Defined in util/strftime.ts:88

    +

    Defined in util/strftime.ts:90

    p

    p: string = “ “

    -

    Defined in util/strftime.ts:89

    +

    Defined in util/strftime.ts:91


    -

    Const padWidths

    padWidths: object

    Defined in util/strftime.ts:63

    +

    Const padWidths

    padWidths: object

    Defined in util/strftime.ts:65

    H

    H: number = 2

    -

    Defined in util/strftime.ts:66

    +

    Defined in util/strftime.ts:68

    I

    I: number = 2

    -

    Defined in util/strftime.ts:67

    +

    Defined in util/strftime.ts:69

    L

    L: number = 3

    -

    Defined in util/strftime.ts:71

    +

    Defined in util/strftime.ts:73

    M

    M: number = 2

    -

    Defined in util/strftime.ts:73

    +

    Defined in util/strftime.ts:75

    S

    S: number = 2

    -

    Defined in util/strftime.ts:74

    +

    Defined in util/strftime.ts:76

    U

    U: number = 2

    -

    Defined in util/strftime.ts:75

    +

    Defined in util/strftime.ts:77

    W

    W: number = 2

    -

    Defined in util/strftime.ts:76

    +

    Defined in util/strftime.ts:78

    d

    d: number = 2

    -

    Defined in util/strftime.ts:64

    +

    Defined in util/strftime.ts:66

    e

    e: number = 2

    -

    Defined in util/strftime.ts:65

    +

    Defined in util/strftime.ts:67

    j

    j: number = 3

    -

    Defined in util/strftime.ts:68

    +

    Defined in util/strftime.ts:70

    k

    k: number = 2

    -

    Defined in util/strftime.ts:69

    +

    Defined in util/strftime.ts:71

    l

    l: number = 2

    -

    Defined in util/strftime.ts:70

    +

    Defined in util/strftime.ts:72

    m

    m: number = 2

    -

    Defined in util/strftime.ts:72

    +

    Defined in util/strftime.ts:74


    -

    Const suffixes

    suffixes: object

    Defined in util/strftime.ts:13

    +

    Const suffixes

    suffixes: object

    Defined in util/strftime.ts:15

    1

    1: string = “st”

    -

    Defined in util/strftime.ts:14

    +

    Defined in util/strftime.ts:16

    2

    2: string = “nd”

    -

    Defined in util/strftime.ts:15

    +

    Defined in util/strftime.ts:17

    3

    3: string = “rd”

    -

    Defined in util/strftime.ts:16

    +

    Defined in util/strftime.ts:18

    default

    default: string = “th”

    -

    Defined in util/strftime.ts:17

    +

    Defined in util/strftime.ts:19

    @@ -855,7 +878,7 @@
    Contents -
    1. Variables
      1. Const dayNames
      2. Const dayNamesShort
      3. Const monthNames
      4. Const monthNamesShort
      5. Const rFormat
    2. Functions
      1. abbr
      2. century
      3. daysInMonth
      4. default
      5. format
      6. getDayOfYear
      7. getSuffix
      8. getWeekOfYear
      9. isLeapYear
    3. Object literals
      1. Const formatCodes
      2. ▪ formatCodes: object
      3. %
      4. A
      5. B
      6. C
      7. H
      8. I
      9. L
      10. M
      11. N
      12. P
      13. S
      14. U
      15. W
      16. X
      17. Y
      18. a
      19. b
      20. c
      21. d
      22. e
      23. j
      24. k
      25. l
      26. m
      27. n
      28. p
      29. q
      30. s
      31. t
      32. u
      33. w
      34. x
      35. y
      36. z
      37. Const padChars
      38. ▪ padChars: object
      39. A
      40. B
      41. P
      42. a
      43. b
      44. c
      45. e
      46. k
      47. l
      48. p
      49. Const padWidths
      50. ▪ padWidths: object
      51. H
      52. I
      53. L
      54. M
      55. S
      56. U
      57. W
      58. d
      59. e
      60. j
      61. k
      62. l
      63. m
      64. Const suffixes
      65. ▪ suffixes: object
      66. 1
      67. 2
      68. 3
      69. default
    +
    1. Variables
      1. Const ISO8601_TIMEZONE_PATTERN
      2. Const dayNames
      3. Const dayNamesShort
      4. Const monthNames
      5. Const monthNamesShort
      6. Const rFormat
      7. Const timezoneOffset
    2. Functions
      1. abbr
      2. century
      3. createDateFixedToTimezone
      4. daysInMonth
      5. default
      6. format
      7. getDayOfYear
      8. getSuffix
      9. getWeekOfYear
      10. isLeapYear
    3. Object literals
      1. Const formatCodes
      2. ▪ formatCodes: object
      3. %
      4. A
      5. B
      6. C
      7. H
      8. I
      9. L
      10. M
      11. N
      12. P
      13. S
      14. U
      15. W
      16. X
      17. Y
      18. a
      19. b
      20. c
      21. d
      22. e
      23. j
      24. k
      25. l
      26. m
      27. n
      28. p
      29. q
      30. s
      31. t
      32. u
      33. w
      34. x
      35. y
      36. z
      37. Const padChars
      38. ▪ padChars: object
      39. A
      40. B
      41. P
      42. a
      43. b
      44. c
      45. e
      46. k
      47. l
      48. p
      49. Const padWidths
      50. ▪ padWidths: object
      51. H
      52. I
      53. L
      54. M
      55. S
      56. U
      57. W
      58. d
      59. e
      60. j
      61. k
      62. l
      63. m
      64. Const suffixes
      65. ▪ suffixes: object
      66. 1
      67. 2
      68. 3
      69. default
    Back to Top
    diff --git a/api/modules/util_type_guards_.html b/api/modules/util_type_guards_.html index 0cf0452aa..af3658123 100644 --- a/api/modules/util_type_guards_.html +++ b/api/modules/util_type_guards_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "util/type-guards"

    -
    +

    Functions

    getKind

    getKind(val: any): any

    -

    Defined in util/type-guards.ts:58

    +

    Defined in util/type-guards.ts:58

    Parameters:

    @@ -109,7 +109,7 @@

    Returns: any


    isDelimitedToken

    isDelimitedToken(val: any): boolean

    -

    Defined in util/type-guards.ts:14

    +

    Defined in util/type-guards.ts:14

    Parameters:

    @@ -126,7 +126,7 @@

    Returns: boolean


    isHTMLToken

    isHTMLToken(val: any): boolean

    -

    Defined in util/type-guards.ts:22

    +

    Defined in util/type-guards.ts:22

    Parameters:

    @@ -143,7 +143,7 @@

    Returns: boolean


    isLiteralToken

    isLiteralToken(val: any): boolean

    -

    Defined in util/type-guards.ts:38

    +

    Defined in util/type-guards.ts:38

    Parameters:

    @@ -160,7 +160,7 @@

    Returns: boolean


    isNumberToken

    isNumberToken(val: any): boolean

    -

    Defined in util/type-guards.ts:42

    +

    Defined in util/type-guards.ts:42

    Parameters:

    @@ -177,7 +177,7 @@

    Returns: boolean


    isOperatorToken

    isOperatorToken(val: any): boolean

    -

    Defined in util/type-guards.ts:18

    +

    Defined in util/type-guards.ts:18

    Parameters:

    @@ -194,7 +194,7 @@

    Returns: boolean


    isOutputToken

    isOutputToken(val: any): boolean

    -

    Defined in util/type-guards.ts:26

    +

    Defined in util/type-guards.ts:26

    Parameters:

    @@ -211,7 +211,7 @@

    Returns: boolean


    isPropertyAccessToken

    isPropertyAccessToken(val: any): boolean

    -

    Defined in util/type-guards.ts:46

    +

    Defined in util/type-guards.ts:46

    Parameters:

    @@ -228,7 +228,7 @@

    Returns: boolean


    isQuotedToken

    isQuotedToken(val: any): boolean

    -

    Defined in util/type-guards.ts:34

    +

    Defined in util/type-guards.ts:34

    Parameters:

    @@ -245,7 +245,7 @@

    Returns: boolean


    isRangeToken

    isRangeToken(val: any): boolean

    -

    Defined in util/type-guards.ts:54

    +

    Defined in util/type-guards.ts:54

    Parameters:

    @@ -262,7 +262,7 @@

    Returns: boolean


    isTagToken

    isTagToken(val: any): boolean

    -

    Defined in util/type-guards.ts:30

    +

    Defined in util/type-guards.ts:30

    Parameters:

    @@ -279,7 +279,7 @@

    Returns: boolean


    isWordToken

    isWordToken(val: any): boolean

    -

    Defined in util/type-guards.ts:50

    +

    Defined in util/type-guards.ts:50

    Parameters:

    @@ -297,7 +297,7 @@
    - +
    diff --git a/api/modules/util_underscore_.html b/api/modules/util_underscore_.html index 92988176f..3b9eebd57 100644 --- a/api/modules/util_underscore_.html +++ b/api/modules/util_underscore_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,17 +87,17 @@

    External module: "util/underscore"

    -
    +

    Variables

    Const toLowerCase

    toLowerCase: toLowerCase = String.prototype.toLowerCase

    -

    Defined in util/underscore.ts:4

    +

    Defined in util/underscore.ts:4


    Const toStr

    toStr: toString = Object.prototype.toString

    -

    Defined in util/underscore.ts:3

    +

    Defined in util/underscore.ts:3

    Functions

    caseInsensitiveCompare

    caseInsensitiveCompare(a: any, b: any): 1 | 0 | -1

    -

    Defined in util/underscore.ts:140

    +

    Defined in util/underscore.ts:137

    Parameters:

    @@ -118,7 +118,7 @@

    Returns: 1 | 0 | -1


    changeCase

    changeCase(str: string): string

    -

    Defined in util/underscore.ts:130

    +

    Defined in util/underscore.ts:127

    Parameters:

    @@ -135,7 +135,7 @@

    Returns: string


    ellipsis

    ellipsis(str: string, N: number): string

    -

    Defined in util/underscore.ts:135

    +

    Defined in util/underscore.ts:132

    Parameters:

    @@ -156,7 +156,7 @@

    Returns: string


    forOwn

    forOwn<T>(object: object | undefined, iteratee: function): object

    -

    Defined in util/underscore.ts:66

    +

    Defined in util/underscore.ts:63

    Type parameters:

    T

    Parameters:

    @@ -190,7 +190,7 @@

    identify

    identify<T>(val: T): T

    -

    Defined in util/underscore.ts:119

    +

    Defined in util/underscore.ts:116

    Type parameters:

    T

    Parameters:

    @@ -209,7 +209,7 @@

    Returns: T


    isArray

    isArray(value: any): boolean

    -

    Defined in util/underscore.ts:53

    +

    Defined in util/underscore.ts:50

    Parameters:

    @@ -226,7 +226,7 @@

    Returns: boolean


    isFunction

    isFunction(value: any): boolean

    -

    Defined in util/underscore.ts:15

    +

    Defined in util/underscore.ts:10

    Parameters:

    @@ -243,7 +243,7 @@

    Returns: boolean


    isNil

    isNil(value: any): boolean

    -

    Defined in util/underscore.ts:49

    +

    Defined in util/underscore.ts:46

    Parameters:

    @@ -260,7 +260,7 @@

    Returns: boolean


    isNumber

    isNumber(value: any): boolean

    -

    Defined in util/underscore.ts:40

    +

    Defined in util/underscore.ts:37

    Parameters:

    @@ -277,7 +277,7 @@

    Returns: boolean


    isObject

    isObject(value: any): boolean

    -

    Defined in util/underscore.ts:91

    +

    Defined in util/underscore.ts:88

    Parameters:

    @@ -294,7 +294,7 @@

    Returns: boolean


    isString

    isString(value: any): boolean

    -

    Defined in util/underscore.ts:11

    +

    Defined in util/underscore.ts:6

    Parameters:

    @@ -311,7 +311,7 @@

    Returns: boolean


    last

    last<T>(arr: T[]): T

    -

    Defined in util/underscore.ts:79

    +

    Defined in util/underscore.ts:76

    Type parameters:

    T

    Parameters:

    @@ -329,7 +329,7 @@

    Returns: T

    last(arr: string): string

    -

    Defined in util/underscore.ts:80

    +

    Defined in util/underscore.ts:77

    Parameters:

    @@ -346,7 +346,7 @@

    Returns: string


    pad

    pad(str: any, length: number, ch: string, add: function): any

    -

    Defined in util/underscore.ts:112

    +

    Defined in util/underscore.ts:109

    Parameters:

    str: any

    length: number

    @@ -373,7 +373,7 @@

    Returns: any


    padEnd

    padEnd(str: any, length: number, ch: string): any

    -

    Defined in util/underscore.ts:108

    +

    Defined in util/underscore.ts:105

    Parameters:

    @@ -402,7 +402,7 @@

    Returns: any


    padStart

    padStart(str: any, length: number, ch: string): any

    -

    Defined in util/underscore.ts:104

    +

    Defined in util/underscore.ts:101

    Parameters:

    @@ -431,7 +431,7 @@

    Returns: any


    promisify

    promisify<T1, T2>(fn: function): function

    -

    Defined in util/underscore.ts:19

    +

    Defined in util/underscore.ts:14

    Type parameters:

    T1

    T2

    @@ -475,7 +475,7 @@

    promisify<T1, T2, T3>(fn: function): function

    -

    Defined in util/underscore.ts:20

    +

    Defined in util/underscore.ts:15

    Type parameters:

    T1

    T2

    @@ -526,7 +526,7 @@

    range

    range(start: number, stop: number, step: number): number[]

    -

    Defined in util/underscore.ts:96

    +

    Defined in util/underscore.ts:93

    Parameters:

    @@ -555,7 +555,7 @@

    Returns: number[]


    snakeCase

    snakeCase(str: string): string

    -

    Defined in util/underscore.ts:123

    +

    Defined in util/underscore.ts:120

    Parameters:

    @@ -572,7 +572,7 @@

    Returns: string


    stringify

    stringify(value: any): string

    -

    Defined in util/underscore.ts:31

    +

    Defined in util/underscore.ts:26

    Parameters:

    @@ -589,7 +589,7 @@

    Returns: string


    toLiquid

    toLiquid(value: any): any

    -

    Defined in util/underscore.ts:44

    +

    Defined in util/underscore.ts:41

    Parameters:

    @@ -606,7 +606,7 @@

    Returns: any


    toValue

    toValue(value: any): any

    -

    Defined in util/underscore.ts:36

    +

    Defined in util/underscore.ts:33

    Parameters:

    @@ -624,7 +624,7 @@
    - +
    diff --git a/filters/abs.html b/filters/abs.html index 1af1cb1ae..f282f2af9 100644 --- a/filters/abs.html +++ b/filters/abs.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    abs

    -
    +
    @@ -95,27 +95,27 @@

    Liquid filter that returns the absolute value of a number.

    Input

    -
    {{ -17 | abs }}
    +
    {{ -17 | abs }}

    Output

    -
    17
    +
    17

    Input

    -
    {{ 4 | abs }}
    +
    {{ 4 | abs }}

    Output

    -
    4
    +
    4

    abs will also work on a string that only contains a number:

    Input

    -
    {{ "-19.86" | abs }}
    +
    {{ "-19.86" | abs }}

    Output

    -
    19.86
    +
    19.86
    diff --git a/filters/append.html b/filters/append.html index 373060b52..e09368005 100644 --- a/filters/append.html +++ b/filters/append.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    append

    -
    +
    @@ -95,21 +95,21 @@

    Concatenates two strings and returns the concatenated value.

    Input

    -
    {{ "/my/fancy/url" | append: ".html" }}
    +
    {{ "/my/fancy/url" | append: ".html" }}

    Output

    -
    /my/fancy/url.html
    +
    /my/fancy/url.html

    append can also be used with variables:

    Input

    -
    {% assign filename = "/index.html" %}
    {{ "website.com" | append: filename }}
    +
    {% assign filename = "/index.html" %}
    {{ "website.com" | append: filename }}

    Output

    -

    website.com/index.html
    +

    website.com/index.html
    diff --git a/filters/at_least.html b/filters/at_least.html index 44194ee4a..14c4068de 100644 --- a/filters/at_least.html +++ b/filters/at_least.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    at_least

    -
    +
    @@ -95,20 +95,20 @@

    Limits a number to a minimum value.

    Input

    -
    {{ 4 | at_least: 5 }}
    +
    {{ 4 | at_least: 5 }}

    Output

    -
    5
    +
    5

    Input

    -
    {{ 4 | at_least: 3 }}
    +
    {{ 4 | at_least: 3 }}

    Output

    -
    4
    +
    4
    diff --git a/filters/at_most.html b/filters/at_most.html index 45b9fd79f..c89bb0486 100644 --- a/filters/at_most.html +++ b/filters/at_most.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    at_most

    -
    +
    @@ -95,20 +95,20 @@

    Limits a number to a maximum value.

    Input

    -
    {{ 4 | at_most: 5 }}
    +
    {{ 4 | at_most: 5 }}

    Output

    -
    4
    +
    4

    Input

    -
    {{ 4 | at_most: 3 }}
    +
    {{ 4 | at_most: 3 }}

    Output

    -
    3
    +
    3
    diff --git a/filters/capitalize.html b/filters/capitalize.html index 54bc5a170..f641773a0 100644 --- a/filters/capitalize.html +++ b/filters/capitalize.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    capitalize

    -
    +
    @@ -95,21 +95,21 @@

    Makes the first character of a string capitalized.

    Input

    -
    {{ "title" | capitalize }}
    +
    {{ "title" | capitalize }}

    Output

    -
    Title
    +
    Title

    capitalize only capitalizes the first character of a string, so later words are not affected:

    Input

    -
    {{ "my great title" | capitalize }}
    +
    {{ "my great title" | capitalize }}

    Output

    -
    My great title
    +
    My great title
    diff --git a/filters/ceil.html b/filters/ceil.html index 98582e12a..f9b915a0a 100644 --- a/filters/ceil.html +++ b/filters/ceil.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    ceil

    -
    +
    @@ -95,33 +95,33 @@

    Rounds the input up to the nearest whole number. LiquidJS tries to convert the input to a number before the filter is applied.

    Input

    -
    {{ 1.2 | ceil }}
    +
    {{ 1.2 | ceil }}

    Output

    -
    2
    +
    2

    Input

    -
    {{ 2.0 | ceil }}
    +
    {{ 2.0 | ceil }}

    Output

    -
    2
    +
    2

    Input

    -
    {{ 183.357 | ceil }}
    +
    {{ 183.357 | ceil }}

    Output

    -
    184
    +
    184

    Here the input value is a string:

    Input

    -
    {{ "3.5" | ceil }}
    +
    {{ "3.5" | ceil }}

    Output

    -
    4
    +
    4
    diff --git a/filters/compact.html b/filters/compact.html index aeb3a2331..1f2e3f2b1 100644 --- a/filters/compact.html +++ b/filters/compact.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    compact

    -
    +
    @@ -96,21 +96,21 @@

    Removes any nil values from an array.

    For this example, assume site.pages is an array of content pages for a website, and some of these pages have an attribute called category that specifies their content category. If we map those categories to an array, some of the array items might be nil if any pages do not have a category attribute.

    Input

    -
    {% assign site_categories = site.pages | map: "category" %}

    {% for category in site_categories %}
    - {{ category }}
    {% endfor %}
    +
    {% assign site_categories = site.pages | map: "category" %}

    {% for category in site_categories %}
    - {{ category }}
    {% endfor %}

    Output

    -
    - business
    - celebrities
    -
    - lifestyle
    - sports
    -
    - technology
    +
    - business
    - celebrities
    -
    - lifestyle
    - sports
    -
    - technology

    By using compact when we create our site_categories array, we can remove all the nil values in the array.

    Input

    -
    {% assign site_categories = site.pages | map: "category" | compact %}

    {% for category in site_categories %}
    - {{ category }}
    {% endfor %}
    +
    {% assign site_categories = site.pages | map: "category" | compact %}

    {% for category in site_categories %}
    - {{ category }}
    {% endfor %}

    Output

    -
    - business
    - celebrities
    - lifestyle
    - sports
    - technology
    +
    - business
    - celebrities
    - lifestyle
    - sports
    - technology
    diff --git a/filters/concat.html b/filters/concat.html index 70c69891e..42b95ed26 100644 --- a/filters/concat.html +++ b/filters/concat.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,27 +87,27 @@

    concat

    -
    +

    Concatenates (joins together) multiple arrays. The resulting array contains all the items from the input arrays.

    Input

    -
    {% assign fruits = "apples, oranges, peaches" | split: ", " %}
    {% assign vegetables = "carrots, turnips, potatoes" | split: ", " %}

    {% assign everything = fruits | concat: vegetables %}

    {% for item in everything %}
    - {{ item }}
    {% endfor %}
    +
    {% assign fruits = "apples, oranges, peaches" | split: ", " %}
    {% assign vegetables = "carrots, turnips, potatoes" | split: ", " %}

    {% assign everything = fruits | concat: vegetables %}

    {% for item in everything %}
    - {{ item }}
    {% endfor %}

    Output

    -
    - apples
    - oranges
    - peaches
    - carrots
    - turnips
    - potatoes
    +
    - apples
    - oranges
    - peaches
    - carrots
    - turnips
    - potatoes

    You can string together concat filters to join more than two arrays:

    Input

    -
    {% assign furniture = "chairs, tables, shelves" | split: ", " %}

    {% assign everything = fruits | concat: vegetables | concat: furniture %}

    {% for item in everything %}
    - {{ item }}
    {% endfor %}
    +
    {% assign furniture = "chairs, tables, shelves" | split: ", " %}

    {% assign everything = fruits | concat: vegetables | concat: furniture %}

    {% for item in everything %}
    - {{ item }}
    {% endfor %}

    Output

    -
    - apples
    - oranges
    - peaches
    - carrots
    - turnips
    - potatoes
    - chairs
    - tables
    - shelves
    +
    - apples
    - oranges
    - peaches
    - carrots
    - turnips
    - potatoes
    - chairs
    - tables
    - shelves
    diff --git a/filters/date.html b/filters/date.html index dddb8aafa..dc4693769 100644 --- a/filters/date.html +++ b/filters/date.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,38 +87,44 @@

    date

    -
    +

    Added in: v1.9.1

    -

    Converts a timestamp into another date format. LiquidJS tries to be conformant with Shopify/Liquid which is using Ruby’s core Time#strftime(string). The input is firstly converted to Date object via new Date().

    +

    Converts a timestamp into another date format. LiquidJS tries to be conformant with Shopify/Liquid which is using Ruby’s core Time#strftime(string). The input is firstly converted to Date object via new Date().

    Input

    -
    {{ article.published_at | date: "%a, %b %d, %y" }}
    +
    {{ article.published_at | date: "%a, %b %d, %y" }}

    Output

    -
    Fri, Jul 17, 15
    +
    Fri, Jul 17, 15
    + +
    TimeZone

    Date will be converted to local time before output. To avoid that, you can set timezoneOffset LiquidJS option to 0, its default value is your local timezone offset which can be obtained by new Date().getTimezoneOffset().

    +

    Input

    -
    {{ article.published_at | date: "%Y" }}
    +
    {{ article.published_at | date: "%Y" }}

    Output

    -
    2015
    +
    2015

    date works on strings if they contain well-formatted dates:

    Input

    -
    {{ "March 14, 2016" | date: "%b %d, %y" }}
    +
    {{ "March 14, 2016" | date: "%b %d, %y" }}

    Output

    -
    Mar 14, 16
    +
    Mar 14, 16
    + +
    Timestamp Strings

    Note that LiquidJS is using JavaScript [Date][newDate] to parse the input string, that means IETF-compliant RFC 2822 timestamps and strings in a version of ISO8601 are supported.

    +

    To get the current time, pass the special word "now" (or "today") to date:

    Input

    -
    This page was last updated at {{ "now" | date: "%Y-%m-%d %H:%M" }}.
    +
    This page was last updated at {{ "now" | date: "%Y-%m-%d %H:%M" }}.

    Output

    -
    This page was last updated at 2020-03-25 15:57.
    +
    This page was last updated at 2020-03-25 15:57.
    now

    Note that the value will be the current time of when the page was last generated from the template, not when the page is presented to a user if caching or static site generation is involved.

    @@ -126,7 +132,7 @@
    diff --git a/filters/default.html b/filters/default.html index a9d11f9d6..a10b1b92b 100644 --- a/filters/default.html +++ b/filters/default.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    default

    -
    +
    @@ -96,29 +96,29 @@

    Allows you to specify a fallback in case a value doesn’t exist. default will show its value if the left side is falsy or empty (string or Array).

    In this example, product_price is not defined, so the default value is used.

    Input

    -
    {{ product_price | default: 2.99 }}
    +
    {{ product_price | default: 2.99 }}

    Output

    -
    2.99
    +
    2.99

    In this example, product_price is defined, so the default value is not used.

    Input

    -
    {% assign product_price = 4.99 %}
    {{ product_price | default: 2.99 }}
    +
    {% assign product_price = 4.99 %}
    {{ product_price | default: 2.99 }}

    Output

    -
    4.99
    +
    4.99

    In this example, product_price is empty, so the default value is used.

    Input

    -
    {% assign product_price = "" %}
    {{ product_price | default: 2.99 }}
    +
    {% assign product_price = "" %}
    {{ product_price | default: 2.99 }}

    Output

    -
    2.99
    +
    2.99
    diff --git a/filters/divided_by.html b/filters/divided_by.html index 607d69a2c..7fc31ed6d 100644 --- a/filters/divided_by.html +++ b/filters/divided_by.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    divided_by

    -
    +
    @@ -95,16 +95,16 @@

    Divides a number by another number. The result is the string obtained by JavaScript .toString() of the result number.

    Input

    -
    {{ 16 | divided_by: 4 }}
    +
    {{ 16 | divided_by: 4 }}

    Output

    -
    4
    +
    4

    Input

    -
    {{ 5 | divided_by: 3 }}
    +
    {{ 5 | divided_by: 3 }}

    Output

    -
    1.6666666666666667
    +
    1.6666666666666667
    Integer Arithmetic

    Since JavaScript doesn’t differentiate integers and floats, LiquidJS is not capable of integer arithmetic and the return type is always number, the string representation of which depends on its value.

    @@ -112,7 +112,7 @@
    diff --git a/filters/downcase.html b/filters/downcase.html index 9e1e83f12..33e689641 100644 --- a/filters/downcase.html +++ b/filters/downcase.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    downcase

    -
    +
    @@ -95,20 +95,20 @@

    Makes each character in a string lowercase. It has no effect on strings which are already all lowercase.

    Input

    -
    {{ "Parker Moore" | downcase }}
    +
    {{ "Parker Moore" | downcase }}

    Output

    -
    parker moore
    +
    parker moore

    Input

    -
    {{ "apple" | downcase }}
    +
    {{ "apple" | downcase }}

    Output

    -
    apple
    +
    apple
    diff --git a/filters/escape.html b/filters/escape.html index 82acf8229..2753f6651 100644 --- a/filters/escape.html +++ b/filters/escape.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    escape

    -
    +
    @@ -95,7 +95,7 @@

    Escapes a string by replacing HTML special characters with escape sequences. It doesn’t change strings that don’t have anything to escape.

    Input

    -
    {{ "Have you read 'James & the Giant Peach'?" | escape }}
    +
    {{ "Have you read 'James & the Giant Peach'?" | escape }}

    Output

    @@ -103,14 +103,14 @@ Have you read &#39;James &amp; the Giant Peach&#39;?
     

    Input

    -
    {{ "Tetsuro Takara" | escape }}
    +
    {{ "Tetsuro Takara" | escape }}

    Output

    -
    Tetsuro Takara
    +
    Tetsuro Takara
    diff --git a/filters/escape_once.html b/filters/escape_once.html index d68a9f151..5dd3fd40b 100644 --- a/filters/escape_once.html +++ b/filters/escape_once.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    escape_once

    -
    +
    @@ -95,7 +95,7 @@

    Escapes a string without changing existing escaped entities. It doesn’t change strings that don’t have anything to escape.

    Input

    -
    {{ "1 < 2 & 3" | escape_once }}
    +
    {{ "1 < 2 & 3" | escape_once }}

    Output

    @@ -114,7 +114,7 @@
     
                   
    diff --git a/filters/first.html b/filters/first.html index 438bc6826..1d8abb832 100644 --- a/filters/first.html +++ b/filters/first.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    first

    -
    +
    @@ -95,23 +95,23 @@

    Returns the first item of an array.

    Input

    -
    {{ "Ground control to Major Tom." | split: " " | first }}
    +
    {{ "Ground control to Major Tom." | split: " " | first }}

    Output

    -
    Ground
    +
    Ground

    Input

    -
    {% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
    {{ my_array.first }}
    +
    {% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
    {{ my_array.first }}

    Output

    -

    zebra
    +

    zebra

    You can use first with dot notation when you need to use the filter inside a tag:

    -
    {% if my_array.first == "zebra" %}
    Here comes a zebra!
    {% endif %}
    +
    {% if my_array.first == "zebra" %}
    Here comes a zebra!
    {% endif %}
    diff --git a/filters/floor.html b/filters/floor.html index 7df0ece03..681f27716 100644 --- a/filters/floor.html +++ b/filters/floor.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    floor

    -
    +
    @@ -95,33 +95,33 @@

    Rounds the input down to the nearest whole number. LiquidJS tries to convert the input to a number before the filter is applied.

    Input

    -
    {{ 1.2 | floor }}
    +
    {{ 1.2 | floor }}

    Output

    -
    1
    +
    1

    Input

    -
    {{ 2.0 | floor }}
    +
    {{ 2.0 | floor }}

    Output

    -
    2
    +
    2

    Input

    -
    {{ 183.357 | floor }}
    +
    {{ 183.357 | floor }}

    Output

    -
    183
    +
    183

    Here the input value is a string:

    Input

    -
    {{ "3.5" | floor }}
    +
    {{ "3.5" | floor }}

    Output

    -
    3
    +
    3
    diff --git a/filters/join.html b/filters/join.html index b591c1acd..c2c1d7f84 100644 --- a/filters/join.html +++ b/filters/join.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    join

    -
    +
    @@ -95,14 +95,14 @@

    Combines the items in an array into a single string using the argument as a separator.

    Input

    -
    {% assign beatles = "John, Paul, George, Ringo" | split: ", " %}
    {{ beatles | join: " and " }}
    +
    {% assign beatles = "John, Paul, George, Ringo" | split: ", " %}
    {{ beatles | join: " and " }}

    Output

    -

    John and Paul and George and Ringo
    +

    John and Paul and George and Ringo
    diff --git a/filters/json.html b/filters/json.html index 19fba2d08..89cd704d5 100644 --- a/filters/json.html +++ b/filters/json.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    json

    -
    +
    @@ -95,14 +95,14 @@

    Convert values to string via JSON.stringify(), for debug purpose.

    Input

    -
    {% assign arr = "foo bar coo" | split: " " %}
    {{ arr | json }}
    +
    {% assign arr = "foo bar coo" | split: " " %}
    {{ arr | json }}

    Output

    -
    ["foo","bar","coo"]
    +
    ["foo","bar","coo"]
    diff --git a/filters/last.html b/filters/last.html index 65309f73b..d87fe29cd 100644 --- a/filters/last.html +++ b/filters/last.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    last

    -
    +
    @@ -95,23 +95,23 @@

    Returns the last item of an array.

    Input

    -
    {{ "Ground control to Major Tom." | split: " " | last }}
    +
    {{ "Ground control to Major Tom." | split: " " | last }}

    Output

    -
    Tom.
    +
    Tom.

    Input

    -
    {% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
    {{ my_array.last }}
    +
    {% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
    {{ my_array.last }}

    Output

    -

    tiger
    +

    tiger

    You can use last with dot notation when you need to use the filter inside a tag:

    -
    {% if my_array.last == "tiger" %}
    There goes a tiger!
    {% endif %}
    +
    {% if my_array.last == "tiger" %}
    There goes a tiger!
    {% endif %}
    diff --git a/filters/lstrip.html b/filters/lstrip.html index 9767cb9f0..a46553f77 100644 --- a/filters/lstrip.html +++ b/filters/lstrip.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    lstrip

    -
    +
    @@ -95,14 +95,14 @@

    Removes all whitespace (tabs, spaces, and newlines) from the left side of a string. It does not affect spaces between words.

    Input

    -
    BEGIN{{ "          So much room for activities!          " | lstrip }}END
    +
    BEGIN{{ "          So much room for activities!          " | lstrip }}END

    Output

    -
    BEGINSo much room for activities!          END
    +
    BEGINSo much room for activities!          END
    diff --git a/filters/map.html b/filters/map.html index 754c7da83..c38d6072d 100644 --- a/filters/map.html +++ b/filters/map.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    map

    -
    +
    @@ -96,14 +96,14 @@

    Creates an array of values by extracting the values of a named property from another object.

    In this example, assume the object site.pages contains all the metadata for a website. Using assign with the map filter creates a variable that contains only the values of the category properties of everything in the site.pages object.

    Input

    -
    {% assign all_categories = site.pages | map: "category" %}

    {% for item in all_categories %}
    - {{ item }}
    {% endfor %}
    +
    {% assign all_categories = site.pages | map: "category" %}

    {% for item in all_categories %}
    - {{ item }}
    {% endfor %}

    Output

    -
    - business
    - celebrities
    - lifestyle
    - sports
    - technology
    +
    - business
    - celebrities
    - lifestyle
    - sports
    - technology
    diff --git a/filters/minus.html b/filters/minus.html index a54bc2a2b..b42d24d3a 100644 --- a/filters/minus.html +++ b/filters/minus.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    minus

    -
    +
    @@ -95,26 +95,26 @@

    Subtracts a number from another number.

    Input

    -
    {{ 4 | minus: 2 }}
    +
    {{ 4 | minus: 2 }}

    Output

    -
    2
    +
    2

    Input

    -
    {{ 16 | minus: 4 }}
    +
    {{ 16 | minus: 4 }}

    Output

    -
    12
    +
    12

    Input

    -
    {{ 183.357 | minus: 12 }}
    +
    {{ 183.357 | minus: 12 }}

    Output

    -
    171.357
    +
    171.357
    diff --git a/filters/modulo.html b/filters/modulo.html index 8e7c7c3d6..7899864b4 100644 --- a/filters/modulo.html +++ b/filters/modulo.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    modulo

    -
    +
    @@ -95,26 +95,26 @@

    Returns the remainder of a division operation.

    Input

    -
    {{ 3 | modulo: 2 }}
    +
    {{ 3 | modulo: 2 }}

    Output

    -
    1
    +
    1

    Input

    -
    {{ 24 | modulo: 7 }}
    +
    {{ 24 | modulo: 7 }}

    Output

    -
    3
    +
    3

    Input

    -
    {{ 183.357 | modulo: 12 }}
    +
    {{ 183.357 | modulo: 12 }}

    Output

    -
    3.3569999999999993
    +
    3.3569999999999993
    diff --git a/filters/newline_to_br.html b/filters/newline_to_br.html index 950e5b76d..843947adf 100644 --- a/filters/newline_to_br.html +++ b/filters/newline_to_br.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    newline_to_br

    -
    +
    @@ -95,14 +95,14 @@

    Replaces every newline (\n) in a string with an HTML line break (<br />).

    Input

    -
    {% capture string_with_newlines %}
    Hello
    there
    {% endcapture %}

    {{ string_with_newlines | newline_to_br }}
    +
    {% capture string_with_newlines %}
    Hello
    there
    {% endcapture %}

    {{ string_with_newlines | newline_to_br }}

    Output


    <br/>Hello<br/>there<br/>
    diff --git a/filters/overview.html b/filters/overview.html index ca2cdd993..c8814a831 100644 --- a/filters/overview.html +++ b/filters/overview.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,11 +87,11 @@

    Filters

    -
    +
    -

    LiquidJS implements business-logic independent filters that are typically implemented in shopify/liquid. This section contains the specification and demoes for all the filters implemented by LiquidJS.

    +

    LiquidJS implements business-logic independent filters that are typically implemented in shopify/liquid. This section contains the specification and demoes for all the filters implemented by LiquidJS.

    There’s 40+ filters supported by LiquidJS. These filters can be categorized into these groups:

    @@ -124,7 +124,7 @@
    - +
    diff --git a/filters/plus.html b/filters/plus.html index 7c3dd5fe6..6cca8627f 100644 --- a/filters/plus.html +++ b/filters/plus.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    plus

    -
    +
    @@ -95,26 +95,26 @@

    Adds a number to another number.

    Input

    -
    {{ 4 | plus: 2 }}
    +
    {{ 4 | plus: 2 }}

    Output

    -
    6
    +
    6

    Input

    -
    {{ 16 | plus: 4 }}
    +
    {{ 16 | plus: 4 }}

    Output

    -
    20
    +
    20

    Input

    -
    {{ 183.357 | plus: 12 }}
    +
    {{ 183.357 | plus: 12 }}

    Output

    -
    195.357
    +
    195.357
    diff --git a/filters/prepend.html b/filters/prepend.html index 6338c3590..f00eb194b 100644 --- a/filters/prepend.html +++ b/filters/prepend.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    prepend

    -
    +
    @@ -95,21 +95,21 @@

    Adds the specified string to the beginning of another string.

    Input

    -
    {{ "apples, oranges, and bananas" | prepend: "Some fruit: " }}
    +
    {{ "apples, oranges, and bananas" | prepend: "Some fruit: " }}

    Output

    -
    Some fruit: apples, oranges, and bananas
    +
    Some fruit: apples, oranges, and bananas

    prepend can also be used with variables:

    Input

    -
    {% assign url = "example.com" %}
    {{ "/index.html" | prepend: url }}
    +
    {% assign url = "example.com" %}
    {{ "/index.html" | prepend: url }}

    Output

    -

    example.com/index.html
    +

    example.com/index.html
    diff --git a/filters/remove.html b/filters/remove.html index 15132e945..62ae7e311 100644 --- a/filters/remove.html +++ b/filters/remove.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    remove

    -
    +
    @@ -95,14 +95,14 @@

    Removes every occurrence of the specified substring from a string.

    Input

    -
    {{ "I strained to see the train through the rain" | remove: "rain" }}
    +
    {{ "I strained to see the train through the rain" | remove: "rain" }}

    Output

    -
    I strained to see the t through the
    +
    I strained to see the t through the 
    diff --git a/filters/remove_first.html b/filters/remove_first.html index 1273f084f..b836608b3 100644 --- a/filters/remove_first.html +++ b/filters/remove_first.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    remove_first

    -
    +
    @@ -95,14 +95,14 @@

    Removes only the first occurrence of the specified substring from a string.

    Input

    -
    {{ "I strained to see the train through the rain" | remove_first: "rain" }}
    +
    {{ "I strained to see the train through the rain" | remove_first: "rain" }}

    Output

    -
    I strained to see the t through the rain
    +
    I strained to see the t through the rain
    diff --git a/filters/replace.html b/filters/replace.html index 40151d10e..25ddbea59 100644 --- a/filters/replace.html +++ b/filters/replace.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    replace

    -
    +
    @@ -95,14 +95,14 @@

    Replaces every occurrence of the first argument in a string with the second argument.

    Input

    -
    {{ "Take my protein pills and put my helmet on" | replace: "my", "your" }}
    +
    {{ "Take my protein pills and put my helmet on" | replace: "my", "your" }}

    Output

    -
    Take your protein pills and put your helmet on
    +
    Take your protein pills and put your helmet on
    diff --git a/filters/replace_first.html b/filters/replace_first.html index e67c63ffe..e1d811d2c 100644 --- a/filters/replace_first.html +++ b/filters/replace_first.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    replace_first

    -
    +
    @@ -95,14 +95,14 @@

    Replaces only the first occurrence of the first argument in a string with the second argument.

    Input

    -
    {{ "Take my protein pills and put my helmet on" | replace_first: "my", "your" }}
    +
    {{ "Take my protein pills and put my helmet on" | replace_first: "my", "your" }}

    Output

    -
    Take your protein pills and put my helmet on
    +
    Take your protein pills and put my helmet on
    diff --git a/filters/reverse.html b/filters/reverse.html index 2af8697e7..2a5fbab98 100644 --- a/filters/reverse.html +++ b/filters/reverse.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    reverse

    -
    +
    @@ -95,21 +95,21 @@

    Reverses the order of the items in an array. reverse cannot reverse a string.

    Input

    -
    {% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}

    {{ my_array | reverse | join: ", " }}
    +
    {% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}

    {{ my_array | reverse | join: ", " }}

    Output

    -


    plums, peaches, oranges, apples
    +


    plums, peaches, oranges, apples

    Although reverse cannot be used directly on a string, you can split a string into an array, reverse the array, and rejoin it by chaining together filters:

    Input

    -
    {{ "Ground control to Major Tom." | split: "" | reverse | join: "" }}
    +
    {{ "Ground control to Major Tom." | split: "" | reverse | join: "" }}

    Output

    -
    .moT rojaM ot lortnoc dnuorG
    +
    .moT rojaM ot lortnoc dnuorG
    diff --git a/filters/round.html b/filters/round.html index cd17a0a3c..32d19007a 100644 --- a/filters/round.html +++ b/filters/round.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    round

    -
    +
    @@ -95,26 +95,26 @@

    Rounds a number to the nearest integer or, if a number is passed as an argument, to that number of decimal places.

    Input

    -
    {{ 1.2 | round }}
    +
    {{ 1.2 | round }}

    Output

    -
    1
    +
    1

    Input

    -
    {{ 2.7 | round }}
    +
    {{ 2.7 | round }}

    Output

    -
    3
    +
    3

    Input

    -
    {{ 183.357 | round: 2 }}
    +
    {{ 183.357 | round: 2 }}

    Output

    -
    183.36
    +
    183.36
    diff --git a/filters/rstrip.html b/filters/rstrip.html index 33a0bf387..269c82215 100644 --- a/filters/rstrip.html +++ b/filters/rstrip.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    rstrip

    -
    +
    @@ -95,14 +95,14 @@

    Removes all whitespace (tabs, spaces, and newlines) from the right side of a string. It does not affect spaces between words.

    Input

    -
    BEGIN{{ "          So much room for activities!          " | rstrip }}END
    +
    BEGIN{{ "          So much room for activities!          " | rstrip }}END

    Output

    -
    BEGIN          So much room for activities!END
    +
    BEGIN          So much room for activities!END
    diff --git a/filters/size.html b/filters/size.html index 31a0e1633..380e824a3 100644 --- a/filters/size.html +++ b/filters/size.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    size

    -
    +
    @@ -95,23 +95,23 @@

    Returns the number of characters in a string or the number of items in an array.

    Input

    -
    {{ "Ground control to Major Tom." | size }}
    +
    {{ "Ground control to Major Tom." | size }}

    Output

    -
    28
    +
    28

    Input

    -
    {% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}

    {{ my_array.size }}
    +
    {% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}

    {{ my_array.size }}

    Output

    -


    4
    +


    4

    You can use size with dot notation when you need to use the filter inside a tag:

    -
    {% if site.pages.size > 10 %}
    This is a big website!
    {% endif %}
    +
    {% if site.pages.size > 10 %}
    This is a big website!
    {% endif %}
    diff --git a/filters/slice.html b/filters/slice.html index 26a72bfe8..42bd835fd 100644 --- a/filters/slice.html +++ b/filters/slice.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    slice

    -
    +
    @@ -96,33 +96,33 @@

    Returns a substring of 1 character beginning at the index specified by the first argument. An optional second argument specifies the length of the substring to be returned.

    String indices are numbered starting from 0.

    Input

    -
    {{ "Liquid" | slice: 0 }}
    +
    {{ "Liquid" | slice: 0 }}

    Output

    -
    L
    +
    L

    Input

    -
    {{ "Liquid" | slice: 2 }}
    +
    {{ "Liquid" | slice: 2 }}

    Output

    -
    q
    +
    q

    Input

    -
    {{ "Liquid" | slice: 2, 5 }}
    +
    {{ "Liquid" | slice: 2, 5 }}

    Output

    -
    quid
    +
    quid

    If the first argument is a negative number, the indices are counted from the end of the string:

    Input

    -
    {{ "Liquid" | slice: -3, 2 }}
    +
    {{ "Liquid" | slice: -3, 2 }}

    Output

    -
    ui
    +
    ui
    diff --git a/filters/sort.html b/filters/sort.html index ca3b12ae1..29c85b756 100644 --- a/filters/sort.html +++ b/filters/sort.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    sort

    -
    +
    @@ -95,17 +95,17 @@

    Sorts items in an array in case-sensitive order.

    Input

    -
    {% assign my_array = "zebra, octopus, giraffe, Sally Snake" | split: ", " %}

    {{ my_array | sort | join: ", " }}
    +
    {% assign my_array = "zebra, octopus, giraffe, Sally Snake" | split: ", " %}

    {{ my_array | sort | join: ", " }}

    Output

    -


    Sally Snake, giraffe, octopus, zebra
    +


    Sally Snake, giraffe, octopus, zebra

    An optional argument specifies which property of the array’s items to use for sorting.

    -
    {% assign products_by_price = collection.products | sort: "price" %}
    {% for product in products_by_price %}
    <h4>{{ product.title }}</h4>
    {% endfor %}
    +
    {% assign products_by_price = collection.products | sort: "price" %}
    {% for product in products_by_price %}
    <h4>{{ product.title }}</h4>
    {% endfor %}
    diff --git a/filters/sort_natural.html b/filters/sort_natural.html index 78daf4524..b9fb70a4b 100644 --- a/filters/sort_natural.html +++ b/filters/sort_natural.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    sort_natural

    -
    +
    @@ -95,17 +95,17 @@

    Sorts items in an array in case-insensitive order.

    Input

    -
    {% assign my_array = "zebra, octopus, giraffe, Sally Snake" | split: ", " %}

    {{ my_array | sort_natural | join: ", " }}
    +
    {% assign my_array = "zebra, octopus, giraffe, Sally Snake" | split: ", " %}

    {{ my_array | sort_natural | join: ", " }}

    Output

    -


    giraffe, octopus, Sally Snake, zebra
    +


    giraffe, octopus, Sally Snake, zebra

    An optional argument specifies which property of the array’s items to use for sorting.

    -
    {% assign products_by_company = collection.products | sort_natural: "company" %}
    {% for product in products_by_company %}
    <h4>{{ product.title }}</h4>
    {% endfor %}
    +
    {% assign products_by_company = collection.products | sort_natural: "company" %}
    {% for product in products_by_company %}
    <h4>{{ product.title }}</h4>
    {% endfor %}
    diff --git a/filters/split.html b/filters/split.html index f63eb0363..0cf38003d 100644 --- a/filters/split.html +++ b/filters/split.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    split

    -
    +
    @@ -95,14 +95,14 @@

    Divides a string into an array using the argument as a separator. split is commonly used to convert comma-separated items from a string to an array.

    Input

    -
    {% assign beatles = "John, Paul, George, Ringo" | split: ", " %}

    {% for member in beatles %}
    {{ member }}
    {% endfor %}
    +
    {% assign beatles = "John, Paul, George, Ringo" | split: ", " %}

    {% for member in beatles %}
    {{ member }}
    {% endfor %}

    Output

    -




    John

    Paul

    George

    Ringo
    +




    John

    Paul

    George

    Ringo
    diff --git a/filters/strip.html b/filters/strip.html index 26c32eef0..06ba78ec1 100644 --- a/filters/strip.html +++ b/filters/strip.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    strip

    -
    +
    @@ -95,14 +95,14 @@

    Removes all whitespace (tabs, spaces, and newlines) from both the left and right sides of a string. It does not affect spaces between words.

    Input

    -
    BEGIN{{ "          So much room for activities!          " | strip }}END
    +
    BEGIN{{ "          So much room for activities!          " | strip }}END

    Output

    -
    BEGINSo much room for activities!END
    +
    BEGINSo much room for activities!END
    diff --git a/filters/strip_html.html b/filters/strip_html.html index 40b3f74d9..fa624fef1 100644 --- a/filters/strip_html.html +++ b/filters/strip_html.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    strip_html

    -
    +
    @@ -95,14 +95,14 @@

    Removes any HTML tags from a string.

    Input

    -
    {{ "Have <em>you</em> read <strong>Ulysses</strong>?" | strip_html }}
    +
    {{ "Have <em>you</em> read <strong>Ulysses</strong>?" | strip_html }}

    Output

    -
    Have you read Ulysses?
    +
    Have you read Ulysses?
    diff --git a/filters/strip_newlines.html b/filters/strip_newlines.html index 4b47973b0..3839b1264 100644 --- a/filters/strip_newlines.html +++ b/filters/strip_newlines.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    strip_newlines

    -
    +
    @@ -95,14 +95,14 @@

    Removes any newline characters (line breaks) from a string.

    Input

    -
    {% capture string_with_newlines %}
    Hello
    there
    {% endcapture %}

    {{ string_with_newlines | strip_newlines }}
    +
    {% capture string_with_newlines %}
    Hello
    there
    {% endcapture %}

    {{ string_with_newlines | strip_newlines }}

    Output


    Hellothere
    diff --git a/filters/times.html b/filters/times.html index a5bb82d1b..41b8ef88a 100644 --- a/filters/times.html +++ b/filters/times.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    times

    -
    +
    @@ -95,26 +95,26 @@

    Multiplies a number by another number.

    Input

    -
    {{ 3 | times: 2 }}
    +
    {{ 3 | times: 2 }}

    Output

    -
    6
    +
    6

    Input

    -
    {{ 24 | times: 7 }}
    +
    {{ 24 | times: 7 }}

    Output

    -
    168
    +
    168

    Input

    -
    {{ 183.357 | times: 12 }}
    +
    {{ 183.357 | times: 12 }}

    Output

    -
    2200.284
    +
    2200.284
    diff --git a/filters/truncate.html b/filters/truncate.html index ad29014f3..3b6476a49 100644 --- a/filters/truncate.html +++ b/filters/truncate.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    truncate

    -
    +
    @@ -95,29 +95,29 @@

    Shortens a string down to the number of characters passed as an argument. If the specified number of characters is less than the length of the string, an ellipsis (…) is appended to the string and is included in the character count.

    Basic Usage

    Input

    -
    {{ "Ground control to Major Tom." | truncate: 20 }}
    +
    {{ "Ground control to Major Tom." | truncate: 20 }}

    Output

    -
    Ground control to...
    +
    Ground control to...

    Custom ellipsis

    truncate takes an optional second argument that specifies the sequence of characters to be appended to the truncated string. By default this is an ellipsis (…), but you can specify a different sequence.

    The length of the second argument counts against the number of characters specified by the first argument. For example, if you want to truncate a string to exactly 10 characters, and use a 3-character ellipsis, use 13 for the first argument of truncate, since the ellipsis counts as 3 characters.

    Input

    -
    {{ "Ground control to Major Tom." | truncate: 25, ", and so on" }}
    +
    {{ "Ground control to Major Tom." | truncate: 25, ", and so on" }}

    Output

    -
    Ground control, and so on
    +
    Ground control, and so on

    No ellipsis

    You can truncate to the exact number of characters specified by the first argument and avoid showing trailing characters by passing a blank string as the second argument:

    Input

    -
    {{ "Ground control to Major Tom." | truncate: 20, "" }}
    +
    {{ "Ground control to Major Tom." | truncate: 20, "" }}

    Output

    -
    Ground control to Ma
    +
    Ground control to Ma
    diff --git a/filters/truncatewords.html b/filters/truncatewords.html index ccff87497..2b95267f9 100644 --- a/filters/truncatewords.html +++ b/filters/truncatewords.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    truncatewords

    -
    +
    @@ -95,28 +95,28 @@

    Shortens a string down to the number of words passed as an argument. If the specified number of words is less than the number of words in the string, an ellipsis (…) is appended to the string.

    Input

    -
    {{ "Ground control to Major Tom." | truncatewords: 3 }}
    +
    {{ "Ground control to Major Tom." | truncatewords: 3 }}

    Output

    -
    Ground control to...
    +
    Ground control to...

    Custom ellipsis

    truncatewords takes an optional second argument that specifies the sequence of characters to be appended to the truncated string. By default this is an ellipsis (…), but you can specify a different sequence.

    Input

    -
    {{ "Ground control to Major Tom." | truncatewords: 3, "--" }}
    +
    {{ "Ground control to Major Tom." | truncatewords: 3, "--" }}

    Output

    -
    Ground control to--
    +
    Ground control to--

    No ellipsis

    You can avoid showing trailing characters by passing a blank string as the second argument:

    Input

    -
    {{ "Ground control to Major Tom." | truncatewords: 3, "" }}
    +
    {{ "Ground control to Major Tom." | truncatewords: 3, "" }}

    Output

    -
    Ground control to
    +
    Ground control to
    diff --git a/filters/uniq.html b/filters/uniq.html index c4409fbe6..2c8c66c36 100644 --- a/filters/uniq.html +++ b/filters/uniq.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    uniq

    -
    +
    @@ -95,14 +95,15 @@

    Removes any duplicate elements in an array.

    Input

    -
    {% assign my_array = "ants, bugs, bees, bugs, ants" | split: ", " %}
    {{ my_array | uniq | join: ", " }}
    +
    {% assign my_array = "ants, bugs, bees, bugs, ants" | split: ", " %}
    {{ my_array | uniq | join: ", " }}

    Output

    -

    ants, bugs, bees
    +
    
    +ants, bugs, bees```
    diff --git a/filters/upcase.html b/filters/upcase.html index 9e44520c2..da4e81077 100644 --- a/filters/upcase.html +++ b/filters/upcase.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    upcase

    -
    +
    @@ -95,20 +95,20 @@

    Makes each character in a string uppercase. It has no effect on strings which are already all uppercase.

    Input

    -
    {{ "Parker Moore" | upcase }}
    +
    {{ "Parker Moore" | upcase }}

    Output

    -
    PARKER MOORE
    +
    PARKER MOORE

    Input

    -
    {{ "APPLE" | upcase }}
    +
    {{ "APPLE" | upcase }}

    Output

    -
    APPLE
    +
    APPLE
    diff --git a/filters/url_decode.html b/filters/url_decode.html index b3ac2a9ee..0eafeb92d 100644 --- a/filters/url_decode.html +++ b/filters/url_decode.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    url_decode

    -
    +
    @@ -95,14 +95,14 @@

    Decodes a string that has been encoded as a URL.

    Input

    -
    {{ "%27Stop%21%27+said+Fred" | url_decode }}
    +
    {{ "%27Stop%21%27+said+Fred" | url_decode }}

    Output

    -
    'Stop!' said Fred
    +
    'Stop!' said Fred
    diff --git a/filters/url_encode.html b/filters/url_encode.html index 0c4c1c462..492d49e4c 100644 --- a/filters/url_encode.html +++ b/filters/url_encode.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    url_encode

    -
    +
    @@ -95,20 +95,20 @@

    Converts any URL-unsafe characters in a string into percent-encoded characters.

    Input

    -
    {{ "john@liquid.com" | url_encode }}
    +
    {{ "john@liquid.com" | url_encode }}

    Output

    -
    john%40liquid.com
    +
    john%40liquid.com

    Input

    -
    {{ "Tetsuro Takara" | url_encode }}
    +
    {{ "Tetsuro Takara" | url_encode }}

    Output

    -
    Tetsuro+Takara
    +
    Tetsuro+Takara
    diff --git a/filters/where.html b/filters/where.html index cb60c50a8..5ef7f68e0 100644 --- a/filters/where.html +++ b/filters/where.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    where

    -
    +
    @@ -96,29 +96,29 @@

    Creates an array including only the objects with a given property value, or any truthy value by default.

    In this example, assume you have a list of products and you want to show your kitchen products separately. Using where, you can create an array containing only the products that have a "type" of "kitchen".

    Input

    -
    All products:
    {% for product in products %}
    - {{ product.title }}
    {% endfor %}

    {% assign kitchen_products = products | where: "type", "kitchen" %}

    Kitchen products:
    {% for product in kitchen_products %}
    - {{ product.title }}
    {% endfor %}
    +
    All products:
    {% for product in products %}
    - {{ product.title }}
    {% endfor %}

    {% assign kitchen_products = products | where: "type", "kitchen" %}

    Kitchen products:
    {% for product in kitchen_products %}
    - {{ product.title }}
    {% endfor %}

    Output

    -
    All products:
    - Vacuum
    - Spatula
    - Television
    - Garlic press

    Kitchen products:
    - Spatula
    - Garlic press
    +
    All products:
    - Vacuum
    - Spatula
    - Television
    - Garlic press

    Kitchen products:
    - Spatula
    - Garlic press

    Say instead you have a list of products and you only want to show those that are available to buy. You can where with a property name but no target value to include all products with a truthy "available" value.

    Input

    -
    All products:
    {% for product in products %}
    - {{ product.title }}
    {% endfor %}

    {% assign available_products = products | where: "available" %}

    Available products:
    {% for product in available_products %}
    - {{ product.title }}
    {% endfor %}
    +
    All products:
    {% for product in products %}
    - {{ product.title }}
    {% endfor %}

    {% assign available_products = products | where: "available" %}

    Available products:
    {% for product in available_products %}
    - {{ product.title }}
    {% endfor %}

    Output

    -
    All products:
    - Coffee mug
    - Limited edition sneakers
    - Boring sneakers

    Available products:
    - Coffee mug
    - Boring sneakers
    +
    All products:
    - Coffee mug
    - Limited edition sneakers
    - Boring sneakers

    Available products:
    - Coffee mug
    - Boring sneakers

    The where filter can also be used to find a single object in an array when combined with the first filter. For example, say you want to show off the shirt in your new fall collection.

    Input

    -
    {% assign new_shirt = products | where: "type", "shirt" | first %}

    Featured product: {{ new_shirt.title }}
    +
    {% assign new_shirt = products | where: "type", "shirt" | first %}

    Featured product: {{ new_shirt.title }}

    Output

    -
    Featured product: Hawaiian print sweater vest
    +
    Featured product: Hawaiian print sweater vest
    diff --git a/index.html b/index.html index 50026089a..0d556b9c4 100644 --- a/index.html +++ b/index.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -94,26 +94,26 @@
    @@ -121,7 +121,7 @@
    -
    • Safe Rendering

      Liquid templates are highly readable and fault-tolerant thus suitable for designers and customers. Operators and expressions are parsed to AST and no eval or new Function are used.

    • Zero Dependency

      Written with zero npm dependency and no native binding, available in both Node.js and browsers. All of the CMD, ESM and CJS bundles are available on CDN.

    • Shopify Compatible

      All filters and tags from Ruby shopify/liquid are supported by LiquidJS. Jekyll sites, Github Pages and Shopify templates can be ported to Node.js without pain.

    • TypeScript Strict

      The whole repo is re-written in TypeScript strict mode to ensure a smooth experience using this lib and the document is precise and always up to date.

    +
    • Safe Rendering

      Liquid templates are highly readable and fault-tolerant thus suitable for designers and customers. Operators and expressions are parsed to AST and no eval or new Function are used.

    • Zero Dependency

      Written with zero npm dependency and no native binding, available in both Node.js and browsers. All of the CMD, ESM and CJS bundles are available on CDN.

    • Shopify Compatible

      All filters and tags from Ruby shopify/liquid are supported by LiquidJS. Jekyll sites, Github Pages and Shopify templates can be ported to Node.js without pain.

    • TypeScript Strict

      The whole repo is re-written in TypeScript strict mode to ensure a smooth experience using this lib and the document is precise and always up to date.

    diff --git a/tags/for.html b/tags/for.html index 310e295ad..4989eff10 100644 --- a/tags/for.html +++ b/tags/for.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    For

    -
    +
    @@ -96,86 +96,99 @@

    Iteration tags run blocks of code repeatedly.

    Basic Usage

    for…in

    Repeatedly executes a block of code. For a full list of attributes available within a for loop, see forloop.

    Input

    -
    {% for product in collection.products %}
    {{ product.title }}
    {% endfor %}
    +
    {% for product in collection.products %}
    {{ product.title }}
    {% endfor %}

    Output

    -
    hat shirt pants
    +
    hat shirt pants

    For loops can iterate over arrays, hashes, and ranges of integers.

    When iterating a hash, item[0] contains the key, and item[1] contains the value:

    Input

    -
    {% for item in hash %}
    * {{ item[0] }}: {{ item[1] }}
    {% endfor %}
    +
    {% for item in hash %}
    * {{ item[0] }}: {{ item[1] }}
    {% endfor %}

    Output

    -
    * key1: value1
    * key2: value2
    +
    * key1: value1
    * key2: value2

    else

    Specifies a fallback case for a for loop which will run if the loop has zero length.

    Input

    -
    {% for product in collection.products %}
    {{ product.title }}
    {% else %}
    The collection is empty.
    {% endfor %}
    +
    {% for product in collection.products %}
    {{ product.title }}
    {% else %}
    The collection is empty.
    {% endfor %}

    Output

    -
    The collection is empty.
    +
    The collection is empty.

    break

    Causes the loop to stop iterating when it encounters the break tag.

    Input

    -
    {% for i in (1..5) %}
    {% if i == 4 %}
    {% break %}
    {% else %}
    {{ i }}
    {% endif %}
    {% endfor %}
    +
    {% for i in (1..5) %}
    {% if i == 4 %}
    {% break %}
    {% else %}
    {{ i }}
    {% endif %}
    {% endfor %}

    Output

    -
    1 2 3
    +
    1 2 3

    continue

    Causes the loop to skip the current iteration when it encounters the continue tag.

    Input

    -
    {% for i in (1..5) %}
    {% if i == 4 %}
    {% continue %}
    {% else %}
    {{ i }}
    {% endif %}
    {% endfor %}
    +
    {% for i in (1..5) %}
    {% if i == 4 %}
    {% continue %}
    {% else %}
    {{ i }}
    {% endif %}
    {% endfor %}

    Output

    -
    1 2 3   5
    +
    1 2 3   5

    forloop

    There’s a forloop object available inside for loops. It’s used to indicate the current state of for loop.

    The forloop.first, forloop.last and forloop.length property:

    Input

    -
    {% for i in (1..5) %}
    {%- if forloop.first == true -%} First
    {%- elsif forloop.last == true -%} Last
    {%- else -%} {{ forloop.length }}
    {%- endif %}
    {% endfor -%}
    +
    {% for i in (1..5) %}
    {%- if forloop.first == true -%} First
    {%- elsif forloop.last == true -%} Last
    {%- else -%} {{ forloop.length }}
    {%- endif %}
    {% endfor -%}

    Output

    -
    First
    5
    5
    5
    Last
    +
    First
    5
    5
    5
    Last

    The forloop.index, forloop.index0, forloop.rindex and forloop.rindex0 property:

    Input

    -
    index index0 rindex rindex0
    {% for i in (1..5) %}
    {{- forloop.index }} {{ forloop.index0 }} {{ forloop.rindex }} {{ forloop.rindex0 }}
    {% endfor -%}
    +
    index index0 rindex rindex0
    {% for i in (1..5) %}
    {{- forloop.index }} {{ forloop.index0 }} {{ forloop.rindex }} {{ forloop.rindex0 }}
    {% endfor -%}

    Output

    -
    index index0 rindex rindex0
    1 0 5 4
    2 1 4 3
    3 2 3 2
    4 3 2 1
    5 4 1 0
    +
    index index0 rindex rindex0
    1 0 5 4
    2 1 4 3
    3 2 3 2
    4 3 2 1
    5 4 1 0

    Parameters

    limit

    Limits the loop to the specified number of iterations.

    Input

    -
    <!-- if array = [1,2,3,4,5,6] -->
    {% for item in array limit:2 %}
    {{ item }}
    {% endfor %}
    +
    <!-- if array = [1,2,3,4,5,6] -->
    {% for item in array limit:2 %}
    {{ item }}
    {% endfor %}

    Output

    -
    1 2
    +
    1 2

    offset

    Begins the loop at the specified index.

    Input

    -
    <!-- if array = [1,2,3,4,5,6] -->
    {% for item in array offset:2 %}
    {{ item }}
    {% endfor %}
    +
    <!-- if array = [1,2,3,4,5,6] -->
    {% for item in array offset:2 %}
    {{ item }}
    {% endfor %}

    Output

    -
    3 4 5 6
    +
    3 4 5 6

    range

    Defines a range of numbers to loop through. The range can be defined by both literal and variable numbers.

    Input

    -
    {% for i in (3..5) %}
    {{ i }}
    {% endfor %}

    {% assign num = 4 %}
    {% for i in (1..num) %}
    {{ i }}
    {% endfor %}
    +
    {% for i in (3..5) %}
    {{ i }}
    {% endfor %}

    {% assign num = 4 %}
    {% for i in (1..num) %}
    {{ i }}
    {% endfor %}

    Output

    -
    3 4 5
    1 2 3 4
    +
    3 4 5
    1 2 3 4

    reversed

    Reverses the order of the loop. Note that this flag’s spelling is different from the filter reverse.

    Input

    -
    <!-- if array = [1,2,3,4,5,6] -->
    {% for item in array reversed %}
    {{ item }}
    {% endfor %}
    +
    <!-- if array = [1,2,3,4,5,6] -->
    {% for item in array reversed %}
    {{ item }}
    {% endfor %}

    Output

    -
    6 5 4 3 2 1
    +
    6 5 4 3 2 1
    + +

    When used with additional parameters, order is important. Leading with reversed reverses the order of the loop before executing the other parameters.

    +

    Input

    +
    {% for i in (1..8) reversed limit: 4 %}
    {{ i }}
    {% endfor %}
    + +

    Output

    +
    8 7 6 5
    + +

    Input

    +
    {% for i in (1..8) limit: 4 reversed %}
    {{ i }}
    {% endfor %}
    + +

    Output

    +
    4 3 2 1
    - +
    @@ -184,7 +197,7 @@
    Contents -
    1. Basic Usage
      1. for…in
      2. else
      3. break
      4. continue
      5. forloop
    2. Parameters
      1. limit
      2. offset
      3. range
      4. reversed
    +
    1. Basic Usage
      1. for…in
      2. else
      3. break
      4. continue
      5. forloop
    2. Parameters
      1. limit
      2. offset
      3. range
      4. reversed
    Back to Top
    diff --git a/tags/if.html b/tags/if.html index 83b3e771f..626b5f287 100644 --- a/tags/if.html +++ b/tags/if.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    If

    -
    +
    @@ -95,21 +95,21 @@

    Executes a block of code only if a certain condition is true.

    if

    Input

    -
    {% if product.title == "Awesome Shoes" %}
    These shoes are awesome!
    {% endif %}
    +
    {% if product.title == "Awesome Shoes" %}
    These shoes are awesome!
    {% endif %}

    Output

    -
    These shoes are awesome!
    +
    These shoes are awesome!

    elsif / else

    Adds more conditions within an if or unless block.

    Input

    -
    <!-- If customer.name = "anonymous" -->
    {% if customer.name == "kevin" %}
    Hey Kevin!
    {% elsif customer.name == "anonymous" %}
    Hey Anonymous!
    {% else %}
    Hi Stranger!
    {% endif %}
    +
    <!-- If customer.name = "anonymous" -->
    {% if customer.name == "kevin" %}
    Hey Kevin!
    {% elsif customer.name == "anonymous" %}
    Hey Anonymous!
    {% else %}
    Hi Stranger!
    {% endif %}

    Output

    -
    Hey Anonymous!
    +
    Hey Anonymous!
    - +
    diff --git a/tags/include.html b/tags/include.html index 4984262a5..15d6f62ac 100644 --- a/tags/include.html +++ b/tags/include.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Include

    -
    +
    @@ -97,23 +97,23 @@

    Include a Template

    Renders a partial template from the template roots.

    -
    {% include 'footer.liquid' %}
    +
    {% include 'footer.liquid' %}

    When the extname option is set, the above .liquid extension can be omitted and writes:

    -
    {% include 'footer' %}
    +
    {% include 'footer' %}

    When a partial template is rendered by include, the code inside it can access its parent’s variables but its parent cannot access variables defined inside a included template.

    Passing Variables

    Variables defined in parent’s scope can be passed to a the partial template by listing them as parameters on the include tag:

    -
    {% assign my_variable = 'apples' %}
    {% include 'name', my_variable: my_variable, my_other_variable: 'oranges' %}
    +
    {% assign my_variable = 'apples' %}
    {% include 'name', my_variable: my_variable, my_other_variable: 'oranges' %}

    The with Parameter

    A single object can be passed to a snippet by using the with...as syntax:

    -
    {% assign featured_product = all_products['product_handle'] %}
    {% include 'product' with featured_product as product %}
    +
    {% assign featured_product = all_products['product_handle'] %}
    {% include 'product' with featured_product as product %}

    In the example above, the product variable in the partial template will hold the value of featured_product in the parent template.

    diff --git a/tags/increment.html b/tags/increment.html index 01ddabcf1..251f1d3ac 100644 --- a/tags/increment.html +++ b/tags/increment.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Increment

    -
    +
    @@ -95,23 +95,23 @@

    Creates a new number variable, and increases its value by one every time it is called. The first value is 0.

    Input

    -
    {% increment my_counter %}
    {% increment my_counter %}
    {% increment my_counter %}
    +
    {% increment my_counter %}
    {% increment my_counter %}
    {% increment my_counter %}

    Output

    -
    0
    1
    2
    +
    0
    1
    2

    Variables created through the increment tag are independent from variables created through assign or capture.

    In the example below, a variable named “var” is created through assign. The increment tag is then used several times on a variable with the same name. Note that the increment tag does not affect the value of “var” that was created through assign.

    Input

    -
    {% assign var = 10 %}
    {% increment var %}
    {% increment var %}
    {% increment var %}
    {{ var }}
    +
    {% assign var = 10 %}
    {% increment var %}
    {% increment var %}
    {% increment var %}
    {{ var }}

    Output

    -
    0
    1
    2
    10
    +
    0
    1
    2
    10
    diff --git a/tags/layout.html b/tags/layout.html index 4e48a1654..a5725501b 100644 --- a/tags/layout.html +++ b/tags/layout.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,30 +87,30 @@

    Layout

    -
    +

    Added in: v1.9.1

    Using a Layout Template

    Renders current template inside a layout template from the template roots.

    -
    {% layout 'footer.liquid' %}
    +
    {% layout 'footer.liquid' %}

    When the extname option is set, the above .liquid extension can be omitted and writes:

    -
    {% layout 'footer' %}
    +
    {% layout 'footer' %}

    When a partial template is rendered by layout, the code inside it can access its caller’s variables but its parent cannot access variables defined inside a included template.

    Passing Variables

    Variables defined in current template can be passed to a the layout template by listing them as parameters on the layout tag:

    -
    {% assign my_variable = 'apples' %}
    {% layout 'name', my_variable: my_variable, my_other_variable: 'oranges' %}
    +
    {% assign my_variable = 'apples' %}
    {% layout 'name', my_variable: my_variable, my_other_variable: 'oranges' %}

    Blocks

    The layout file can contain multiple blocks which will be populated by the child template (the caller). For example we have a default-layout.liquid file with the following contents:

    -
    Header
    {% block content %}My default content{% endblock %}
    Footer
    +
    Header
    {% block content %}My default content{% endblock %}
    Footer

    And it’s called by a page.liquid file with layout tag:

    -
    {% layout "default-layout" %}
    {% block content %}My page content{% endblock %}
    +
    {% layout "default-layout" %}
    {% block content %}My page content{% endblock %}

    The render result of page.liquid will be :

    -
    Header
    My page content
    Footer
    +
    Header
    My page content
    Footer
    Block
    • Multiple blocks can be defined within a layout template;
    • @@ -121,7 +121,7 @@
    diff --git a/tags/overview.html b/tags/overview.html index 2be5746d3..e245650f1 100644 --- a/tags/overview.html +++ b/tags/overview.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    Tags

    -
    +
    -

    LiquidJS implements business-logic independent tags that are typically implemented in shopify/liquid. This section contains the specification and demoes for all the tags implemented by LiquidJS.

    -

    There’re a dozen of tags supported by LiquidJS, with all tags in shopify/liquid. These tags can be categorized into these groups:

    +

    LiquidJS implements business-logic independent tags that are typically implemented in shopify/liquid. This section contains the specification and demoes for all the tags implemented by LiquidJS.

    +

    There’re a dozen of tags supported by LiquidJS, with all tags in shopify/liquid. These tags can be categorized into these groups:

    @@ -130,7 +130,7 @@
    - +
    diff --git a/tags/raw.html b/tags/raw.html index a86d38aad..99fa48dea 100644 --- a/tags/raw.html +++ b/tags/raw.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Raw

    -
    +
    @@ -95,14 +95,14 @@

    Raw temporarily disables tag processing. This is useful for generating content
    (eg, Mustache, Handlebars) which uses conflicting syntax.

    Input

    -
    {% raw %}
    In Handlebars, {{ this }} will be HTML-escaped, but
    {{{ that }}} will not.
    {% endraw %}
    +
    {% raw %}
    In Handlebars, {{ this }} will be HTML-escaped, but
    {{{ that }}} will not.
    {% endraw %}

    Output

    -
    In Handlebars, {{ this }} will be HTML-escaped, but {{{ that }}} will not.
    +
    In Handlebars, {{ this }} will be HTML-escaped, but {{{ that }}} will not.
    diff --git a/tags/render.html b/tags/render.html index e8b9c8da5..4472a270e 100644 --- a/tags/render.html +++ b/tags/render.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,31 +87,31 @@

    Render

    -
    +

    Added in: v9.2.0

    Basic Usage

    Render a Template

    Renders a partial template from the template roots.

    -
    {% render 'footer.liquid' %}
    +
    {% render 'footer.liquid' %}

    When the extname option is set, the above .liquid extension can be omitted and writes:

    -
    {% render 'footer' %}
    +
    {% render 'footer' %}
    Variable Scope

    When a partial template is rendered, the code inside it can’t access its parent’s variables and its variables won’t be accessible by its parent. This encapsulation helps make theme code easier to understand and maintain.

    Passing Variables

    Variables defined in parent’s scope can be passed to a the partial template by listing them as parameters on the render tag:

    -
    {% assign my_variable = 'apples' %}
    {% render 'name', my_variable: my_variable, my_other_variable: 'oranges' %}
    +
    {% assign my_variable = 'apples' %}
    {% render 'name', my_variable: my_variable, my_other_variable: 'oranges' %}

    globals don’t need to be passed down. They are accessible from all files.

    Parameters

    The with Parameter

    A single object can be passed to a snippet by using the with...as syntax:

    -
    {% assign featured_product = all_products['product_handle'] %}
    {% render 'product' with featured_product as product %}
    +
    {% assign featured_product = all_products['product_handle'] %}
    {% render 'product' with featured_product as product %}

    In the example above, the product variable in the partial template will hold the value of featured_product in the parent template.

    The for Parameter

    A partial template can be rendered once for each value of an enumerable by using the for...as syntax:

    -
    {% assign variants = product.variants %}
    {% render 'variant' for variants as variant %}
    +
    {% assign variants = product.variants %}
    {% render 'variant' for variants as variant %}

    In the example above, the partial template will be rendered once for each variant of the product, and the variant variable will hold a product’s variant object within the snippet.

    The forloop object

    When using the for parameter, the forloop object is accessible within the snippet.

    @@ -120,7 +120,7 @@
    diff --git a/tags/tablerow.html b/tags/tablerow.html index bdd0fde8b..36628fb25 100644 --- a/tags/tablerow.html +++ b/tags/tablerow.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Table Row

    -
    +
    @@ -95,30 +95,30 @@

    Generates an HTML table. Must be wrapped in opening <table> and closing </table> HTML tags.

    Basic Usage

    Input

    -
    <table>
    {% tablerow product in collection.products %}
    {{ product.title }}
    {% endtablerow %}
    </table>
    +
    <table>
    {% tablerow product in collection.products %}
    {{ product.title }}
    {% endtablerow %}
    </table>

    Output

    -
    <table>
    <tr class="row1">
    <td class="col1">
    Cool Shirt
    </td>
    <td class="col2">
    Alien Poster
    </td>
    <td class="col3">
    Batman Poster
    </td>
    <td class="col4">
    Bullseye Shirt
    </td>
    <td class="col5">
    Another Classic Vinyl
    </td>
    <td class="col6">
    Awesome Jeans
    </td>
    </tr>
    </table>
    +
    <table>
    <tr class="row1">
    <td class="col1">
    Cool Shirt
    </td>
    <td class="col2">
    Alien Poster
    </td>
    <td class="col3">
    Batman Poster
    </td>
    <td class="col4">
    Bullseye Shirt
    </td>
    <td class="col5">
    Another Classic Vinyl
    </td>
    <td class="col6">
    Awesome Jeans
    </td>
    </tr>
    </table>

    Parameters

    cols

    Defines how many columns the tables should have.

    Input

    -
    {% tablerow product in collection.products cols:2 %}
    {{ product.title }}
    {% endtablerow %}
    +
    {% tablerow product in collection.products cols:2 %}
    {{ product.title }}
    {% endtablerow %}

    Output

    -
    <table>
    <tr class="row1">
    <td class="col1">
    Cool Shirt
    </td>
    <td class="col2">
    Alien Poster
    </td>
    </tr>
    <tr class="row2">
    <td class="col1">
    Batman Poster
    </td>
    <td class="col2">
    Bullseye Shirt
    </td>
    </tr>
    <tr class="row3">
    <td class="col1">
    Another Classic Vinyl
    </td>
    <td class="col2">
    Awesome Jeans
    </td>
    </tr>
    </table>
    +
    <table>
    <tr class="row1">
    <td class="col1">
    Cool Shirt
    </td>
    <td class="col2">
    Alien Poster
    </td>
    </tr>
    <tr class="row2">
    <td class="col1">
    Batman Poster
    </td>
    <td class="col2">
    Bullseye Shirt
    </td>
    </tr>
    <tr class="row3">
    <td class="col1">
    Another Classic Vinyl
    </td>
    <td class="col2">
    Awesome Jeans
    </td>
    </tr>
    </table>

    limit

    Exits the tablerow after a specific index.

    -
    {% tablerow product in collection.products cols:2 limit:3 %}
    {{ product.title }}
    {% endtablerow %}
    +
    {% tablerow product in collection.products cols:2 limit:3 %}
    {{ product.title }}
    {% endtablerow %}

    offset

    Starts the tablerow after a specific index.

    -
    {% tablerow product in collection.products cols:2 offset:3 %}
    {{ product.title }}
    {% endtablerow %}
    +
    {% tablerow product in collection.products cols:2 offset:3 %}
    {{ product.title }}
    {% endtablerow %}

    range

    Defines a range of numbers to loop through. The range can be defined by both literal and variable numbers.

    -
    <!--variable number example-->

    {% assign num = 4 %}
    <table>
    {% tablerow i in (1..num) %}
    {{ i }}
    {% endtablerow %}
    </table>

    <!--literal number example-->

    <table>
    {% tablerow i in (3..5) %}
    {{ i }}
    {% endtablerow %}
    </table>
    +
    <!--variable number example-->

    {% assign num = 4 %}
    <table>
    {% tablerow i in (1..num) %}
    {{ i }}
    {% endtablerow %}
    </table>

    <!--literal number example-->

    <table>
    {% tablerow i in (3..5) %}
    {{ i }}
    {% endtablerow %}
    </table>
    diff --git a/tags/unless.html b/tags/unless.html index 61fe08222..bea320dad 100644 --- a/tags/unless.html +++ b/tags/unless.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Unless

    -
    +
    @@ -95,17 +95,17 @@

    The opposite of if – executes a block of code only if a certain condition is not met.

    Input

    -
    {% unless product.title == "Awesome Shoes" %}
    These shoes are not awesome.
    {% endunless %}
    +
    {% unless product.title == "Awesome Shoes" %}
    These shoes are not awesome.
    {% endunless %}

    Output

    -
    These shoes are not awesome.
    +
    These shoes are not awesome.

    This would be the equivalent of doing the following:

    -
    {% if product.title != "Awesome Shoes" %}
    These shoes are not awesome.
    {% endif %}
    +
    {% if product.title != "Awesome Shoes" %}
    These shoes are not awesome.
    {% endif %}
    diff --git a/tutorials/caching.html b/tutorials/caching.html index 72f1bee65..63db3bb85 100644 --- a/tutorials/caching.html +++ b/tutorials/caching.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Caching

    -
    +
    @@ -95,19 +95,19 @@

    LiquidJS provides multiple ways to cache the parsed templates to improve performance.

    Programmaticly

    The .parse(), .parseFile(), .parseFileSync() APIs are used to parse templates from string or files. The result template can be then rendered multiple times with different context.

    Parse from string:

    -
    var tpl = engine.parse('{{name | capitalize}}');

    engine.renderSync(tpl, {name: 'alice'}) // 'Alice'
    engine.renderSync(tpl, {name: 'bob'}) // 'Bob'
    +
    var tpl = engine.parse('{{name | capitalize}}');

    engine.renderSync(tpl, {name: 'alice'}) // 'Alice'
    engine.renderSync(tpl, {name: 'bob'}) // 'Bob'

    Parse from file:

    -
    var tpl = engine.parseFileSync('hello');    // contents of `hello.liquid`: {{name}}

    engine.renderSync(tpl, {name: 'alice'}) // 'Alice'
    engine.renderSync(tpl, {name: 'bob'}) // 'Bob'
    +
    var tpl = engine.parseFileSync('hello');    // contents of `hello.liquid`: {{name}}

    engine.renderSync(tpl, {name: 'alice'}) // 'Alice'
    engine.renderSync(tpl, {name: 'bob'}) // 'Bob'

    The template string/file is parsed only once and renderd multiple times using different context. Templates for different files can be stored into a Map and can be retrieved directly for subsequent renders.

    The cache Option

    The cache option can be set to instruct liquidjs to use cached parsed templates each time you call renderFile or renderFileSync.

    -
    var { Liquid } = require('liquidjs');
    var engine = new Liquid({
    cache: true
    });

    // liquidjs parses the hello.liquid, then renders it with {name: 'alice'}
    engine.renderFileSync('hello', {name: 'alice'})

    // liquidjs finds the cached template, then renders it with {name: 'bob'}
    engine.renderFileSync('hello', {name: 'bob'})
    +
    var { Liquid } = require('liquidjs');
    var engine = new Liquid({
    cache: true
    });

    // liquidjs parses the hello.liquid, then renders it with {name: 'alice'}
    engine.renderFileSync('hello', {name: 'alice'})

    // liquidjs finds the cached template, then renders it with {name: 'bob'}
    engine.renderFileSync('hello', {name: 'bob'})
    diff --git a/tutorials/contribution-guidelines.html b/tutorials/contribution-guidelines.html index 3c4e54ef4..d9b742965 100644 --- a/tutorials/contribution-guidelines.html +++ b/tutorials/contribution-guidelines.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,25 +87,26 @@

    Contribution Guideline

    -
    +
    -

    Star on Github 👉 harttle/liquidjs

    Staring us is the most important and easiest way to support us: boost its rank and expose it to more people, which in turn makes it better.

    -

    Show Me Your Code

    Code Style: LiquidJS applies standard and @typescript-eslint/recommended rules, make sure it’s still valid before commit:

    +

    Star on Github 👉 harttle/liquidjs

    Starring LiquidJS is the most important and easiest way to support us: boost its rank and expose it to more people, which in turn makes it better.

    +

    Show Me Your Code

    Code Style: LiquidJS applies standard and @typescript-eslint/recommended rules, make sure it’s still valid before commit:

    npm run lint

    Testing: Make sure test cases pass with your patch merged:

    npm test
    -

    Commit Message: Please align to the Angular Commit Message Guidelines, especially note the type identifier, on which semantic-release bot depends.

    -

    Financial Support

    LiquidJS is Open Source and Free and without capitalists support and without any ADs. To help it live and thrive, consider contribute on Open Collective or Patreon. To acknowledge your contribution, your name and avatar will be listed here and on Github README.

    +

    Commit Message: Please align to the Angular Commit Message Guidelines, especially note the type identifier, on which semantic-release bot depends.

    +

    Backward-Compatibility: please be backward-compatible. LiquidJS is used by multiple layers of softwares, including underlying libraries, compilers, site generators and Web servers. It’s not easy to do a major upgrade for most of them.

    +

    Financial Support

    LiquidJS is Open Source and Free and without capitalists support and without any ADs. To help it live and thrive, consider contribute on Open Collective or Patreon. To acknowledge your contribution, your name and avatar will be listed here and on Github README.

    -

    Become a Patron!

    +

    Become a Patron!

    @@ -114,7 +115,7 @@
    Contents -
    1. Star on Github 👉
    2. Show Me Your Code
    3. Financial Support
    +
    1. Star on Github 👉
    2. Show Me Your Code
    3. Financial Support
    Back to Top
    diff --git a/tutorials/differences.html b/tutorials/differences.html index bc409ddd8..97b56641a 100644 --- a/tutorials/differences.html +++ b/tutorials/differences.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,24 +87,24 @@

    Differences with Shopify/liquid

    -
    +
    -

    All filters and tags in shopify/liquid are supposed to be built in LiquidJS, but not those business-logic specific tags/filters which are typically from Shopify themes (see Plugins List in case you’re looking for them and feel free to add yours to the list). Though being compatible the Ruby version is one of our priorities, there are still some differences:

    +

    All filters and tags in shopify/liquid are supposed to be built in LiquidJS, but not those business-logic specific tags/filters which are typically from Shopify themes (see Plugins List in case you’re looking for them and feel free to add yours to the list). Though being compatible the Ruby version is one of our priorities, there are still some differences:

    diff --git a/tutorials/intro-to-liquid.html b/tutorials/intro-to-liquid.html index bb9bf4a6a..aaa24717d 100644 --- a/tutorials/intro-to-liquid.html +++ b/tutorials/intro-to-liquid.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,37 +87,37 @@

    Introduction to Liquid Template Language

    -
    +
    -

    LiquidJS is a simple, expressive, safe and shopify compatible template engine in pure JavaScript. The purpose of this repo is to provide a standard Liquid implementation for the JavaScript community. Liquid is originally implemented in Ruby and used by Github Pages, Jekyll and Shopify, see Differences with Shopify/liquid.

    +

    LiquidJS is a simple, expressive and safe Shopify / Github Pages compatible template engine in pure JavaScript. The purpose of this repo is to provide a standard Liquid implementation for the JavaScript community. Liquid is originally implemented in Ruby and used by Github Pages, Jekyll and Shopify, see Differences with Shopify/liquid.

    LiquidJS syntax is relatively simple. There’re 2 types of markups in LiquidJS:

    Outputs

    Outputs are used to output variables, which can be transformed by filters, into HTML. The following template will insert the value of username into the input’s value:

    -
    <input type="text" name="user" value="{{username}}">
    +
    <input type="text" name="user" value="{{username}}">

    Values in output can be transformed by filters before output. To append a string after the variable:

    -
    {{ username | append: ", welcome to LiquidJS!" }}
    +
    {{ username | append: ", welcome to LiquidJS!" }}

    Filters can be chained:

    -
    {{ username | append: ", welcome to LiquidJS!" | capitalize }}
    +
    {{ username | append: ", welcome to LiquidJS!" | capitalize }}

    A complete list of filters supported by LiquidJS can be found here.

    Tags

    Tags are used to control the template rendering process, manipulating template variables, inter-op with other templates, etc. For example assign can be used to define a variable which can be later used in the template:

    -
    {% assign foo = "FOO" %}
    +
    {% assign foo = "FOO" %}

    Typically tags appear in pairs with a start tag and a corresponding end tag. For example:

    -
    {% if foo == "FOO" %}
    Variable `foo` equals "FOO"
    {% else %}
    Variable `foo` not equals "FOO"
    {% endif %}
    +
    {% if foo == "FOO" %}
    Variable `foo` equals "FOO"
    {% else %}
    Variable `foo` not equals "FOO"
    {% endif %}

    A complete list of tags supported by LiquidJS can be found here.

    diff --git a/tutorials/migrate-to-9.html b/tutorials/migrate-to-9.html index b62e8499f..c48a62c58 100644 --- a/tutorials/migrate-to-9.html +++ b/tutorials/migrate-to-9.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Migrate to LiquidJS 9

    -
    +
    @@ -97,25 +97,25 @@
  • New utils: Expression
  • Fixes

    Performance

    BREAKING CHANGES

    diff --git a/tutorials/operators.html b/tutorials/operators.html index 7ce067e2a..458289c07 100644 --- a/tutorials/operators.html +++ b/tutorials/operators.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Operators

    -
    +
    @@ -101,11 +101,11 @@
  • Comparison operators. All comparison operations have the same precedence and higher than logic operators.
  • Logic operators. All logic operators have the same precedence.
  • -

    Associativity

    Logic operators are evaluated from right to left, see shopify docs.

    +

    Associativity

    Logic operators are evaluated from right to left, see shopify docs.

    diff --git a/tutorials/options.html b/tutorials/options.html index 557dea456..66e261acc 100644 --- a/tutorials/options.html +++ b/tutorials/options.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    Options

    -
    +
    -

    The Liquid constructor accepts a plain object as options to define the behaviour of LiquidJS. All of these options are optional thus we can specify any of them, for example the cache option:

    -
    const { Liquid } = require('liquidjs')
    const engine = new Liquid({
    cache: true
    })
    +

    The Liquid constructor accepts a plain object as options to define the behavior of LiquidJS. All of these options are optional thus we can specify any of them, for example the cache option:

    +
    const { Liquid } = require('liquidjs')
    const engine = new Liquid({
    cache: true
    })
    API Document

    Following is an overview for all the options, for exact types and signatures please refer to LiquidOptions | API.

    @@ -100,40 +100,43 @@

    cache

    cache is used to improve performance by caching previously parsed template structures, specially in cases when we’re repeatedly parse or render files.

    It’s default to false. When setting to true a default LRU cache of size 1024 will be enabled. And certainly it can be a number which indicates the size of cache you want.

    Additionally, it can also be a custom cache implementation. See Caching for details.

    -

    dynamicPartials

    dynamicPartials indicates whether or not to treat filename arguments in include, render, layout tags as a variable. Defaults to true. For example, render the following snippet with scope { file: 'foo.html' } will include the foo.html:

    -
    {% include file %}
    +

    dynamicPartials

    dynamicPartials indicates whether or not to treat filename arguments in include, render, layout tags as a variable. Defaults to true. For example, render the following snippet with scope { file: 'foo.html' } will include the foo.html:

    +
    {% include file %}

    Setting dynamicPartials: false, LiquidJS will try to include the file named file, which is weird but allows simpler syntax if your template relations are static:

    -
    {% liquid foo.html %}
    +
    {% liquid foo.html %}
    Common Pitfall

    LiquidJS defaults this option to true to be compatible with shopify/liquid, but if you’re from eleventy it’s set to false by default (see Quoted Include Paths) which I believe is trying to be compatible with Jekyll.

    -

    extname

    extname defines the default extname to be appended into filenames if the filename has no extname. Defaults to '' which means it’s disabled by default. By setting it to .liquid:

    -
    {% render "foo" %}  there's no extname, adds `.liquid` and loads foo.liquid
    {% render "foo.html" %} there is an extname already, loads foo.html directly
    +

    extname

    extname defines the default extension name to be appended into filenames if the filename has no extension name. Defaults to '' which means it’s disabled by default. By setting it to .liquid:

    +
    {% render "foo" %}  there's no extname, adds `.liquid` and loads foo.liquid
    {% render "foo.html" %} there is an extname already, loads foo.html directly
    Legacy Versions

    Before 2.0.1, extname is set to .liquid by default. To change that you need to set extname: '' explicitly. See #41 for details.

    root

    root is used to specify template directories for LiquidJS to lookup and read template files. Can be a single string and an array of strings. See Render Files for details.

    fs

    fs is used to define a custom file system implementation which will be used by LiquidJS to lookup and read template files. See Abstract File System for details.

    -

    globals

    globals is used to define global variables available to all templates even in cases of render tag. See 3185 for details.

    +

    globals

    globals is used to define global variables available to all templates even in cases of render tag. See 3185 for details.

    jsTruthy

    jsTruthy is used to use standard Javascript truthiness rather than the Shopify.

    it defaults to false. For example, when set to true, a blank string would evaluate to false with jsTruthy. With Shopify’s truthiness, a blank string is true.

    -

    Trimming

    greedy, trimOutputLeft, trimOutputRight, trimTagLeft, trimTagRight options are used to eliminate extra newlines and indents in templates arround Liquid Constructs. See Whitespace Control for details.

    +

    Date

    timezoneOffset is used to specify a different timezone to output dates, your local timezone will be used if not specified. For example, set timezoneOffset: 0 to output all dates in UTC/GMT 00:00.

    +

    preserveTimezones is a boolean effects only literal timestamps. When set to true, all literal timestamps will remain the same when output. This is a parser option, so Date objects passed to LiquidJS as data will not be affected.

    +

    Trimming

    greedy, trimOutputLeft, trimOutputRight, trimTagLeft, trimTagRight options are used to eliminate extra newlines and indents in templates around Liquid Constructs. See Whitespace Control for details.

    Delimiter

    outputDelimiterLeft, outputDelimiterRight, tagDelimiterLeft, tagDelimiterRight are used to customize the delimiters for LiquidJS Tags and Filters. For example with outputDelimiterLeft: <%=, outputDelimiterRight: %> we are able to avoid conflicts with other languages:

    -
    <%= username | append: ", welcome to LiquidJS!" %>
    +
    <%= username | append: ", welcome to LiquidJS!" %>

    Strict

    strictFilters is used to assert filter existence. If set to false, undefined filters will be skipped. Otherwise, undefined filters will cause a parse exception. Defaults to false.

    strictVariables is used to assert variable existence. If set to false, undefined variables will be rendered as empty string. Otherwise, undefined variables will cause a render exception. Defaults to false.

    lenientIf modifies the behavior of strictVariables to allow handling optional variables. If set to true, an undefined variable will not cause an exception in the following two situations: a) it is the condition to an if, elsif, or unless tag; b) it occurs right before a default filter. Irrelevant if strictVariables is not set. Defaults to false.

    -
    Non-existent Tags

    Non-existent tags always throw errors during parsing and this behaviour can not be customized.

    +
    Non-existent Tags

    Non-existent tags always throw errors during parsing and this behavior can not be customized.

    +

    Parameter Order

    Parameter orders are ignored by default, for ea {% for i in (1..8) reversed limit:3 %} will always perform limit before reversed, even if reversed occurs before limit. To make parameter order respected, set orderedFilterParameters to true. Its default value is false.

    @@ -142,7 +145,7 @@
    Contents -
    1. cache
    2. dynamicPartials
    3. extname
    4. root
    5. fs
    6. globals
    7. jsTruthy
    8. Trimming
    9. Delimiter
    10. Strict
    +
    1. cache
    2. dynamicPartials
    3. extname
    4. root
    5. fs
    6. globals
    7. jsTruthy
    8. Date
    9. Trimming
    10. Delimiter
    11. Strict
    12. Parameter Order
    Back to Top
    diff --git a/tutorials/partials-and-layouts.html b/tutorials/partials-and-layouts.html index 22fd97326..913329ce3 100644 --- a/tutorials/partials-and-layouts.html +++ b/tutorials/partials-and-layouts.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,31 +87,31 @@

    Partials and Layouts

    -
    +

    Render Partials

    For the following template files:

    -
    // file: color.liquid
    color: '{{ color }}' shape: '{{ shape }}'

    // file: theme.liquid
    {% assign shape = 'circle' %}
    {% render 'color.liquid' %}
    {% render 'color.liquid' with 'red' %}
    {% render 'color.liquid', color: 'yellow', shape: 'square' %}
    +
    // file: color.liquid
    color: '{{ color }}' shape: '{{ shape }}'

    // file: theme.liquid
    {% assign shape = 'circle' %}
    {% render 'color.liquid' %}
    {% render 'color.liquid' with 'red' %}
    {% render 'color.liquid', color: 'yellow', shape: 'square' %}

    The output will be:

    -
    color: '' shape: 'circle'
    color: 'red' shape: 'circle'
    color: 'yellow' shape: 'square'
    +
    color: '' shape: 'circle'
    color: 'red' shape: 'circle'
    color: 'yellow' shape: 'square'

    More details please refer to the render tag.

    The ".liquid" Extension

    The “.liquid” extension in layout, render and include an be omitted if Liquid instance is created using extname: ".liquid" option. See the extname option for details.

    Layout Templates (Extends)

    For the following template files:

    -
    // file: default-layout.liquid
    Header
    {% block content %}My default content{% endblock %}
    Footer

    // file: page.liquid
    {% layout "default-layout.liquid" %}
    {% block content %}My page content{% endblock %}
    +
    // file: default-layout.liquid
    Header
    {% block content %}My default content{% endblock %}
    Footer

    // file: page.liquid
    {% layout "default-layout.liquid" %}
    {% block content %}My page content{% endblock %}

    The output of page.liquid:

    -
    Header
    My page content
    Footer
    +
    Header
    My page content
    Footer

    More details please refer to the layout tag.

    diff --git a/tutorials/plugins.html b/tutorials/plugins.html index a914b5c3e..6f8b0295b 100644 --- a/tutorials/plugins.html +++ b/tutorials/plugins.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,28 +87,28 @@

    Plugins

    -
    +

    A number of tags and filters can be encapsulated into a plugin, which will be typically installed via npm. This article provides information about how to create and use a plugin.

    Write a Plugin

    A liquidjs plugin is simple function which takes the Liquid class as the first parameter and the Liquid instance for this. We can call liquidjs APIs on this to make certain changes, especially register filters and tags.

    Now we’ll make a plugin to upper case every letter of the input, save the following snippet to upup.js:

    -
    /**
    * Inside the plugin function, `this` refers to the Liquid instance.
    *
    * @param Liquid: provides facilities to implement tags and filters.
    */
    module.exports = function (Liquid) {
    this.registerFilter('upup', x => x.toUpperCase());
    }
    +
    /**
    * Inside the plugin function, `this` refers to the Liquid instance.
    *
    * @param Liquid: provides facilities to implement tags and filters.
    */
    module.exports = function (Liquid) {
    this.registerFilter('upup', x => x.toUpperCase());
    }

    Use a Plugin

    Simply pass the plugin function into the .plugin() method:

    -
    const engine = new Liquid()

    engine.plugin(require('./upup.js'));
    engine
    .parseAndRender('{{ "foo" | upup }}')
    .then(console.log) // outputs "FOO"
    +
    const engine = new Liquid()

    engine.plugin(require('./upup.js'));
    engine
    .parseAndRender('{{ "foo" | upup }}')
    .then(console.log) // outputs "FOO"
    -

    Plugin List

    Since this library excludes certain features that are available on the Shopify platform but not on the Shopify/liquid repo, see https://github.com/harttle/liquidjs#differences-and-limitations.

    +

    Plugin List

    Since this library excludes certain features that are available on the Shopify platform but not on the Shopify/liquid repo, see https://github.com/harttle/liquidjs#differences-and-limitations.

    Here’s a list of plugins that backfill those features. Feel free to add yours, this file is publicly editable.

    diff --git a/tutorials/register-filters-tags.html b/tutorials/register-filters-tags.html index 86ff19903..5e8cd977b 100644 --- a/tutorials/register-filters-tags.html +++ b/tutorials/register-filters-tags.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,29 +87,29 @@

    Register Filters/Tags

    -
    +
    -

    Register Tags

    // Usage: {% upper name %}
    import { TagToken, Context, Emitter, TopLevelToken } from 'liquidjs'

    engine.registerTag('upper', {
    parse: function(tagToken: TagToken, remainTokens: TopLevelToken[]) {
    this.str = tagToken.args; // name
    },
    render: async function(ctx: Context) {
    var str = await this.liquid.evalValue(this.str, ctx); // 'alice'
    return str.toUpperCase() // 'ALICE'
    }
    });
    +

    Register Tags

    // Usage: {% upper name %}
    import { TagToken, Context, Emitter, TopLevelToken } from 'liquidjs'

    engine.registerTag('upper', {
    parse: function(tagToken: TagToken, remainTokens: TopLevelToken[]) {
    this.str = tagToken.args; // name
    },
    render: async function(ctx: Context) {
    var str = await this.liquid.evalValue(this.str, ctx); // 'alice'
    return str.toUpperCase() // 'ALICE'
    }
    });
    -

    See existing tag implementations here: https://github.com/harttle/liquidjs/tree/master/src/builtin/tags
    See demo example here: https://github.com/harttle/liquidjs/blob/master/demo/typescript/index.ts

    -

    Register Filters

    // Usage: {{ name | upper }}
    engine.registerFilter('upper', v => v.toUpperCase())
    +

    See existing tag implementations here: https://github.com/harttle/liquidjs/tree/master/src/builtin/tags
    See demo example here: https://github.com/harttle/liquidjs/blob/master/demo/typescript/index.ts

    +

    Register Filters

    // Usage: {{ name | upper }}
    engine.registerFilter('upper', v => v.toUpperCase())

    Filter arguments will be passed to the registered filter function, for example:

    -
    // Usage: {{ 1 | add: 2, 3 }}
    engine.registerFilter('add', (initial, arg1, arg2) => initial + arg1 + arg2)
    +
    // Usage: {{ 1 | add: 2, 3 }}
    engine.registerFilter('add', (initial, arg1, arg2) => initial + arg1 + arg2)
    -

    See existing filter implementations here: https://github.com/harttle/liquidjs/tree/master/src/builtin/filters

    -

    Unregister Tags/Filters

    In some cases it’s desirable to disable some tags/filters (see #324), you’ll need to register a dummy tag/filter in which an corresponding Error throws.

    -
    // disable a tag
    const disabledTag = {
    parse: function(token) {
    throw new Error(`tag "${token.name}" disabled`);
    }
    }
    engine.registerTag('include', disabledTag);

    // disable a filter
    function disabledFilter(name) {
    return function () {
    throw new Error(`filter "${name}" disabled`);
    }
    }
    engine.registerFilter('plus', disabledFilter('plus'));
    +

    See existing filter implementations here: https://github.com/harttle/liquidjs/tree/master/src/builtin/filters

    +

    Unregister Tags/Filters

    In some cases it’s desirable to disable some tags/filters (see #324), you’ll need to register a dummy tag/filter in which an corresponding Error throws.

    +
    // disable a tag
    const disabledTag = {
    parse: function(token) {
    throw new Error(`tag "${token.name}" disabled`);
    }
    }
    engine.registerTag('include', disabledTag);

    // disable a filter
    function disabledFilter(name) {
    return function () {
    throw new Error(`filter "${name}" disabled`);
    }
    }
    engine.registerFilter('plus', disabledFilter('plus'));
    diff --git a/tutorials/render-file.html b/tutorials/render-file.html index 2a3dcbba4..813e35e63 100644 --- a/tutorials/render-file.html +++ b/tutorials/render-file.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,23 +87,23 @@

    Render Files

    -
    +

    For a typical project there could be a directory of template files, you’ll need to set the template root and call renderFile or renderFileSync to render a specific file.

    Render a File

    For example you have a directory of templates like this:

    -
    .
    ├── index.js
    └── views/
    ├── hello.liquid
    └── world.liquid
    +
    .
    ├── index.js
    └── views/
    ├── hello.liquid
    └── world.liquid

    hello.liquid contains a single line `name: {{name}}`.
    Now save the following contents into index.js:

    -
    var engine = new Liquid({
    root: path.resolve(__dirname, 'views/'), // root for layouts/includes lookup
    extname: '.liquid' // used for layouts/includes, defaults ""
    });
    engine
    .renderFile("hello", {name: 'alice'}) // will read and render `views/hello.liquid`
    .then(console.log) // outputs "Alice"
    +
    var engine = new Liquid({
    root: path.resolve(__dirname, 'views/'), // root for layouts/includes lookup
    extname: '.liquid' // used for layouts/includes, defaults ""
    });
    engine
    .renderFile("hello", {name: 'alice'}) // will read and render `views/hello.liquid`
    .then(console.log) // outputs "Alice"

    Run node index.js and you’ll get output like this:

    -
    > node index.js
    name: alice
    +
    > node index.js
    name: alice
    -

    Template Lookup

    Template files names passed to renderFile, parseFile, renderFileSync, parseFileSync APIs,
    and include, layout tags are resolved against the root option.

    +

    Template Lookup

    Template files names passed to renderFile, parseFile, renderFileSync, parseFileSync APIs,
    and include, layout tags are resolved against the root option.

    It can be a string-typed path (see above example), or a list of root directories, in which case templates will be looked up in that order. e.g.

    -
    var engine = new Liquid({
    root: ['views/', 'views/partials/'],
    extname: '.liquid'
    });
    +
    var engine = new Liquid({
    root: ['views/', 'views/partials/'],
    extname: '.liquid'
    });
    Relative Paths

    Relative paths in root will be resolved against cwd().

    @@ -113,20 +113,20 @@
  • cwd()/views/foo.liquid
  • cwd()/views/partials/foo.liquid
  • -

    If none of the above files exists, an ENOENT error will be throwed. Here’s a demo for Node.js: demo/nodejs.

    -

    When LiquidJS is used in browser, say current location is https://example.com/bar/index.html, only the first root will be used and the file to be fetched is:

    +

    If none of the above files exists, an ENOENT error will be throwed. Here’s a demo for Node.js: demo/nodejs.

    +

    When LiquidJS is used in browser, say current location is https://example.com/bar/index.html, only the first root will be used and the file to be fetched is:

    -

    If fetch fails, a 404/500 error or network failures for example, an ENOENT error will be throwed.
    Here’s a demo for browsers: demo/browser.

    -

    Abstract File System

    LiquidJS defines an abstract file system interface in src/fs/ifs.ts and the default implementation is src/fs/node.ts for Node.js and src/fs/browser.ts for the browser bundle.

    +

    If fetch fails, a 404/500 error or network failures for example, an ENOENT error will be throwed.
    Here’s a demo for browsers: demo/browser.

    +

    Abstract File System

    LiquidJS defines an abstract file system interface in src/fs/ifs.ts and the default implementation is src/fs/node.ts for Node.js and src/fs/browser.ts for the browser bundle.

    The Liquid constructor provides a fs option to specify the file system implementation. It’s supposed to be used to define customized template fetching logic, i.e. fetch template from a database table, like:

    -
    var engine = new Liquid({
    fs: {
    readFileSync (file) {
    return db.model('Template').findByIdSync(file).text
    },
    await readFile (file) {
    const template = await db.model('Template').findById(file)
    return template.text
    },
    existsSync () {
    return true
    },
    await exists () {
    return true
    },
    resolve(root, file, ext) {
    return file
    }
    }
    });
    +
    var engine = new Liquid({
    fs: {
    readFileSync (file) {
    return db.model('Template').findByIdSync(file).text
    },
    await readFile (file) {
    const template = await db.model('Template').findById(file)
    return template.text
    },
    existsSync () {
    return true
    },
    await exists () {
    return true
    },
    resolve(root, file, ext) {
    return file
    }
    }
    });
    diff --git a/tutorials/setup.html b/tutorials/setup.html index b53fcb216..11a46752c 100644 --- a/tutorials/setup.html +++ b/tutorials/setup.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Setup

    -
    +
    @@ -95,20 +95,19 @@

    LiquidJS in Node.js

    Install via npm:

    npm install --save liquidjs
    -
    var { Liquid } = require('liquidjs');
    var engine = new Liquid();

    engine
    .parseAndRender('{{name | capitalize}}', {name: 'alice'})
    .then(console.log); // outputs 'Alice'
    +
    var { Liquid } = require('liquidjs');
    var engine = new Liquid();

    engine
    .parseAndRender('{{name | capitalize}}', {name: 'alice'})
    .then(console.log); // outputs 'Alice'
    Working Demo

    Here’s a working demo for LiquidJS usage in Node.js: liquidjs/demo/nodejs/.

    -Type definitions for LiquidJS are also exported and published, which makes it more enjoyable for TypeScript projects: - -
    import { Liquid } from 'liquidjs';
    const engine = new Liquid();

    engine
    .parseAndRender('{{name | capitalize}}', {name: 'alice'})
    .then(console.log); // outputs 'Alice'
    +

    Type definitions for LiquidJS are also exported and published, which makes it more enjoyable for TypeScript projects:

    +
    import { Liquid } from 'liquidjs';
    const engine = new Liquid();

    engine
    .parseAndRender('{{name | capitalize}}', {name: 'alice'})
    .then(console.log); // outputs 'Alice'
    Working Demo

    Here’s a working demo for LiquidJS usage in TypeScript: liquidjs/demo/typescript/.

    LiquidJS in Browsers

    Pre-built UMD bundles are also available:

    -
    <!--for production-->
    <script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.min.js"></script>
    <!--for development-->
    <script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.umd.js"></script>
    +
    <!--for production-->
    <script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.min.js"></script>
    <!--for development-->
    <script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.umd.js"></script>
    Working Demo

    Here’s a living demo on jsFiddle: jsfiddle.net/pd4jhzLs/1/, and the source code is also available in liquidjs/demo/browser/.

    @@ -117,16 +116,16 @@ Type definitions for LiquidJS are also exported and published, which makes it mo

    LiquidJS in CLI

    LiquidJS is also available from CLI:

    -
    echo '{{"hello" | capitalize}}' | npx liquidjs
    +
    echo '{{"hello" | capitalize}}' | npx liquidjs

    If you pass a path to a JSON file or a JSON string as the first argument, it will be used as the context for your template.

    -
    echo 'Hello, {{ name }}.' | npx liquidjs '{"name": "Snake"}'
    +
    echo 'Hello, {{ name }}.' | npx liquidjs '{"name": "Snake"}'
    -

    Miscellaneous

    A ReactJS demo is also added by @stevenanthonyrevo, see liquidjs/demo/reactjs/.

    +

    Miscellaneous

    A ReactJS demo is also added by @stevenanthonyrevo, see liquidjs/demo/reactjs/.

    diff --git a/tutorials/truthy-and-falsy.html b/tutorials/truthy-and-falsy.html index 5c9c2fc80..092d85e47 100644 --- a/tutorials/truthy-and-falsy.html +++ b/tutorials/truthy-and-falsy.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    Truthy and Falsy

    -
    +
    -

    Though Liquid is platform-independent, there’re certain differences with the Ruby version, one of which is the truthy value.

    -

    The Truth Table

    According to Shopify document everything other than false and nil is truthy. But in JavaScript we have a totally different type system, we have types like undefined and we don’t differentiate integer and float, thus things are slightly different:

    +

    Though Liquid is platform-independent, there’re certain differences with the Ruby version, one of which is the truthy value.

    +

    The Truth Table

    According to Shopify document everything other than false and nil is truthy. But in JavaScript we have a totally different type system, we have types like undefined and we don’t differentiate integer and float, thus things are slightly different:

    @@ -225,7 +225,7 @@
    - +
    diff --git a/tutorials/use-in-expressjs.html b/tutorials/use-in-expressjs.html index 98396bcc7..ba67f9057 100644 --- a/tutorials/use-in-expressjs.html +++ b/tutorials/use-in-expressjs.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,32 +87,32 @@

    Use in Express.js

    -
    +
    -

    LiquidJS is compatible to the express template engines. You can set liquidjs instance to the view engine option:

    -
    var { Liquid } = require('liquidjs');
    var engine = new Liquid();

    // register liquid engine
    app.engine('liquid', engine.express());
    app.set('views', './views'); // specify the views directory
    app.set('view engine', 'liquid'); // set liquid to default
    +

    LiquidJS is compatible to the express template engines. You can set liquidjs instance to the view engine option:

    +
    var { Liquid } = require('liquidjs');
    var engine = new Liquid();

    // register liquid engine
    app.engine('liquid', engine.express());
    app.set('views', './views'); // specify the views directory
    app.set('view engine', 'liquid'); // set liquid to default
    Working Demo

    Here’s a working demo for LiquidJS usage in Express.js: liquidjs/demo/express/.

    -

    Template Lookup

    The root option will continue to work as templates root, as you can see in Render A Template File. Additionally, the views option in express.js (as shown above) will also be respected. Say you have a template directory like:

    -
    .
    ├── views1/
    │ └── hello.liquid
    └── views2/
    └── world.liquid
    +

    Template Lookup

    The root option will continue to work as templates root, as you can see in Render A Template File. Additionally, the views option in express.js (as shown above) will also be respected. Say you have a template directory like:

    +
    .
    ├── views1/
    │ └── hello.liquid
    └── views2/
    └── world.liquid

    And you’re setting template root for liquidjs to views1 and expressjs to views2:

    -
    var { Liquid } = require('liquidjs');
    var engine = new Liquid({
    root: './views1/'
    });

    app.engine('liquid', engine.express());
    app.set('views', './views2'); // specify the views directory
    app.set('view engine', 'liquid'); // set liquid to default
    +
    var { Liquid } = require('liquidjs');
    var engine = new Liquid({
    root: './views1/'
    });

    app.engine('liquid', engine.express());
    app.set('views', './views2'); // specify the views directory
    app.set('view engine', 'liquid'); // set liquid to default

    Both of hello.liquid and world.liquid can be resolved and rendered:

    -
    res.render('hello')
    res.render('world')
    +
    res.render('hello')
    res.render('world')

    Caching

    Simply setting the cache option to true will enable template caching, as explained in Caching. It’s recommended to enable cache in production environment, which can be done by:

    -
    var { Liquid } = require('liquidjs');
    var engine = new Liquid({
    cache: process.env.NODE_ENV === 'production'
    });
    +
    var { Liquid } = require('liquidjs');
    var engine = new Liquid({
    cache: process.env.NODE_ENV === 'production'
    });
    diff --git a/tutorials/whitespace-control.html b/tutorials/whitespace-control.html index 73d7dc461..e987b0d2f 100644 --- a/tutorials/whitespace-control.html +++ b/tutorials/whitespace-control.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,24 +87,24 @@

    Whitespace Control

    -
    +

    To keep source code neat and indented, we’re adding spaces to our templates. LiquidJS offers whitespace control capabilities to eliminate these unwanted whitespaces in output HTML.

    via Markups

    By default, all tags and output markups lines will generate a NL (\n), and whitespaces if there’s any indentation. For example:

    -
    {%  author = "harttle" %}
    {{ author }}
    +
    {%  author = "harttle" %}
    {{ author }}

    Outputs (note the blank link):

    -

    harttle
    +

    harttle
    -

    We can include hyphens in your tag syntax ({{-, -}}, {%-, -%}) to strip whitespace from left or right. For example:

    -
    {% assign author = "harttle" -%}
    {{ author }}
    +

    We can include hyphens in your tag syntax ({{-`, `-}}`, `{%-, -%}) to strip whitespace from left or right. For example:

    +
    {% assign author = "harttle" -%}
    {{ author }}

    Outputs:

    -
    harttle
    +
    harttle
    -

    In this case, the -%} strips the whitespace from the right side of the assign tag.

    +

    In this case, the -%} strips the whitespace from the right side of the assign tag.

    via Options

    Alternatively, LiquidJS provides these per engine options to enable whitespace control without sweeping changes of your templates:

    -

    LiquidJS will NOT trim any whitespace by default, aka. above options all default to false. For details of these options, see the options.

    -

    Greedy Mode

    In greedy mode (enabled by the greedy option), all consecutive whitespace chars (including \n) will be trimmed. Greedy mode is enabled by default to be compliant with shopify/liquid.

    +

    LiquidJS will NOT trim any whitespace by default, aka. above options all default to false. For details of these options, see the options.

    +

    Greedy Mode

    In greedy mode (enabled by the greedy option), all consecutive whitespace chars (including \n) will be trimmed. Greedy mode is enabled by default to be compliant with shopify/liquid.

    diff --git a/zh-cn/api/classes/cache_lru_.lru.html b/zh-cn/api/classes/cache_lru_.lru.html index a7a1aa83b..fdf64fc9b 100644 --- a/zh-cn/api/classes/cache_lru_.lru.html +++ b/zh-cn/api/classes/cache_lru_.lru.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: LRU <T>

    -
    +
    @@ -99,7 +99,7 @@
  • Cache‹T›
  • Constructors

    constructor

    + new LRU(limit: number, size: number): LRU

    -

    Defined in cache/lru.ts:15

    +

    Defined in cache/lru.ts:15

    Parameters:

    @@ -122,33 +122,33 @@

    Returns: LRU

    Properties

    Private cache

    cache: object

    -

    Defined in cache/lru.ts:13

    +

    Defined in cache/lru.ts:13

    Type declaration:


    Private head

    head: Node‹T›

    -

    Defined in cache/lru.ts:14

    +

    Defined in cache/lru.ts:14


    limit

    limit: number

    -

    Defined in cache/lru.ts:18

    +

    Defined in cache/lru.ts:18


    size

    size: number

    -

    Defined in cache/lru.ts:19

    +

    Defined in cache/lru.ts:19


    Private tail

    tail: Node‹T›

    -

    Defined in cache/lru.ts:15

    +

    Defined in cache/lru.ts:15

    Methods

    clear

    clear(): void

    -

    Defined in cache/lru.ts:57

    +

    Defined in cache/lru.ts:57

    Returns: void


    Private ensureLimit

    ensureLimit(): void

    -

    Defined in cache/lru.ts:64

    +

    Defined in cache/lru.ts:64

    Returns: void


    read

    read(key: string): T | undefined

    Implementation of Cache

    -

    Defined in cache/lru.ts:41

    +

    Defined in cache/lru.ts:41

    Parameters:

    @@ -165,7 +165,7 @@

    Returns: T | undefined


    remove

    remove(key: string): void

    -

    Defined in cache/lru.ts:49

    +

    Defined in cache/lru.ts:49

    Parameters:

    @@ -183,7 +183,7 @@

    write

    write(key: string, value: T): void

    Implementation of Cache

    -

    Defined in cache/lru.ts:27

    +

    Defined in cache/lru.ts:27

    Parameters:

    @@ -205,7 +205,7 @@
    - +
    diff --git a/zh-cn/api/classes/cache_lru_.node.html b/zh-cn/api/classes/cache_lru_.node.html index 41865ca7a..346921f8d 100644 --- a/zh-cn/api/classes/cache_lru_.node.html +++ b/zh-cn/api/classes/cache_lru_.node.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Node <T>

    -
    +
    @@ -96,7 +96,7 @@
  • Node
  • Constructors

    constructor

    + new Node(key: string, value: T, next: Node‹T›, prev: Node‹T›): Node

    -

    Defined in cache/lru.ts:3

    +

    Defined in cache/lru.ts:3

    Parameters:

    @@ -124,20 +124,20 @@

    Returns: Node

    Properties

    key

    key: string

    -

    Defined in cache/lru.ts:5

    +

    Defined in cache/lru.ts:5


    next

    next: Node‹T›

    -

    Defined in cache/lru.ts:7

    +

    Defined in cache/lru.ts:7


    prev

    prev: Node‹T›

    -

    Defined in cache/lru.ts:8

    +

    Defined in cache/lru.ts:8


    value

    value: T

    -

    Defined in cache/lru.ts:6

    +

    Defined in cache/lru.ts:6

    diff --git a/zh-cn/api/classes/context_context_.context.html b/zh-cn/api/classes/context_context_.context.html index 17e743407..096fb69fe 100644 --- a/zh-cn/api/classes/context_context_.context.html +++ b/zh-cn/api/classes/context_context_.context.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Context

    -
    +
    @@ -95,7 +95,7 @@
  • Context
  • Constructors

    constructor

    + new Context(env: object, opts: NormalizedFullOptions, sync: boolean): Context

    -

    Defined in context/context.ts:14

    +

    Defined in context/context.ts:14

    Parameters:

    @@ -123,28 +123,28 @@

    Returns: Context

    Properties

    environments

    environments: Scope

    -

    Defined in context/context.ts:11

    +

    Defined in context/context.ts:11


    globals

    globals: Scope

    -

    Defined in context/context.ts:12

    +

    Defined in context/context.ts:12


    opts

    opts: NormalizedFullOptions

    -

    Defined in context/context.ts:14

    +

    Defined in context/context.ts:14


    Private registers

    registers: object

    -

    Defined in context/context.ts:10

    +

    Defined in context/context.ts:10

    Type declaration:


    Private scopes

    scopes: Scope[] = [{}]

    -

    Defined in context/context.ts:9

    +

    Defined in context/context.ts:9


    sync

    sync: boolean

    -

    Defined in context/context.ts:13

    +

    Defined in context/context.ts:13

    Methods

    bottom

    bottom(): PlainObject | Drop

    -

    Defined in context/context.ts:57

    +

    Defined in context/context.ts:57

    Returns: PlainObject | Drop


    Private findScope

    findScope(key: string): PlainObject | Drop

    -

    Defined in context/context.ts:60

    +

    Defined in context/context.ts:60

    Parameters:

    @@ -161,7 +161,7 @@

    Returns: PlainObject | Drop


    get

    get(paths: string[]): object

    -

    Defined in context/context.ts:37

    +

    Defined in context/context.ts:37

    Parameters:

    @@ -178,11 +178,11 @@

    Returns: object


    getAll

    getAll(): PlainObject | Drop

    -

    Defined in context/context.ts:33

    +

    Defined in context/context.ts:33

    Returns: PlainObject | Drop


    getFromScope

    getFromScope(scope: object, paths: string[] | string): object

    -

    Defined in context/context.ts:41

    +

    Defined in context/context.ts:41

    Parameters:

    @@ -203,7 +203,7 @@

    Returns: object


    getRegister

    getRegister(key: string, defaultValue: object): any

    -

    Defined in context/context.ts:21

    +

    Defined in context/context.ts:21

    Parameters:

    @@ -227,11 +227,11 @@

    Returns: any


    pop

    pop(): undefined | PlainObject | Drop

    -

    Defined in context/context.ts:54

    +

    Defined in context/context.ts:54

    Returns: undefined | PlainObject | Drop


    push

    push(ctx: object): number

    -

    Defined in context/context.ts:51

    +

    Defined in context/context.ts:51

    Parameters:

    @@ -248,7 +248,7 @@

    Returns: number


    restoreRegister

    restoreRegister(keyValues: [string, any][]): void

    -

    Defined in context/context.ts:30

    +

    Defined in context/context.ts:30

    Parameters:

    @@ -265,7 +265,7 @@

    Returns: void


    saveRegister

    saveRegister(…keys: string[]): [string, any][]

    -

    Defined in context/context.ts:27

    +

    Defined in context/context.ts:27

    Parameters:

    @@ -282,7 +282,7 @@

    Returns: [string, any][]


    setRegister

    setRegister(key: string, value: any): any

    -

    Defined in context/context.ts:24

    +

    Defined in context/context.ts:24

    Parameters:

    @@ -304,7 +304,7 @@
    - +
    diff --git a/zh-cn/api/classes/drop_blank_drop_.blankdrop.html b/zh-cn/api/classes/drop_blank_drop_.blankdrop.html index 8807a66a3..2c3f0644a 100644 --- a/zh-cn/api/classes/drop_blank_drop_.blankdrop.html +++ b/zh-cn/api/classes/drop_blank_drop_.blankdrop.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: BlankDrop

    -
    +
    @@ -98,7 +98,7 @@

    Methods

    equals

    equals(value: any): boolean

    Overrides EmptyDrop.equals

    -

    Defined in drop/blank-drop.ts:5

    +

    Defined in drop/blank-drop.ts:5

    Parameters:

    @@ -116,22 +116,22 @@

    geq

    geq(): boolean

    Inherited from EmptyDrop.geq

    -

    Defined in drop/empty-drop.ts:16

    +

    Defined in drop/empty-drop.ts:16

    Returns: boolean


    gt

    gt(): boolean

    Inherited from EmptyDrop.gt

    -

    Defined in drop/empty-drop.ts:13

    +

    Defined in drop/empty-drop.ts:13

    Returns: boolean


    leq

    leq(): boolean

    Inherited from EmptyDrop.leq

    -

    Defined in drop/empty-drop.ts:22

    +

    Defined in drop/empty-drop.ts:22

    Returns: boolean


    liquidMethodMissing

    liquidMethodMissing(key: string): Promise‹string | undefined› | string | undefined

    Inherited from Drop.liquidMethodMissing

    -

    Defined in drop/drop.ts:6

    +

    Defined in drop/drop.ts:6

    Parameters:

    @@ -149,18 +149,18 @@

    lt

    lt(): boolean

    Inherited from EmptyDrop.lt

    -

    Defined in drop/empty-drop.ts:19

    +

    Defined in drop/empty-drop.ts:19

    Returns: boolean


    valueOf

    valueOf(): string

    Inherited from EmptyDrop.valueOf

    Overrides Drop.valueOf

    -

    Defined in drop/empty-drop.ts:25

    +

    Defined in drop/empty-drop.ts:25

    Returns: string

    - +
    diff --git a/zh-cn/api/classes/drop_block_drop_.blockdrop.html b/zh-cn/api/classes/drop_block_drop_.blockdrop.html index d40e34e29..773e27aeb 100644 --- a/zh-cn/api/classes/drop_block_drop_.blockdrop.html +++ b/zh-cn/api/classes/drop_block_drop_.blockdrop.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: BlockDrop

    -
    +
    @@ -97,17 +97,17 @@

    Constructors

    constructor

    + new BlockDrop(superBlockRender: function): BlockDrop

    -

    Defined in drop/block-drop.ts:3

    +

    Defined in drop/block-drop.ts:3

    Parameters:

    Default value superBlockRender: function= () => ‘’

    ▸ (): Iterable‹string›

    Returns: BlockDrop

    Properties

    Private superBlockRender

    superBlockRender: function

    -

    Defined in drop/block-drop.ts:6

    +

    Defined in drop/block-drop.ts:6

    Type declaration:

    ▸ (): Iterable‹string›

    Methods

    liquidMethodMissing

    liquidMethodMissing(key: string): Promise‹string | undefined› | string | undefined

    Inherited from Drop.liquidMethodMissing

    -

    Defined in drop/drop.ts:6

    +

    Defined in drop/drop.ts:6

    Parameters:

    @@ -124,17 +124,17 @@

    Returns: Promise‹string | undefined› | string | undefined


    super

    super(): Iterable‹string›

    -

    Defined in drop/block-drop.ts:10

    +

    Defined in drop/block-drop.ts:10

    Returns: Iterable‹string›


    valueOf

    valueOf(): any

    Inherited from Drop.valueOf

    -

    Defined in drop/drop.ts:2

    +

    Defined in drop/drop.ts:2

    Returns: any

    - +
    diff --git a/zh-cn/api/classes/drop_drop_.drop.html b/zh-cn/api/classes/drop_drop_.drop.html index 628363fe7..cbb3e2c32 100644 --- a/zh-cn/api/classes/drop_drop_.drop.html +++ b/zh-cn/api/classes/drop_drop_.drop.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Drop

    -
    +
    @@ -100,7 +100,7 @@

    Methods

    liquidMethodMissing

    liquidMethodMissing(key: string): Promise‹string | undefined› | string | undefined

    -

    Defined in drop/drop.ts:6

    +

    Defined in drop/drop.ts:6

    Parameters:

    @@ -117,12 +117,12 @@

    Returns: Promise‹string | undefined› | string | undefined


    valueOf

    valueOf(): any

    -

    Defined in drop/drop.ts:2

    +

    Defined in drop/drop.ts:2

    Returns: any

    - +
    diff --git a/zh-cn/api/classes/drop_empty_drop_.emptydrop.html b/zh-cn/api/classes/drop_empty_drop_.emptydrop.html index 1166a2747..96b05fcf6 100644 --- a/zh-cn/api/classes/drop_empty_drop_.emptydrop.html +++ b/zh-cn/api/classes/drop_empty_drop_.emptydrop.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: EmptyDrop

    -
    +
    @@ -101,7 +101,7 @@
  • Comparable
  • Methods

    equals

    equals(value: any): boolean

    -

    Defined in drop/empty-drop.ts:6

    +

    Defined in drop/empty-drop.ts:6

    Parameters:

    @@ -118,20 +118,20 @@

    Returns: boolean


    geq

    geq(): boolean

    -

    Defined in drop/empty-drop.ts:16

    +

    Defined in drop/empty-drop.ts:16

    Returns: boolean


    gt

    gt(): boolean

    -

    Defined in drop/empty-drop.ts:13

    +

    Defined in drop/empty-drop.ts:13

    Returns: boolean


    leq

    leq(): boolean

    -

    Defined in drop/empty-drop.ts:22

    +

    Defined in drop/empty-drop.ts:22

    Returns: boolean


    liquidMethodMissing

    liquidMethodMissing(key: string): Promise‹string | undefined› | string | undefined

    Inherited from Drop.liquidMethodMissing

    -

    Defined in drop/drop.ts:6

    +

    Defined in drop/drop.ts:6

    Parameters:

    @@ -148,17 +148,17 @@

    Returns: Promise‹string | undefined› | string | undefined


    lt

    lt(): boolean

    -

    Defined in drop/empty-drop.ts:19

    +

    Defined in drop/empty-drop.ts:19

    Returns: boolean


    valueOf

    valueOf(): string

    Overrides Drop.valueOf

    -

    Defined in drop/empty-drop.ts:25

    +

    Defined in drop/empty-drop.ts:25

    Returns: string

    - +
    diff --git a/zh-cn/api/classes/drop_forloop_drop_.forloopdrop.html b/zh-cn/api/classes/drop_forloop_drop_.forloopdrop.html index 08d3b346a..ee5179328 100644 --- a/zh-cn/api/classes/drop_forloop_drop_.forloopdrop.html +++ b/zh-cn/api/classes/drop_forloop_drop_.forloopdrop.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: ForloopDrop

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new ForloopDrop(length: number): ForloopDrop

    -

    Defined in drop/forloop-drop.ts:5

    +

    Defined in drop/forloop-drop.ts:5

    Parameters:

    @@ -114,29 +114,29 @@

    Returns: ForloopDrop

    Properties

    Protected i

    i: number = 0

    -

    Defined in drop/forloop-drop.ts:4

    +

    Defined in drop/forloop-drop.ts:4


    length

    length: number

    -

    Defined in drop/forloop-drop.ts:5

    +

    Defined in drop/forloop-drop.ts:5

    Methods

    first

    first(): boolean

    -

    Defined in drop/forloop-drop.ts:19

    +

    Defined in drop/forloop-drop.ts:19

    Returns: boolean


    index

    index(): number

    -

    Defined in drop/forloop-drop.ts:16

    +

    Defined in drop/forloop-drop.ts:16

    Returns: number


    index0

    index0(): number

    -

    Defined in drop/forloop-drop.ts:13

    +

    Defined in drop/forloop-drop.ts:13

    Returns: number


    last

    last(): boolean

    -

    Defined in drop/forloop-drop.ts:22

    +

    Defined in drop/forloop-drop.ts:22

    Returns: boolean


    liquidMethodMissing

    liquidMethodMissing(key: string): Promise‹string | undefined› | string | undefined

    Inherited from Drop.liquidMethodMissing

    -

    Defined in drop/drop.ts:6

    +

    Defined in drop/drop.ts:6

    Parameters:

    @@ -153,25 +153,25 @@

    Returns: Promise‹string | undefined› | string | undefined


    next

    next(): void

    -

    Defined in drop/forloop-drop.ts:10

    +

    Defined in drop/forloop-drop.ts:10

    Returns: void


    rindex

    rindex(): number

    -

    Defined in drop/forloop-drop.ts:25

    +

    Defined in drop/forloop-drop.ts:25

    Returns: number


    rindex0

    rindex0(): number

    -

    Defined in drop/forloop-drop.ts:28

    +

    Defined in drop/forloop-drop.ts:28

    Returns: number


    valueOf

    valueOf(): string

    Overrides Drop.valueOf

    -

    Defined in drop/forloop-drop.ts:31

    +

    Defined in drop/forloop-drop.ts:31

    Returns: string

    - +
    diff --git a/zh-cn/api/classes/drop_null_drop_.nulldrop.html b/zh-cn/api/classes/drop_null_drop_.nulldrop.html index b098d757e..139ebcf6f 100644 --- a/zh-cn/api/classes/drop_null_drop_.nulldrop.html +++ b/zh-cn/api/classes/drop_null_drop_.nulldrop.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: NullDrop

    -
    +
    @@ -100,7 +100,7 @@
  • Comparable
  • Methods

    equals

    equals(value: any): boolean

    -

    Defined in drop/null-drop.ts:6

    +

    Defined in drop/null-drop.ts:6

    Parameters:

    @@ -117,20 +117,20 @@

    Returns: boolean


    geq

    geq(): boolean

    -

    Defined in drop/null-drop.ts:12

    +

    Defined in drop/null-drop.ts:12

    Returns: boolean


    gt

    gt(): boolean

    -

    Defined in drop/null-drop.ts:9

    +

    Defined in drop/null-drop.ts:9

    Returns: boolean


    leq

    leq(): boolean

    -

    Defined in drop/null-drop.ts:18

    +

    Defined in drop/null-drop.ts:18

    Returns: boolean


    liquidMethodMissing

    liquidMethodMissing(key: string): Promise‹string | undefined› | string | undefined

    Inherited from Drop.liquidMethodMissing

    -

    Defined in drop/drop.ts:6

    +

    Defined in drop/drop.ts:6

    Parameters:

    @@ -147,17 +147,17 @@

    Returns: Promise‹string | undefined› | string | undefined


    lt

    lt(): boolean

    -

    Defined in drop/null-drop.ts:15

    +

    Defined in drop/null-drop.ts:15

    Returns: boolean


    valueOf

    valueOf(): null

    Overrides Drop.valueOf

    -

    Defined in drop/null-drop.ts:21

    +

    Defined in drop/null-drop.ts:21

    Returns: null

    - +
    diff --git a/zh-cn/api/classes/drop_tablerowloop_drop_.tablerowloopdrop.html b/zh-cn/api/classes/drop_tablerowloop_drop_.tablerowloopdrop.html index 1440cd9e9..bb6060e22 100644 --- a/zh-cn/api/classes/drop_tablerowloop_drop_.tablerowloopdrop.html +++ b/zh-cn/api/classes/drop_tablerowloop_drop_.tablerowloopdrop.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: TablerowloopDrop

    -
    +
    @@ -95,7 +95,7 @@

    TablerowloopDrop

    Constructors

    constructor

    + new TablerowloopDrop(length: number, cols: number): TablerowloopDrop

    Overrides ForloopDrop.constructor

    -

    Defined in drop/tablerowloop-drop.ts:4

    +

    Defined in drop/tablerowloop-drop.ts:4

    Parameters:

    @@ -115,54 +115,54 @@

    Returns: TablerowloopDrop

    Properties

    Private cols

    cols: number

    -

    Defined in drop/tablerowloop-drop.ts:4

    +

    Defined in drop/tablerowloop-drop.ts:4


    Protected i

    i: number = 0

    Inherited from ForloopDrop.i

    -

    Defined in drop/forloop-drop.ts:4

    +

    Defined in drop/forloop-drop.ts:4


    length

    length: number

    Inherited from ForloopDrop.length

    -

    Defined in drop/forloop-drop.ts:5

    +

    Defined in drop/forloop-drop.ts:5

    Methods

    col

    col(): number

    -

    Defined in drop/tablerowloop-drop.ts:16

    +

    Defined in drop/tablerowloop-drop.ts:16

    Returns: number


    col0

    col0(): number

    -

    Defined in drop/tablerowloop-drop.ts:13

    +

    Defined in drop/tablerowloop-drop.ts:13

    Returns: number


    col_first

    col_first(): boolean

    -

    Defined in drop/tablerowloop-drop.ts:19

    +

    Defined in drop/tablerowloop-drop.ts:19

    Returns: boolean


    col_last

    col_last(): boolean

    -

    Defined in drop/tablerowloop-drop.ts:22

    +

    Defined in drop/tablerowloop-drop.ts:22

    Returns: boolean


    first

    first(): boolean

    Inherited from ForloopDrop.first

    -

    Defined in drop/forloop-drop.ts:19

    +

    Defined in drop/forloop-drop.ts:19

    Returns: boolean


    index

    index(): number

    Inherited from ForloopDrop.index

    -

    Defined in drop/forloop-drop.ts:16

    +

    Defined in drop/forloop-drop.ts:16

    Returns: number


    index0

    index0(): number

    Inherited from ForloopDrop.index0

    -

    Defined in drop/forloop-drop.ts:13

    +

    Defined in drop/forloop-drop.ts:13

    Returns: number


    last

    last(): boolean

    Inherited from ForloopDrop.last

    -

    Defined in drop/forloop-drop.ts:22

    +

    Defined in drop/forloop-drop.ts:22

    Returns: boolean


    liquidMethodMissing

    liquidMethodMissing(key: string): Promise‹string | undefined› | string | undefined

    Inherited from Drop.liquidMethodMissing

    -

    Defined in drop/drop.ts:6

    +

    Defined in drop/drop.ts:6

    Parameters:

    @@ -180,32 +180,32 @@

    next

    next(): void

    Inherited from ForloopDrop.next

    -

    Defined in drop/forloop-drop.ts:10

    +

    Defined in drop/forloop-drop.ts:10

    Returns: void


    rindex

    rindex(): number

    Inherited from ForloopDrop.rindex

    -

    Defined in drop/forloop-drop.ts:25

    +

    Defined in drop/forloop-drop.ts:25

    Returns: number


    rindex0

    rindex0(): number

    Inherited from ForloopDrop.rindex0

    -

    Defined in drop/forloop-drop.ts:28

    +

    Defined in drop/forloop-drop.ts:28

    Returns: number


    row

    row(): number

    -

    Defined in drop/tablerowloop-drop.ts:10

    +

    Defined in drop/tablerowloop-drop.ts:10

    Returns: number


    valueOf

    valueOf(): string

    Inherited from ForloopDrop.valueOf

    Overrides Drop.valueOf

    -

    Defined in drop/forloop-drop.ts:31

    +

    Defined in drop/forloop-drop.ts:31

    Returns: string

    - +
    diff --git a/zh-cn/api/classes/emitters_keeping_type_emitter_.keepingtypeemitter.html b/zh-cn/api/classes/emitters_keeping_type_emitter_.keepingtypeemitter.html new file mode 100644 index 000000000..3daab43c4 --- /dev/null +++ b/zh-cn/api/classes/emitters_keeping_type_emitter_.keepingtypeemitter.html @@ -0,0 +1,201 @@ + + + + + Class: KeepingTypeEmitter | LiquidJS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + +
    NameType
    htmlany
    +

    Returns: void

    + +
    + + + + + + + + + + + + + +
    + + + + + + + + + + + \ No newline at end of file diff --git a/zh-cn/api/classes/emitters_simple_emitter_.simpleemitter.html b/zh-cn/api/classes/emitters_simple_emitter_.simpleemitter.html new file mode 100644 index 000000000..258a422b8 --- /dev/null +++ b/zh-cn/api/classes/emitters_simple_emitter_.simpleemitter.html @@ -0,0 +1,206 @@ + + + + + Class: SimpleEmitter | LiquidJS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    +
    +
    + +
    +
    +
    +
    +
    +

    Class: SimpleEmitter

    + + + +
    +
    +

    Hierarchy

      +
    • SimpleEmitter
    • +
    +

    Implements

    +

    Properties

    html

    html: any = “”

    +

    Defined in emitters/simple-emitter.ts:5

    +

    Methods

    end

    end(): any

    +

    Implementation of Emitter

    +

    Defined in emitters/simple-emitter.ts:11

    +

    Returns: any

    +
    +

    write

    write(html: any): void

    +

    Implementation of Emitter

    +

    Defined in emitters/simple-emitter.ts:7

    +

    Parameters:

    + + + + + + + + + + + +
    NameType
    htmlany
    +

    Returns: void

    + +
    + +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    + + + + + + + + + + + \ No newline at end of file diff --git a/zh-cn/api/classes/render_emitter_.emitter.html b/zh-cn/api/classes/emitters_streamed_emitter_.streamedemitter.html similarity index 75% rename from zh-cn/api/classes/render_emitter_.emitter.html rename to zh-cn/api/classes/emitters_streamed_emitter_.streamedemitter.html index b7d6b85d3..9894bbdff 100644 --- a/zh-cn/api/classes/render_emitter_.emitter.html +++ b/zh-cn/api/classes/emitters_streamed_emitter_.streamedemitter.html @@ -2,19 +2,19 @@ - Class: Emitter | LiquidJS + Class: StreamedEmitter | LiquidJS - + - + - + @@ -36,8 +36,8 @@ - - + +
    @@ -55,7 +55,7 @@ - Github + Github @@ -85,44 +85,26 @@
    -

    Class: Emitter

    +

    Class: StreamedEmitter

    -
    +

    Hierarchy

      -
    • Emitter
    • +
    • StreamedEmitter
    -

    Constructors

    constructor

    + new Emitter(keepOutputType: boolean | undefined): Emitter

    -

    Defined in render/emitter.ts:7

    -

    Parameters:

    - - - - - - - - - - - -
    NameType
    keepOutputTypeboolean | undefined
    -

    Returns: Emitter

    -

    Properties

    break

    break: boolean = false

    -

    Defined in render/emitter.ts:5

    +

    Properties

    html

    html: any = “”

    +

    Defined in emitters/streamed-emitter.ts:4


    -

    continue

    continue: boolean = false

    -

    Defined in render/emitter.ts:6

    +

    stream

    stream: any = new (require(‘stream’).PassThrough)()

    +

    Defined in emitters/streamed-emitter.ts:5

    +

    Methods

    end

    end(): void

    +

    Defined in emitters/streamed-emitter.ts:9

    +

    Returns: void


    -

    html

    html: any = “”

    -

    Defined in render/emitter.ts:4

    -
    -

    Private Optional keepOutputType

    keepOutputType? : undefined | false | true = false

    -

    Defined in render/emitter.ts:7

    -

    Methods

    write

    write(html: any): void

    -

    Defined in render/emitter.ts:13

    +

    write

    write(html: any): void

    +

    Defined in emitters/streamed-emitter.ts:6

    Parameters:

    @@ -140,7 +122,7 @@
    - +
    @@ -149,7 +131,7 @@
    目录 -
    1. Hierarchy
    2. Constructors
      1. constructor
    3. Properties
      1. break
      2. continue
      3. html
      4. Private Optional keepOutputType
    4. Methods
      1. write
    +
    1. Hierarchy
    2. Properties
      1. html
      2. stream
    3. Methods
      1. end
      2. write
    回到顶部
    @@ -193,7 +175,7 @@
    简体中文 - diff --git a/zh-cn/api/classes/liquid_.liquid.html b/zh-cn/api/classes/liquid_.liquid.html index b2f508e60..83221dde1 100644 --- a/zh-cn/api/classes/liquid_.liquid.html +++ b/zh-cn/api/classes/liquid_.liquid.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Liquid

    -
    +
    @@ -95,7 +95,7 @@
  • Liquid
  • Constructors

    constructor

    + new Liquid(opts: LiquidOptions): Liquid

    -

    Defined in liquid.ts:26

    +

    Defined in liquid.ts:26

    Parameters:

    @@ -113,21 +113,42 @@

    Returns: Liquid

    Properties

    filters

    filters: FilterMap

    -

    Defined in liquid.ts:25

    +

    Defined in liquid.ts:24


    options

    options: NormalizedFullOptions

    -

    Defined in liquid.ts:22

    +

    Defined in liquid.ts:21

    +
    +

    parseFileImpl

    parseFileImpl: function

    +

    Defined in liquid.ts:26

    +

    Type declaration:

    ▸ (file: string, sync?: undefined | false | true): Iterator‹Template[]›

    +

    Parameters:

    + + + + + + + + + + + + + + + +
    NameType
    filestring
    sync?undefined | false | true

    parser

    parser: Parser

    -

    Defined in liquid.ts:24

    +

    Defined in liquid.ts:23


    renderer

    renderer: Render

    -

    Defined in liquid.ts:23

    +

    Defined in liquid.ts:22


    tags

    tags: TagMap

    -

    Defined in liquid.ts:26

    +

    Defined in liquid.ts:25

    Methods

    _evalValue

    _evalValue(str: string, ctx: Context): IterableIterator‹any›

    -

    Defined in liquid.ts:104

    +

    Defined in liquid.ts:105

    Parameters:

    @@ -147,8 +168,8 @@

    Returns: IterableIterator‹any›


    -

    _parseAndRender

    _parseAndRender(html: string, scope?: undefined | object, opts?: LiquidOptions, sync?: undefined | false | true): IterableIterator‹any›

    -

    Defined in liquid.ts:57

    +

    _parseAndRender

    _parseAndRender(html: string, scope?: undefined | object, sync?: undefined | false | true): IterableIterator‹any›

    +

    Defined in liquid.ts:60

    Parameters:

    @@ -166,18 +187,14 @@ - - - -
    undefined | object
    opts?LiquidOptions
    sync? undefined | false | true

    Returns: IterableIterator‹any›


    -

    _parseFile

    _parseFile(file: string, opts?: LiquidOptions, sync?: undefined | false | true): IterableIterator‹any›

    -

    Defined in liquid.ts:68

    +

    Private _parseFile

    _parseFile(file: string, sync?: undefined | false | true): IterableIterator‹Promise‹boolean› | Promise‹string› | Template[]›

    +

    Defined in liquid.ts:80

    Parameters:

    @@ -191,8 +208,25 @@ - - + + + +
    string
    opts?LiquidOptionssync?undefined | false | true
    +

    Returns: IterableIterator‹Promise‹boolean› | Promise‹string› | Template[]›

    +
    +

    Private _parseFileCached

    _parseFileCached(file: string, sync?: undefined | false | true): IterableIterator‹any›

    +

    Defined in liquid.ts:71

    +

    Parameters:

    + + + + + + + + + + @@ -201,8 +235,8 @@
    NameType
    filestring
    sync?

    Returns: IterableIterator‹any›


    -

    _render

    _render(tpl: Template[], scope?: undefined | object, opts?: LiquidOptions, sync?: undefined | false | true): IterableIterator‹any›

    -

    Defined in liquid.ts:44

    +

    _render

    _render(tpl: Template[], scope?: undefined | object, sync?: undefined | false | true): IterableIterator‹any›

    +

    Defined in liquid.ts:45

    Parameters:

    @@ -220,10 +254,6 @@ - - - - @@ -231,7 +261,7 @@

    Returns: IterableIterator‹any›


    evalValue

    evalValue(str: string, ctx: Context): Promise‹any›

    -

    Defined in liquid.ts:108

    +

    Defined in liquid.ts:109

    Parameters:

    undefined | object
    opts?LiquidOptions
    sync? undefined | false | true
    @@ -252,7 +282,7 @@

    Returns: Promise‹any›


    evalValueSync

    evalValueSync(str: string, ctx: Context): any

    -

    Defined in liquid.ts:111

    +

    Defined in liquid.ts:112

    Parameters:

    @@ -273,53 +303,11 @@

    Returns: any


    express

    express(): (Anonymous function)

    -

    Defined in liquid.ts:124

    +

    Defined in liquid.ts:125

    Returns: (Anonymous function)


    -

    getTemplate

    getTemplate(file: string, opts?: LiquidOptions): Promise‹Template[]›

    -

    Defined in liquid.ts:142

    -

    Parameters:

    -
    - - - - - - - - - - - - - - -
    NameType
    filestring
    opts?LiquidOptions
    -

    Returns: Promise‹Template[]›

    -
    -

    getTemplateSync

    getTemplateSync(file: string, opts?: LiquidOptions): Template[]

    -

    Defined in liquid.ts:148

    -

    Parameters:

    - - - - - - - - - - - - - - - -
    NameType
    filestring
    opts?LiquidOptions
    -

    Returns: Template[]

    -

    Private lookupError

    lookupError(file: string, roots: string[]): any

    -

    Defined in liquid.ts:132

    +

    Defined in liquid.ts:149

    Parameters:

    @@ -339,8 +327,29 @@

    Returns: any


    +

    Private lookupFiles

    lookupFiles(file: string, options: NormalizedFullOptions): IterableIterator‹string›

    +

    Defined in liquid.ts:138

    +

    Parameters:

    + + + + + + + + + + + + + + + +
    NameType
    filestring
    optionsNormalizedFullOptions
    +

    Returns: IterableIterator‹string›

    +

    parse

    parse(html: string, filepath?: undefined | string): Template[]

    -

    Defined in liquid.ts:38

    +

    Defined in liquid.ts:39

    Parameters:

    @@ -360,8 +369,8 @@

    Returns: Template[]


    -

    parseAndRender

    parseAndRender(html: string, scope?: undefined | object, opts?: LiquidOptions): Promise‹any›

    -

    Defined in liquid.ts:61

    +

    parseAndRender

    parseAndRender(html: string, scope?: undefined | object): Promise‹any›

    +

    Defined in liquid.ts:64

    Parameters:

    @@ -378,15 +387,11 @@ - - - -
    scope? undefined | object
    opts?LiquidOptions

    Returns: Promise‹any›


    -

    parseAndRenderSync

    parseAndRenderSync(html: string, scope?: undefined | object, opts?: LiquidOptions): any

    -

    Defined in liquid.ts:64

    +

    parseAndRenderSync

    parseAndRenderSync(html: string, scope?: undefined | object): any

    +

    Defined in liquid.ts:67

    Parameters:

    @@ -403,15 +408,11 @@ - - - -
    scope? undefined | object
    opts?LiquidOptions

    Returns: any


    -

    parseFile

    parseFile(file: string, opts?: LiquidOptions): Promise‹Template[]›

    -

    Defined in liquid.ts:89

    +

    parseFile

    parseFile(file: string): Promise‹Template[]›

    +

    Defined in liquid.ts:90

    Parameters:

    @@ -424,15 +425,11 @@ - - - -
    file string
    opts?LiquidOptions

    Returns: Promise‹Template[]›


    -

    parseFileSync

    parseFileSync(file: string, opts?: LiquidOptions): Template[]

    -

    Defined in liquid.ts:92

    +

    parseFileSync

    parseFileSync(file: string): Template[]

    +

    Defined in liquid.ts:93

    Parameters:

    @@ -445,15 +442,11 @@ - - - -
    file string
    opts?LiquidOptions

    Returns: Template[]


    plugin

    plugin(plugin: function): void

    -

    Defined in liquid.ts:121

    +

    Defined in liquid.ts:122

    Parameters:

    plugin: function

    ▸ (this: Liquid, L: Liquid): void

    @@ -477,7 +470,7 @@

    Returns: void


    registerFilter

    registerFilter(name: string, filter: FilterImplOptions): void

    -

    Defined in liquid.ts:115

    +

    Defined in liquid.ts:116

    Parameters:

    @@ -498,7 +491,7 @@

    Returns: void


    registerTag

    registerTag(name: string, tag: TagImplOptions): void

    -

    Defined in liquid.ts:118

    +

    Defined in liquid.ts:119

    Parameters:

    @@ -518,8 +511,8 @@

    Returns: void


    -

    render

    render(tpl: Template[], scope?: undefined | object, opts?: LiquidOptions): Promise‹any›

    -

    Defined in liquid.ts:50

    +

    render

    render(tpl: Template[], scope?: undefined | object): Promise‹any›

    +

    Defined in liquid.ts:49

    Parameters:

    @@ -536,15 +529,11 @@ - - - -
    scope? undefined | object
    opts?LiquidOptions

    Returns: Promise‹any›


    -

    renderFile

    renderFile(file: string, ctx?: undefined | object, opts?: LiquidOptions): Promise‹any›

    -

    Defined in liquid.ts:95

    +

    renderFile

    renderFile(file: string, ctx?: undefined | object): Promise‹any›

    +

    Defined in liquid.ts:96

    Parameters:

    @@ -561,15 +550,11 @@ - - - -
    ctx? undefined | object
    opts?LiquidOptions

    Returns: Promise‹any›


    -

    renderFileSync

    renderFileSync(file: string, ctx?: undefined | object, opts?: LiquidOptions): any

    -

    Defined in liquid.ts:99

    +

    renderFileSync

    renderFileSync(file: string, ctx?: undefined | object): any

    +

    Defined in liquid.ts:100

    Parameters:

    @@ -586,15 +571,11 @@ - - - -
    ctx? undefined | object
    opts?LiquidOptions

    Returns: any


    -

    renderSync

    renderSync(tpl: Template[], scope?: undefined | object, opts?: LiquidOptions): any

    -

    Defined in liquid.ts:53

    +

    renderSync

    renderSync(tpl: Template[], scope?: undefined | object): any

    +

    Defined in liquid.ts:52

    Parameters:

    @@ -611,16 +592,33 @@ - - - -
    scope? undefined | object
    opts?LiquidOptions

    Returns: any

    +
    +

    renderToNodeStream

    renderToNodeStream(tpl: Template[], scope?: undefined | object): ReadableStream

    +

    Defined in liquid.ts:55

    +

    Parameters:

    + + + + + + + + + + + + + + + +
    NameType
    tplTemplate[]
    scope?undefined | object
    +

    Returns: ReadableStream

    - +
    @@ -629,7 +627,7 @@
    目录 -
    1. Hierarchy
    2. Constructors
      1. constructor
    3. Properties
      1. filters
      2. options
      3. parser
      4. renderer
      5. tags
    4. Methods
      1. _evalValue
      2. _parseAndRender
      3. _parseFile
      4. _render
      5. evalValue
      6. evalValueSync
      7. express
      8. getTemplate
      9. getTemplateSync
      10. Private lookupError
      11. parse
      12. parseAndRender
      13. parseAndRenderSync
      14. parseFile
      15. parseFileSync
      16. plugin
      17. registerFilter
      18. registerTag
      19. render
      20. renderFile
      21. renderFileSync
      22. renderSync
    +
    1. Hierarchy
    2. Constructors
      1. constructor
    3. Properties
      1. filters
      2. options
      3. parseFileImpl
        1. Type declaration:
      4. parser
      5. renderer
      6. tags
    4. Methods
      1. _evalValue
      2. _parseAndRender
      3. Private _parseFile
      4. Private _parseFileCached
      5. _render
      6. evalValue
      7. evalValueSync
      8. express
      9. Private lookupError
      10. Private lookupFiles
      11. parse
      12. parseAndRender
      13. parseAndRenderSync
      14. parseFile
      15. parseFileSync
      16. plugin
      17. registerFilter
      18. registerTag
      19. render
      20. renderFile
      21. renderFileSync
      22. renderSync
      23. renderToNodeStream
    回到顶部
    diff --git a/zh-cn/api/classes/parser_parse_stream_.parsestream.html b/zh-cn/api/classes/parser_parse_stream_.parsestream.html index 25e6e64c9..6724cdd55 100644 --- a/zh-cn/api/classes/parser_parse_stream_.parsestream.html +++ b/zh-cn/api/classes/parser_parse_stream_.parsestream.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: ParseStream <T>

    -
    +
    @@ -96,7 +96,7 @@
  • ParseStream
  • Constructors

    constructor

    + new ParseStream(tokens: T[], parseToken: ParseToken‹T›): ParseStream

    -

    Defined in parser/parse-stream.ts:12

    +

    Defined in parser/parse-stream.ts:12

    Parameters:

    @@ -116,7 +116,7 @@

    Returns: ParseStream

    Properties

    Private handlers

    handlers: object

    -

    Defined in parser/parse-stream.ts:10

    +

    Defined in parser/parse-stream.ts:10

    Type declaration:

    • [ key: string]: function
    @@ -136,15 +136,15 @@

    Private parseToken

    parseToken: ParseToken‹T›

    -

    Defined in parser/parse-stream.ts:12

    +

    Defined in parser/parse-stream.ts:12


    Private stopRequested

    stopRequested: boolean = false

    -

    Defined in parser/parse-stream.ts:11

    +

    Defined in parser/parse-stream.ts:11


    Private tokens

    tokens: T[]

    -

    Defined in parser/parse-stream.ts:9

    +

    Defined in parser/parse-stream.ts:9

    Methods

    on

    on<T2>(name: string, cb: function): ParseStream‹T›

    -

    Defined in parser/parse-stream.ts:18

    +

    Defined in parser/parse-stream.ts:18

    Type parameters:

    T2: Template | T | undefined

    Parameters:

    @@ -167,15 +167,15 @@

    Returns: ParseStream‹T›


    start

    start(): this

    -

    Defined in parser/parse-stream.ts:26

    +

    Defined in parser/parse-stream.ts:26

    Returns: this


    stop

    stop(): this

    -

    Defined in parser/parse-stream.ts:40

    +

    Defined in parser/parse-stream.ts:40

    Returns: this


    Private trigger

    trigger<T>(event: string, arg?: T): boolean

    -

    Defined in parser/parse-stream.ts:22

    +

    Defined in parser/parse-stream.ts:22

    Type parameters:

    T: Token | Template

    Parameters:

    @@ -199,7 +199,7 @@
    - +
    diff --git a/zh-cn/api/classes/parser_parser_.parser.html b/zh-cn/api/classes/parser_parser_.parser.html index 5542168f6..8eb4dea60 100644 --- a/zh-cn/api/classes/parser_parser_.parser.html +++ b/zh-cn/api/classes/parser_parser_.parser.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Parser

    -
    +
    @@ -95,7 +95,7 @@
  • Parser
  • Constructors

    constructor

    + new Parser(liquid: Liquid): Parser

    -

    Defined in parser/parser.ts:13

    +

    Defined in parser/parser.ts:13

    Parameters:

    @@ -111,9 +111,9 @@

    Returns: Parser

    Properties

    Private liquid

    liquid: Liquid

    -

    Defined in parser/parser.ts:13

    +

    Defined in parser/parser.ts:13

    Methods

    parse

    parse(tokens: TopLevelToken[]): Template[]

    -

    Defined in parser/parser.ts:18

    +

    Defined in parser/parser.ts:18

    Parameters:

    @@ -130,7 +130,7 @@

    Returns: Template[]


    parseStream

    parseStream(tokens: TopLevelToken[]): ParseStreamTagToken | HTMLToken | OutputToken

    -

    Defined in parser/parser.ts:39

    +

    Defined in parser/parser.ts:39

    Parameters:

    @@ -147,7 +147,7 @@

    Returns: ParseStreamTagToken | HTMLToken | OutputToken


    parseToken

    parseToken(token: TopLevelToken, remainTokens: TopLevelToken[]): Tag | Output | HTML

    -

    Defined in parser/parser.ts:26

    +

    Defined in parser/parser.ts:26

    Parameters:

    @@ -169,7 +169,7 @@
    - +
    diff --git a/zh-cn/api/classes/parser_tokenizer_.tokenizer.html b/zh-cn/api/classes/parser_tokenizer_.tokenizer.html index 883b3b8c9..e7a6edc97 100644 --- a/zh-cn/api/classes/parser_tokenizer_.tokenizer.html +++ b/zh-cn/api/classes/parser_tokenizer_.tokenizer.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Tokenizer

    -
    +
    @@ -95,7 +95,7 @@
  • Tokenizer
  • Constructors

    constructor

    + new Tokenizer(input: string, trie: Trie, file: string): Tokenizer

    -

    Defined in parser/tokenizer.ts:31

    +

    Defined in parser/tokenizer.ts:31

    Parameters:

    @@ -123,24 +123,24 @@

    Returns: Tokenizer

    Properties

    N

    N: number

    -

    Defined in parser/tokenizer.ts:30

    +

    Defined in parser/tokenizer.ts:30


    Private file

    file: string

    -

    Defined in parser/tokenizer.ts:36

    +

    Defined in parser/tokenizer.ts:36


    -

    Private input

    input: string

    -

    Defined in parser/tokenizer.ts:34

    +

    input

    input: string

    +

    Defined in parser/tokenizer.ts:34


    p

    p: number = 0

    -

    Defined in parser/tokenizer.ts:29

    +

    Defined in parser/tokenizer.ts:29


    Private rawBeginAt

    rawBeginAt: number = -1

    -

    Defined in parser/tokenizer.ts:31

    +

    Defined in parser/tokenizer.ts:31


    Private trie

    trie: Trie

    -

    Defined in parser/tokenizer.ts:35

    +

    Defined in parser/tokenizer.ts:35

    Methods

    advance

    advance(i: number): void

    -

    Defined in parser/tokenizer.ts:248

    +

    Defined in parser/tokenizer.ts:248

    Parameters:

    @@ -159,11 +159,11 @@

    Returns: void


    end

    end(): boolean

    -

    Defined in parser/tokenizer.ts:252

    +

    Defined in parser/tokenizer.ts:252

    Returns: boolean


    match

    match(word: string): boolean

    -

    Defined in parser/tokenizer.ts:343

    +

    Defined in parser/tokenizer.ts:343

    Parameters:

    @@ -180,7 +180,7 @@

    Returns: boolean


    mkError

    mkError(msg: string, begin: number): TokenizationError

    -

    Defined in parser/tokenizer.ts:196

    +

    Defined in parser/tokenizer.ts:196

    Parameters:

    @@ -201,7 +201,7 @@

    Returns: TokenizationError


    peek

    peek(n: number): string

    -

    Defined in parser/tokenizer.ts:361

    +

    Defined in parser/tokenizer.ts:361

    Parameters:

    @@ -220,7 +220,7 @@

    Returns: string


    peekType

    peekType(n: number): number

    -

    Defined in parser/tokenizer.ts:357

    +

    Defined in parser/tokenizer.ts:357

    Parameters:

    @@ -239,7 +239,7 @@

    Returns: number


    readEndrawOrRawContent

    readEndrawOrRawContent(options: NormalizedFullOptions): HTMLToken | TagToken

    -

    Defined in parser/tokenizer.ts:169

    +

    Defined in parser/tokenizer.ts:169

    Parameters:

    @@ -256,31 +256,31 @@

    Returns: HTMLToken | TagToken


    readExpression

    readExpression(): Expression

    -

    Defined in parser/tokenizer.ts:41

    +

    Defined in parser/tokenizer.ts:41

    Returns: Expression


    readExpressionTokens

    readExpressionTokens(): IterableIterator‹Token

    -

    Defined in parser/tokenizer.ts:45

    +

    Defined in parser/tokenizer.ts:45

    Returns: IterableIterator‹Token


    readFileName

    readFileName(): IdentifierToken

    -

    Defined in parser/tokenizer.ts:337

    +

    Defined in parser/tokenizer.ts:337

    Returns: IdentifierToken


    readFilter

    readFilter(): FilterToken | null

    -

    Defined in parser/tokenizer.ts:76

    +

    Defined in parser/tokenizer.ts:76

    Returns: FilterToken | null


    readFilterArg

    readFilterArg(): FilterArg | undefined

    -

    Defined in parser/tokenizer.ts:97

    +

    Defined in parser/tokenizer.ts:97

    Returns: FilterArg | undefined


    readFilters

    readFilters(): FilterToken[]

    -

    Defined in parser/tokenizer.ts:68

    +

    Defined in parser/tokenizer.ts:68

    Returns: FilterToken[]


    readHTMLToken

    readHTMLToken(options: NormalizedFullOptions): HTMLToken

    -

    Defined in parser/tokenizer.ts:125

    +

    Defined in parser/tokenizer.ts:125

    Parameters:

    @@ -297,23 +297,23 @@

    Returns: HTMLToken


    readHash

    readHash(): HashToken | undefined

    -

    Defined in parser/tokenizer.ts:228

    +

    Defined in parser/tokenizer.ts:228

    Returns: HashToken | undefined


    readHashes

    readHashes(): HashToken[]

    -

    Defined in parser/tokenizer.ts:219

    +

    Defined in parser/tokenizer.ts:219

    Returns: HashToken[]


    readIdentifier

    readIdentifier(): IdentifierToken

    -

    Defined in parser/tokenizer.ts:212

    +

    Defined in parser/tokenizer.ts:212

    Returns: IdentifierToken


    readOperator

    readOperator(): OperatorToken | undefined

    -

    Defined in parser/tokenizer.ts:62

    +

    Defined in parser/tokenizer.ts:62

    Returns: OperatorToken | undefined


    readOutputToken

    readOutputToken(options: NormalizedFullOptions): OutputToken

    -

    Defined in parser/tokenizer.ts:159

    +

    Defined in parser/tokenizer.ts:159

    Parameters:

    @@ -332,15 +332,15 @@

    Returns: OutputToken


    readQuoted

    readQuoted(): QuotedToken | undefined

    -

    Defined in parser/tokenizer.ts:322

    +

    Defined in parser/tokenizer.ts:322

    Returns: QuotedToken | undefined


    readRange

    readRange(): RangeToken | undefined

    -

    Defined in parser/tokenizer.ts:304

    +

    Defined in parser/tokenizer.ts:304

    Returns: RangeToken | undefined


    readTagToken

    readTagToken(options: NormalizedFullOptions): TagToken

    -

    Defined in parser/tokenizer.ts:136

    +

    Defined in parser/tokenizer.ts:136

    Parameters:

    @@ -359,7 +359,7 @@

    Returns: TagToken


    readTo

    readTo(end: string): number

    -

    Defined in parser/tokenizer.ts:256

    +

    Defined in parser/tokenizer.ts:256

    Parameters:

    @@ -376,7 +376,7 @@

    Returns: number


    readToDelimiter

    readToDelimiter(delimiter: string): number

    -

    Defined in parser/tokenizer.ts:147

    +

    Defined in parser/tokenizer.ts:147

    Parameters:

    @@ -393,7 +393,7 @@

    Returns: number


    readTopLevelToken

    readTopLevelToken(options: NormalizedFullOptions): TopLevelToken

    -

    Defined in parser/tokenizer.ts:117

    +

    Defined in parser/tokenizer.ts:117

    Parameters:

    @@ -410,7 +410,7 @@

    Returns: TopLevelToken


    readTopLevelTokens

    readTopLevelTokens(options: NormalizedFullOptions): TopLevelToken[]

    -

    Defined in parser/tokenizer.ts:107

    +

    Defined in parser/tokenizer.ts:107

    Parameters:

    @@ -429,23 +429,23 @@

    Returns: TopLevelToken[]


    readValue

    readValue(): ValueToken | undefined

    -

    Defined in parser/tokenizer.ts:264

    +

    Defined in parser/tokenizer.ts:264

    Returns: ValueToken | undefined


    readValueOrThrow

    readValueOrThrow(): ValueToken

    -

    Defined in parser/tokenizer.ts:316

    +

    Defined in parser/tokenizer.ts:316

    Returns: ValueToken


    readWord

    readWord(): IdentifierToken

    -

    Defined in parser/tokenizer.ts:207

    +

    Defined in parser/tokenizer.ts:207

    Returns: IdentifierToken


    remaining

    remaining(): string

    -

    Defined in parser/tokenizer.ts:244

    +

    Defined in parser/tokenizer.ts:244

    Returns: string


    rmatch

    rmatch(pattern: string): boolean

    -

    Defined in parser/tokenizer.ts:350

    +

    Defined in parser/tokenizer.ts:350

    Parameters:

    @@ -462,11 +462,11 @@

    Returns: boolean


    skipBlank

    skipBlank(): void

    -

    Defined in parser/tokenizer.ts:365

    +

    Defined in parser/tokenizer.ts:365

    Returns: void


    snapshot

    snapshot(begin: number): string

    -

    Defined in parser/tokenizer.ts:200

    +

    Defined in parser/tokenizer.ts:200

    Parameters:

    @@ -486,7 +486,7 @@
    - +
    @@ -495,7 +495,7 @@
    目录 -
    1. Hierarchy
    2. Constructors
      1. constructor
    3. Properties
      1. N
      2. Private file
      3. Private input
      4. p
      5. Private rawBeginAt
      6. Private trie
    4. Methods
      1. advance
      2. end
      3. match
      4. mkError
      5. peek
      6. peekType
      7. readEndrawOrRawContent
      8. readExpression
      9. readExpressionTokens
      10. readFileName
      11. readFilter
      12. readFilterArg
      13. readFilters
      14. readHTMLToken
      15. readHash
      16. readHashes
      17. readIdentifier
      18. readOperator
      19. readOutputToken
      20. readQuoted
      21. readRange
      22. readTagToken
      23. readTo
      24. readToDelimiter
      25. readTopLevelToken
      26. readTopLevelTokens
      27. readValue
      28. readValueOrThrow
      29. readWord
      30. remaining
      31. rmatch
      32. skipBlank
      33. snapshot
    +
    1. Hierarchy
    2. Constructors
      1. constructor
    3. Properties
      1. N
      2. Private file
      3. input
      4. p
      5. Private rawBeginAt
      6. Private trie
    4. Methods
      1. advance
      2. end
      3. match
      4. mkError
      5. peek
      6. peekType
      7. readEndrawOrRawContent
      8. readExpression
      9. readExpressionTokens
      10. readFileName
      11. readFilter
      12. readFilterArg
      13. readFilters
      14. readHTMLToken
      15. readHash
      16. readHashes
      17. readIdentifier
      18. readOperator
      19. readOutputToken
      20. readQuoted
      21. readRange
      22. readTagToken
      23. readTo
      24. readToDelimiter
      25. readTopLevelToken
      26. readTopLevelTokens
      27. readValue
      28. readValueOrThrow
      29. readWord
      30. remaining
      31. rmatch
      32. skipBlank
      33. snapshot
    回到顶部
    diff --git a/zh-cn/api/classes/render_expression_.expression.html b/zh-cn/api/classes/render_expression_.expression.html index 4c884bdda..8a402efe1 100644 --- a/zh-cn/api/classes/render_expression_.expression.html +++ b/zh-cn/api/classes/render_expression_.expression.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Expression

    -
    +
    @@ -95,7 +95,7 @@
  • Expression
  • Constructors

    constructor

    + new Expression(tokens: IterableIterator‹Token›): Expression

    -

    Defined in render/expression.ts:18

    +

    Defined in render/expression.ts:18

    Parameters:

    @@ -111,9 +111,9 @@

    Returns: Expression

    Properties

    Private postfix

    postfix: Token[]

    -

    Defined in render/expression.ts:18

    +

    Defined in render/expression.ts:18

    Methods

    evaluate

    evaluate(ctx: Context, lenient: boolean): any

    -

    Defined in render/expression.ts:23

    +

    Defined in render/expression.ts:23

    Parameters:

    @@ -135,7 +135,7 @@
    - +
    diff --git a/zh-cn/api/classes/render_render_.render.html b/zh-cn/api/classes/render_render_.render.html index 2035815bd..f1523e8b9 100644 --- a/zh-cn/api/classes/render_render_.render.html +++ b/zh-cn/api/classes/render_render_.render.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,15 +87,15 @@

    Class: Render

    -
    +

    Hierarchy

    • Render
    -

    Methods

    renderTemplates

    renderTemplates(templates: Template[], ctx: Context, emitter?: Emitter): IterableIterator‹any›

    -

    Defined in render/render.ts:7

    +

    Methods

    renderTemplates

    renderTemplates(templates: Template[], ctx: Context, emitter?: Emitter): IterableIterator‹any›

    +

    Defined in render/render.ts:16

    Parameters:

    @@ -114,14 +114,35 @@ - +
    emitter?EmitterEmitter

    Returns: IterableIterator‹any›

    +
    +

    renderTemplatesToNodeStream

    renderTemplatesToNodeStream(templates: Template[], ctx: Context): ReadableStream

    +

    Defined in render/render.ts:11

    +

    Parameters:

    + + + + + + + + + + + + + + + +
    NameType
    templatesTemplate[]
    ctxContext
    +

    Returns: ReadableStream

    - +
    @@ -130,7 +151,7 @@
    目录 -
    1. Hierarchy
    2. Methods
      1. renderTemplates
    +
    1. Hierarchy
    2. Methods
      1. renderTemplates
      2. renderTemplatesToNodeStream
    回到顶部
    diff --git a/zh-cn/api/classes/template_filter_filter_.filter.html b/zh-cn/api/classes/template_filter_filter_.filter.html index 7467af7bb..260864965 100644 --- a/zh-cn/api/classes/template_filter_filter_.filter.html +++ b/zh-cn/api/classes/template_filter_filter_.filter.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Filter

    -
    +
    @@ -95,7 +95,7 @@
  • Filter
  • Constructors

    constructor

    + new Filter(name: string, impl: FilterImplOptions, args: FilterArg[], liquid: Liquid): Filter

    -

    Defined in template/filter/filter.ts:12

    +

    Defined in template/filter/filter.ts:12

    Parameters:

    @@ -123,18 +123,18 @@

    Returns: Filter

    Properties

    args

    args: FilterArg[]

    -

    Defined in template/filter/filter.ts:10

    +

    Defined in template/filter/filter.ts:10


    Private impl

    impl: FilterImplOptions

    -

    Defined in template/filter/filter.ts:11

    +

    Defined in template/filter/filter.ts:11


    Private liquid

    liquid: Liquid

    -

    Defined in template/filter/filter.ts:12

    +

    Defined in template/filter/filter.ts:12


    name

    name: string

    -

    Defined in template/filter/filter.ts:9

    +

    Defined in template/filter/filter.ts:9

    Methods

    render

    render(value: any, context: Context): any

    -

    Defined in template/filter/filter.ts:20

    +

    Defined in template/filter/filter.ts:20

    Parameters:

    @@ -156,7 +156,7 @@
    - +
    diff --git a/zh-cn/api/classes/template_filter_filter_map_.filtermap.html b/zh-cn/api/classes/template_filter_filter_map_.filtermap.html index 143c0392f..b515b8613 100644 --- a/zh-cn/api/classes/template_filter_filter_map_.filtermap.html +++ b/zh-cn/api/classes/template_filter_filter_map_.filtermap.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: FilterMap

    -
    +
    @@ -95,7 +95,7 @@
  • FilterMap
  • Constructors

    constructor

    + new FilterMap(strictFilters: boolean, liquid: Liquid): FilterMap

    -

    Defined in template/filter/filter-map.ts:8

    +

    Defined in template/filter/filter-map.ts:8

    Parameters:

    @@ -115,18 +115,18 @@

    Returns: FilterMap

    Properties

    Private impls

    impls: object

    -

    Defined in template/filter/filter-map.ts:8

    +

    Defined in template/filter/filter-map.ts:8

    Type declaration:


    Private liquid

    liquid: Liquid

    -

    Defined in template/filter/filter-map.ts:12

    +

    Defined in template/filter/filter-map.ts:12


    Private strictFilters

    strictFilters: boolean

    -

    Defined in template/filter/filter-map.ts:11

    +

    Defined in template/filter/filter-map.ts:11

    Methods

    create

    create(name: string, args: FilterArg[]): Filter

    -

    Defined in template/filter/filter-map.ts:25

    +

    Defined in template/filter/filter-map.ts:25

    Parameters:

    @@ -147,7 +147,7 @@

    Returns: Filter


    get

    get(name: string): FilterImplOptions

    -

    Defined in template/filter/filter-map.ts:15

    +

    Defined in template/filter/filter-map.ts:15

    Parameters:

    @@ -164,7 +164,7 @@

    Returns: FilterImplOptions


    set

    set(name: string, impl: FilterImplOptions): void

    -

    Defined in template/filter/filter-map.ts:21

    +

    Defined in template/filter/filter-map.ts:21

    Parameters:

    @@ -186,7 +186,7 @@
    - +
    diff --git a/zh-cn/api/classes/template_html_.html.html b/zh-cn/api/classes/template_html_.html.html index f1ce56ab6..c538e86c1 100644 --- a/zh-cn/api/classes/template_html_.html.html +++ b/zh-cn/api/classes/template_html_.html.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: HTML

    -
    +
    @@ -101,7 +101,7 @@

    Constructors

    constructor

    + new HTML(token: HTMLToken): HTML

    Overrides TemplateImpl.constructor

    -

    Defined in template/html.ts:8

    +

    Defined in template/html.ts:8

    Parameters:

    @@ -117,15 +117,15 @@

    Returns: HTML

    Properties

    Private str

    str: string

    -

    Defined in template/html.ts:8

    +

    Defined in template/html.ts:8


    token

    token: HTMLToken

    Implementation of Template.token

    Inherited from TemplateImpl.token

    -

    Defined in template/template-impl.ts:2

    -

    Methods

    render

    render(ctx: Context, emitter: Emitter): IterableIterator‹void›

    +

    Defined in template/template-impl.ts:2

    +

    Methods

    render

    render(ctx: Context, emitter: Emitter): IterableIterator‹void›

    Implementation of Template

    -

    Defined in template/html.ts:13

    +

    Defined in template/html.ts:13

    Parameters:

    @@ -140,14 +140,14 @@ - +
    emitterEmitterEmitter

    Returns: IterableIterator‹void›

    diff --git a/zh-cn/api/classes/template_output_.output.html b/zh-cn/api/classes/template_output_.output.html index a4fcf462f..de41f1696 100644 --- a/zh-cn/api/classes/template_output_.output.html +++ b/zh-cn/api/classes/template_output_.output.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Output

    -
    +
    @@ -101,7 +101,7 @@

    Constructors

    constructor

    + new Output(token: OutputToken, liquid: Liquid): Output

    Overrides TemplateImpl.constructor

    -

    Defined in template/output.ts:10

    +

    Defined in template/output.ts:10

    Parameters:

    @@ -123,13 +123,13 @@

    Properties

    token

    token: OutputToken

    Implementation of Template.token

    Inherited from TemplateImpl.token

    -

    Defined in template/template-impl.ts:2

    +

    Defined in template/template-impl.ts:2


    Private value

    value: Value

    -

    Defined in template/output.ts:10

    -

    Methods

    render

    render(ctx: Context, emitter: Emitter): IterableIterator‹IterableIterator‹any››

    +

    Defined in template/output.ts:10

    +

    Methods

    render

    render(ctx: Context, emitter: Emitter): IterableIterator‹IterableIterator‹any››

    Implementation of Template

    -

    Defined in template/output.ts:15

    +

    Defined in template/output.ts:15

    Parameters:

    @@ -144,14 +144,14 @@ - +
    emitterEmitterEmitter

    Returns: IterableIterator‹IterableIterator‹any››

    diff --git a/zh-cn/api/classes/template_tag_hash_.hash.html b/zh-cn/api/classes/template_tag_hash_.hash.html index 6eb35c231..dc409c031 100644 --- a/zh-cn/api/classes/template_tag_hash_.hash.html +++ b/zh-cn/api/classes/template_tag_hash_.hash.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Hash

    -
    +
    @@ -95,7 +95,7 @@
  • Hash
  • Constructors

    constructor

    + new Hash(markup: string): Hash

    -

    Defined in template/tag/hash.ts:14

    +

    Defined in template/tag/hash.ts:14

    Parameters:

    @@ -111,12 +111,12 @@

    Returns: Hash

    Properties

    hash

    hash: object

    -

    Defined in template/tag/hash.ts:14

    +

    Defined in template/tag/hash.ts:14

    Type declaration:

    Methods

    render

    render(ctx: Context): IterableIterator‹any›

    -

    Defined in template/tag/hash.ts:21

    +

    Defined in template/tag/hash.ts:21

    Parameters:

    @@ -134,7 +134,7 @@
    - +
    diff --git a/zh-cn/api/classes/template_tag_tag_.tag.html b/zh-cn/api/classes/template_tag_tag_.tag.html index fe23f0bd5..ae00c5adf 100644 --- a/zh-cn/api/classes/template_tag_tag_.tag.html +++ b/zh-cn/api/classes/template_tag_tag_.tag.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Tag

    -
    +
    @@ -101,7 +101,7 @@

    Constructors

    constructor

    + new Tag(token: TagToken, tokens: TopLevelToken[], liquid: Liquid): Tag

    Overrides TemplateImpl.constructor

    -

    Defined in template/tag/tag.ts:9

    +

    Defined in template/tag/tag.ts:9

    Parameters:

    @@ -125,18 +125,18 @@

    Returns: Tag

    Properties

    Private impl

    impl: TagImpl

    -

    Defined in template/tag/tag.ts:9

    +

    Defined in template/tag/tag.ts:9


    name

    name: string

    -

    Defined in template/tag/tag.ts:8

    +

    Defined in template/tag/tag.ts:8


    token

    token: TagToken

    Implementation of Template.token

    Inherited from TemplateImpl.token

    -

    Defined in template/template-impl.ts:2

    -

    Methods

    render

    render(ctx: Context, emitter: Emitter): IterableIterator‹any›

    +

    Defined in template/template-impl.ts:2

    +

    Methods

    render

    render(ctx: Context, emitter: Emitter): IterableIterator‹any›

    Implementation of Template

    -

    Defined in template/tag/tag.ts:23

    +

    Defined in template/tag/tag.ts:23

    Parameters:

    @@ -151,14 +151,14 @@ - +
    emitterEmitterEmitter

    Returns: IterableIterator‹any›

    diff --git a/zh-cn/api/classes/template_tag_tag_map_.tagmap.html b/zh-cn/api/classes/template_tag_tag_map_.tagmap.html index 0d2bce52f..11260392f 100644 --- a/zh-cn/api/classes/template_tag_tag_map_.tagmap.html +++ b/zh-cn/api/classes/template_tag_tag_map_.tagmap.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: TagMap

    -
    +
    @@ -95,12 +95,12 @@
  • TagMap
  • Properties

    Private impls

    impls: object

    -

    Defined in template/tag/tag-map.ts:5

    +

    Defined in template/tag/tag-map.ts:5

    Type declaration:

    Methods

    get

    get(name: string): TagImplOptions

    -

    Defined in template/tag/tag-map.ts:7

    +

    Defined in template/tag/tag-map.ts:7

    Parameters:

    @@ -117,7 +117,7 @@

    Returns: TagImplOptions


    set

    set(name: string, impl: TagImplOptions): void

    -

    Defined in template/tag/tag-map.ts:13

    +

    Defined in template/tag/tag-map.ts:13

    Parameters:

    @@ -139,7 +139,7 @@
    - +
    diff --git a/zh-cn/api/classes/template_template_impl_.templateimpl.html b/zh-cn/api/classes/template_template_impl_.templateimpl.html index 5ebf5ff84..7b2f2da6f 100644 --- a/zh-cn/api/classes/template_template_impl_.templateimpl.html +++ b/zh-cn/api/classes/template_template_impl_.templateimpl.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: TemplateImpl <T>

    -
    +
    @@ -100,7 +100,7 @@

    Constructors

    constructor

    + new TemplateImpl(token: T): TemplateImpl

    -

    Defined in template/template-impl.ts:2

    +

    Defined in template/template-impl.ts:2

    Parameters:

    @@ -116,11 +116,11 @@

    Returns: TemplateImpl

    Properties

    token

    token: T

    -

    Defined in template/template-impl.ts:2

    +

    Defined in template/template-impl.ts:2

    diff --git a/zh-cn/api/classes/template_value_.value.html b/zh-cn/api/classes/template_value_.value.html index 5b8ad519c..8c3309dd1 100644 --- a/zh-cn/api/classes/template_value_.value.html +++ b/zh-cn/api/classes/template_value_.value.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Value

    -
    +
    @@ -95,7 +95,7 @@
  • Value
  • Constructors

    constructor

    + new Value(str: string, liquid: Liquid): Value

    -

    Defined in template/value.ts:9

    +

    Defined in template/value.ts:9

    Parameters:

    @@ -118,12 +118,12 @@

    Returns: Value

    Properties

    filters

    filters: Filter[] = []

    -

    Defined in template/value.ts:8

    +

    Defined in template/value.ts:8


    initial

    initial: Expression

    -

    Defined in template/value.ts:9

    +

    Defined in template/value.ts:9

    Methods

    value

    value(ctx: Context, lenient: boolean): IterableIterator‹any›

    -

    Defined in template/value.ts:19

    +

    Defined in template/value.ts:19

    Parameters:

    @@ -145,7 +145,7 @@
    - +
    diff --git a/zh-cn/api/classes/tokens_delimited_token_.delimitedtoken.html b/zh-cn/api/classes/tokens_delimited_token_.delimitedtoken.html index 77bed5655..dc5c320e3 100644 --- a/zh-cn/api/classes/tokens_delimited_token_.delimitedtoken.html +++ b/zh-cn/api/classes/tokens_delimited_token_.delimitedtoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: DelimitedToken

    -
    +
    @@ -100,7 +100,7 @@

    Constructors

    constructor

    + new DelimitedToken(kind: TokenKind, content: string, input: string, begin: number, end: number, trimLeft: boolean, trimRight: boolean, file?: undefined | string): DelimitedToken

    Overrides Token.constructor

    -

    Defined in tokens/delimited-token.ts:8

    +

    Defined in tokens/delimited-token.ts:8

    Parameters:

    @@ -145,50 +145,50 @@

    Returns: DelimitedToken

    Properties

    begin

    begin: number

    Inherited from Token.begin

    -

    Defined in tokens/token.ts:7

    +

    Defined in tokens/token.ts:7


    content

    content: string

    -

    Defined in tokens/delimited-token.ts:8

    +

    Defined in tokens/delimited-token.ts:8


    end

    end: number

    Inherited from Token.end

    -

    Defined in tokens/token.ts:8

    +

    Defined in tokens/token.ts:8


    Optional file

    file? : undefined | string

    Inherited from Token.file

    -

    Defined in tokens/token.ts:9

    +

    Defined in tokens/token.ts:9


    input

    input: string

    Inherited from Token.input

    -

    Defined in tokens/token.ts:6

    +

    Defined in tokens/token.ts:6


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5


    trimLeft

    trimLeft: boolean = false

    -

    Defined in tokens/delimited-token.ts:6

    +

    Defined in tokens/delimited-token.ts:6


    trimRight

    trimRight: boolean = false

    -

    Defined in tokens/delimited-token.ts:7

    +

    Defined in tokens/delimited-token.ts:7

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    diff --git a/zh-cn/api/classes/tokens_filter_token_.filtertoken.html b/zh-cn/api/classes/tokens_filter_token_.filtertoken.html index 7e9f942d9..6fecc1082 100644 --- a/zh-cn/api/classes/tokens_filter_token_.filtertoken.html +++ b/zh-cn/api/classes/tokens_filter_token_.filtertoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: FilterToken

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new FilterToken(name: string, args: FilterArg[], input: string, begin: number, end: number, file?: undefined | string): FilterToken

    Overrides Token.constructor

    -

    Defined in tokens/filter-token.ts:5

    +

    Defined in tokens/filter-token.ts:5

    Parameters:

    @@ -134,48 +134,48 @@

    Returns: FilterToken

    Properties

    args

    args: FilterArg[]

    -

    Defined in tokens/filter-token.ts:8

    +

    Defined in tokens/filter-token.ts:8


    begin

    begin: number

    Inherited from Token.begin

    -

    Defined in tokens/token.ts:7

    +

    Defined in tokens/token.ts:7


    end

    end: number

    Inherited from Token.end

    -

    Defined in tokens/token.ts:8

    +

    Defined in tokens/token.ts:8


    Optional file

    file? : undefined | string

    Inherited from Token.file

    -

    Defined in tokens/token.ts:9

    +

    Defined in tokens/token.ts:9


    input

    input: string

    Inherited from Token.input

    -

    Defined in tokens/token.ts:6

    +

    Defined in tokens/token.ts:6


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5


    name

    name: string

    -

    Defined in tokens/filter-token.ts:7

    +

    Defined in tokens/filter-token.ts:7

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    diff --git a/zh-cn/api/classes/tokens_hash_token_.hashtoken.html b/zh-cn/api/classes/tokens_hash_token_.hashtoken.html index 69cd8ec6f..0c0cd1ca8 100644 --- a/zh-cn/api/classes/tokens_hash_token_.hashtoken.html +++ b/zh-cn/api/classes/tokens_hash_token_.hashtoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: HashToken

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new HashToken(input: string, begin: number, end: number, name: IdentifierToken, value?: ValueToken, file?: undefined | string): HashToken

    Overrides Token.constructor

    -

    Defined in tokens/hash-token.ts:6

    +

    Defined in tokens/hash-token.ts:6

    Parameters:

    @@ -135,47 +135,47 @@

    Returns: HashToken

    Properties

    begin

    begin: number

    Overrides Token.begin

    -

    Defined in tokens/hash-token.ts:9

    +

    Defined in tokens/hash-token.ts:9


    end

    end: number

    Overrides Token.end

    -

    Defined in tokens/hash-token.ts:10

    +

    Defined in tokens/hash-token.ts:10


    Optional file

    file? : undefined | string

    Overrides Token.file

    -

    Defined in tokens/hash-token.ts:13

    +

    Defined in tokens/hash-token.ts:13


    input

    input: string

    Overrides Token.input

    -

    Defined in tokens/hash-token.ts:8

    +

    Defined in tokens/hash-token.ts:8


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5


    name

    name: IdentifierToken

    -

    Defined in tokens/hash-token.ts:11

    +

    Defined in tokens/hash-token.ts:11


    Optional value

    value? : ValueToken

    -

    Defined in tokens/hash-token.ts:12

    +

    Defined in tokens/hash-token.ts:12

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    diff --git a/zh-cn/api/classes/tokens_html_token_.htmltoken.html b/zh-cn/api/classes/tokens_html_token_.htmltoken.html index e314d233b..c3c47d820 100644 --- a/zh-cn/api/classes/tokens_html_token_.htmltoken.html +++ b/zh-cn/api/classes/tokens_html_token_.htmltoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: HTMLToken

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new HTMLToken(input: string, begin: number, end: number, file?: undefined | string): HTMLToken

    Overrides Token.constructor

    -

    Defined in tokens/html-token.ts:6

    +

    Defined in tokens/html-token.ts:6

    Parameters:

    @@ -127,51 +127,51 @@

    Returns: HTMLToken

    Properties

    begin

    begin: number

    Overrides Token.begin

    -

    Defined in tokens/html-token.ts:9

    +

    Defined in tokens/html-token.ts:9


    end

    end: number

    Overrides Token.end

    -

    Defined in tokens/html-token.ts:10

    +

    Defined in tokens/html-token.ts:10


    Optional file

    file? : undefined | string

    Overrides Token.file

    -

    Defined in tokens/html-token.ts:11

    +

    Defined in tokens/html-token.ts:11


    input

    input: string

    Overrides Token.input

    -

    Defined in tokens/html-token.ts:8

    +

    Defined in tokens/html-token.ts:8


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5


    trimLeft

    trimLeft: number = 0

    -

    Defined in tokens/html-token.ts:5

    +

    Defined in tokens/html-token.ts:5


    trimRight

    trimRight: number = 0

    -

    Defined in tokens/html-token.ts:6

    +

    Defined in tokens/html-token.ts:6

    Methods

    getContent

    getContent(): string

    -

    Defined in tokens/html-token.ts:15

    +

    Defined in tokens/html-token.ts:15

    Returns: string


    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    diff --git a/zh-cn/api/classes/tokens_identifier_token_.identifiertoken.html b/zh-cn/api/classes/tokens_identifier_token_.identifiertoken.html index 1d191bf8e..db3bc8eb2 100644 --- a/zh-cn/api/classes/tokens_identifier_token_.identifiertoken.html +++ b/zh-cn/api/classes/tokens_identifier_token_.identifiertoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: IdentifierToken

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new IdentifierToken(input: string, begin: number, end: number, file?: undefined | string): IdentifierToken

    Overrides Token.constructor

    -

    Defined in tokens/identifier-token.ts:6

    +

    Defined in tokens/identifier-token.ts:6

    Parameters:

    @@ -127,38 +127,38 @@

    Returns: IdentifierToken

    Properties

    begin

    begin: number

    Overrides Token.begin

    -

    Defined in tokens/identifier-token.ts:9

    +

    Defined in tokens/identifier-token.ts:9


    content

    content: string

    -

    Defined in tokens/identifier-token.ts:6

    +

    Defined in tokens/identifier-token.ts:6


    end

    end: number

    Overrides Token.end

    -

    Defined in tokens/identifier-token.ts:10

    +

    Defined in tokens/identifier-token.ts:10


    Optional file

    file? : undefined | string

    Overrides Token.file

    -

    Defined in tokens/identifier-token.ts:11

    +

    Defined in tokens/identifier-token.ts:11


    input

    input: string

    Overrides Token.input

    -

    Defined in tokens/identifier-token.ts:8

    +

    Defined in tokens/identifier-token.ts:8


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    isNumber

    isNumber(allowSign: boolean): boolean

    -

    Defined in tokens/identifier-token.ts:16

    +

    Defined in tokens/identifier-token.ts:16

    Parameters:

    @@ -178,12 +178,12 @@

    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    diff --git a/zh-cn/api/classes/tokens_literal_token_.literaltoken.html b/zh-cn/api/classes/tokens_literal_token_.literaltoken.html index 04e913121..767ccdaa0 100644 --- a/zh-cn/api/classes/tokens_literal_token_.literaltoken.html +++ b/zh-cn/api/classes/tokens_literal_token_.literaltoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: LiteralToken

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new LiteralToken(input: string, begin: number, end: number, file?: undefined | string): LiteralToken

    Overrides Token.constructor

    -

    Defined in tokens/literal-token.ts:5

    +

    Defined in tokens/literal-token.ts:5

    Parameters:

    @@ -127,44 +127,44 @@

    Returns: LiteralToken

    Properties

    begin

    begin: number

    Overrides Token.begin

    -

    Defined in tokens/literal-token.ts:8

    +

    Defined in tokens/literal-token.ts:8


    end

    end: number

    Overrides Token.end

    -

    Defined in tokens/literal-token.ts:9

    +

    Defined in tokens/literal-token.ts:9


    Optional file

    file? : undefined | string

    Overrides Token.file

    -

    Defined in tokens/literal-token.ts:10

    +

    Defined in tokens/literal-token.ts:10


    input

    input: string

    Overrides Token.input

    -

    Defined in tokens/literal-token.ts:7

    +

    Defined in tokens/literal-token.ts:7


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5


    literal

    literal: string

    -

    Defined in tokens/literal-token.ts:5

    +

    Defined in tokens/literal-token.ts:5

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    diff --git a/zh-cn/api/classes/tokens_number_token_.numbertoken.html b/zh-cn/api/classes/tokens_number_token_.numbertoken.html index f0df77bd7..e9a5a4d03 100644 --- a/zh-cn/api/classes/tokens_number_token_.numbertoken.html +++ b/zh-cn/api/classes/tokens_number_token_.numbertoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: NumberToken

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new NumberToken(whole: IdentifierToken, decimal?: IdentifierToken): NumberToken

    Overrides Token.constructor

    -

    Defined in tokens/number-token.ts:5

    +

    Defined in tokens/number-token.ts:5

    Parameters:

    @@ -119,47 +119,47 @@

    Returns: NumberToken

    Properties

    begin

    begin: number

    Inherited from Token.begin

    -

    Defined in tokens/token.ts:7

    +

    Defined in tokens/token.ts:7


    Optional decimal

    decimal? : IdentifierToken

    -

    Defined in tokens/number-token.ts:8

    +

    Defined in tokens/number-token.ts:8


    end

    end: number

    Inherited from Token.end

    -

    Defined in tokens/token.ts:8

    +

    Defined in tokens/token.ts:8


    Optional file

    file? : undefined | string

    Inherited from Token.file

    -

    Defined in tokens/token.ts:9

    +

    Defined in tokens/token.ts:9


    input

    input: string

    Inherited from Token.input

    -

    Defined in tokens/token.ts:6

    +

    Defined in tokens/token.ts:6


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5


    whole

    whole: IdentifierToken

    -

    Defined in tokens/number-token.ts:7

    +

    Defined in tokens/number-token.ts:7

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    diff --git a/zh-cn/api/classes/tokens_operator_token_.operatortoken.html b/zh-cn/api/classes/tokens_operator_token_.operatortoken.html index 2b72188f3..e5b635353 100644 --- a/zh-cn/api/classes/tokens_operator_token_.operatortoken.html +++ b/zh-cn/api/classes/tokens_operator_token_.operatortoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: OperatorToken

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new OperatorToken(input: string, begin: number, end: number, file?: undefined | string): OperatorToken

    Overrides Token.constructor

    -

    Defined in tokens/operator-token.ts:17

    +

    Defined in tokens/operator-token.ts:17

    Parameters:

    @@ -127,48 +127,48 @@

    Returns: OperatorToken

    Properties

    begin

    begin: number

    Overrides Token.begin

    -

    Defined in tokens/operator-token.ts:20

    +

    Defined in tokens/operator-token.ts:20


    end

    end: number

    Overrides Token.end

    -

    Defined in tokens/operator-token.ts:21

    +

    Defined in tokens/operator-token.ts:21


    Optional file

    file? : undefined | string

    Overrides Token.file

    -

    Defined in tokens/operator-token.ts:22

    +

    Defined in tokens/operator-token.ts:22


    input

    input: string

    Overrides Token.input

    -

    Defined in tokens/operator-token.ts:19

    +

    Defined in tokens/operator-token.ts:19


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5


    operator

    operator: string

    -

    Defined in tokens/operator-token.ts:17

    +

    Defined in tokens/operator-token.ts:17

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getPrecedence

    getPrecedence(): any

    -

    Defined in tokens/operator-token.ts:27

    +

    Defined in tokens/operator-token.ts:27

    Returns: any


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    diff --git a/zh-cn/api/classes/tokens_output_token_.outputtoken.html b/zh-cn/api/classes/tokens_output_token_.outputtoken.html index 2ab6c9670..b725f5bca 100644 --- a/zh-cn/api/classes/tokens_output_token_.outputtoken.html +++ b/zh-cn/api/classes/tokens_output_token_.outputtoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: OutputToken

    -
    +
    @@ -95,7 +95,7 @@

    OutputToken

    Constructors

    constructor

    + new OutputToken(input: string, begin: number, end: number, options: NormalizedFullOptions, file?: undefined | string): OutputToken

    Overrides DelimitedToken.constructor

    -

    Defined in tokens/output-token.ts:5

    +

    Defined in tokens/output-token.ts:5

    Parameters:

    @@ -128,53 +128,53 @@

    Returns: OutputToken

    Properties

    begin

    begin: number

    Inherited from Token.begin

    -

    Defined in tokens/token.ts:7

    +

    Defined in tokens/token.ts:7


    content

    content: string

    Inherited from DelimitedToken.content

    -

    Defined in tokens/delimited-token.ts:8

    +

    Defined in tokens/delimited-token.ts:8


    end

    end: number

    Inherited from Token.end

    -

    Defined in tokens/token.ts:8

    +

    Defined in tokens/token.ts:8


    Optional file

    file? : undefined | string

    Inherited from Token.file

    -

    Defined in tokens/token.ts:9

    +

    Defined in tokens/token.ts:9


    input

    input: string

    Inherited from Token.input

    -

    Defined in tokens/token.ts:6

    +

    Defined in tokens/token.ts:6


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5


    trimLeft

    trimLeft: boolean = false

    Inherited from DelimitedToken.trimLeft

    -

    Defined in tokens/delimited-token.ts:6

    +

    Defined in tokens/delimited-token.ts:6


    trimRight

    trimRight: boolean = false

    Inherited from DelimitedToken.trimRight

    -

    Defined in tokens/delimited-token.ts:7

    +

    Defined in tokens/delimited-token.ts:7

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    diff --git a/zh-cn/api/classes/tokens_property_access_token_.propertyaccesstoken.html b/zh-cn/api/classes/tokens_property_access_token_.propertyaccesstoken.html index 076f631b4..80c338d08 100644 --- a/zh-cn/api/classes/tokens_property_access_token_.propertyaccesstoken.html +++ b/zh-cn/api/classes/tokens_property_access_token_.propertyaccesstoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: PropertyAccessToken

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new PropertyAccessToken(variable: IdentifierToken | QuotedToken, props: IdentifierToken | QuotedToken | PropertyAccessToken[], end: number): PropertyAccessToken

    Overrides Token.constructor

    -

    Defined in tokens/property-access-token.ts:7

    +

    Defined in tokens/property-access-token.ts:8

    Parameters:

    @@ -123,51 +123,50 @@

    Returns: PropertyAccessToken

    Properties

    begin

    begin: number

    Inherited from Token.begin

    -

    Defined in tokens/token.ts:7

    +

    Defined in tokens/token.ts:7


    end

    end: number

    Inherited from Token.end

    -

    Defined in tokens/token.ts:8

    +

    Defined in tokens/token.ts:8


    Optional file

    file? : undefined | string

    Inherited from Token.file

    -

    Defined in tokens/token.ts:9

    +

    Defined in tokens/token.ts:9


    input

    input: string

    Inherited from Token.input

    -

    Defined in tokens/token.ts:6

    +

    Defined in tokens/token.ts:6


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5

    +
    +

    propertyName

    propertyName: string

    +

    Defined in tokens/property-access-token.ts:8


    props

    props: IdentifierToken | QuotedToken | PropertyAccessToken[]

    -

    Defined in tokens/property-access-token.ts:10

    +

    Defined in tokens/property-access-token.ts:11


    variable

    variable: IdentifierToken | QuotedToken

    -

    Defined in tokens/property-access-token.ts:9

    +

    Defined in tokens/property-access-token.ts:10

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    -

    Returns: string

    -
    -

    getVariableAsText

    getVariableAsText(): string

    -

    Defined in tokens/property-access-token.ts:16

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    @@ -176,7 +175,7 @@
    目录 -
    1. Hierarchy
    2. Constructors
      1. constructor
    3. Properties
      1. begin
      2. end
      3. Optional file
      4. input
      5. kind
      6. props
      7. variable
    4. Methods
      1. getPosition
      2. getText
      3. getVariableAsText
      4. size
    +
    1. Hierarchy
    2. Constructors
      1. constructor
    3. Properties
      1. begin
      2. end
      3. Optional file
      4. input
      5. kind
      6. propertyName
      7. props
      8. variable
    4. Methods
      1. getPosition
      2. getText
      3. size
    回到顶部
    diff --git a/zh-cn/api/classes/tokens_quoted_token_.quotedtoken.html b/zh-cn/api/classes/tokens_quoted_token_.quotedtoken.html index f817cf600..341d498c9 100644 --- a/zh-cn/api/classes/tokens_quoted_token_.quotedtoken.html +++ b/zh-cn/api/classes/tokens_quoted_token_.quotedtoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: QuotedToken

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new QuotedToken(input: string, begin: number, end: number, file?: undefined | string): QuotedToken

    Overrides Token.constructor

    -

    Defined in tokens/quoted-token.ts:4

    +

    Defined in tokens/quoted-token.ts:4

    Parameters:

    @@ -127,41 +127,41 @@

    Returns: QuotedToken

    Properties

    begin

    begin: number

    Overrides Token.begin

    -

    Defined in tokens/quoted-token.ts:7

    +

    Defined in tokens/quoted-token.ts:7


    end

    end: number

    Overrides Token.end

    -

    Defined in tokens/quoted-token.ts:8

    +

    Defined in tokens/quoted-token.ts:8


    Optional file

    file? : undefined | string

    Overrides Token.file

    -

    Defined in tokens/quoted-token.ts:9

    +

    Defined in tokens/quoted-token.ts:9


    input

    input: string

    Overrides Token.input

    -

    Defined in tokens/quoted-token.ts:6

    +

    Defined in tokens/quoted-token.ts:6


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    diff --git a/zh-cn/api/classes/tokens_range_token_.rangetoken.html b/zh-cn/api/classes/tokens_range_token_.rangetoken.html index e0cc59a5c..2de4210e8 100644 --- a/zh-cn/api/classes/tokens_range_token_.rangetoken.html +++ b/zh-cn/api/classes/tokens_range_token_.rangetoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: RangeToken

    -
    +
    @@ -98,7 +98,7 @@

    Constructors

    constructor

    + new RangeToken(input: string, begin: number, end: number, lhs: ValueToken, rhs: ValueToken, file?: undefined | string): RangeToken

    Overrides Token.constructor

    -

    Defined in tokens/range-token.ts:5

    +

    Defined in tokens/range-token.ts:5

    Parameters:

    @@ -135,47 +135,47 @@

    Returns: RangeToken

    Properties

    begin

    begin: number

    Overrides Token.begin

    -

    Defined in tokens/range-token.ts:8

    +

    Defined in tokens/range-token.ts:8


    end

    end: number

    Overrides Token.end

    -

    Defined in tokens/range-token.ts:9

    +

    Defined in tokens/range-token.ts:9


    Optional file

    file? : undefined | string

    Overrides Token.file

    -

    Defined in tokens/range-token.ts:12

    +

    Defined in tokens/range-token.ts:12


    input

    input: string

    Overrides Token.input

    -

    Defined in tokens/range-token.ts:7

    +

    Defined in tokens/range-token.ts:7


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5


    lhs

    lhs: ValueToken

    -

    Defined in tokens/range-token.ts:10

    +

    Defined in tokens/range-token.ts:10


    rhs

    rhs: ValueToken

    -

    Defined in tokens/range-token.ts:11

    +

    Defined in tokens/range-token.ts:11

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    - +
    diff --git a/zh-cn/api/classes/tokens_tag_token_.tagtoken.html b/zh-cn/api/classes/tokens_tag_token_.tagtoken.html index fdd2ccd81..9dec706d7 100644 --- a/zh-cn/api/classes/tokens_tag_token_.tagtoken.html +++ b/zh-cn/api/classes/tokens_tag_token_.tagtoken.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: TagToken

    -
    +
    @@ -95,7 +95,7 @@

    TagToken

    Constructors

    constructor

    + new TagToken(input: string, begin: number, end: number, options: NormalizedFullOptions, file?: undefined | string): TagToken

    Overrides DelimitedToken.constructor

    -

    Defined in tokens/tag-token.ts:9

    +

    Defined in tokens/tag-token.ts:9

    Parameters:

    @@ -127,60 +127,60 @@

    Returns: TagToken

    Properties

    args

    args: string

    -

    Defined in tokens/tag-token.ts:9

    +

    Defined in tokens/tag-token.ts:9


    begin

    begin: number

    Inherited from Token.begin

    -

    Defined in tokens/token.ts:7

    +

    Defined in tokens/token.ts:7


    content

    content: string

    Inherited from DelimitedToken.content

    -

    Defined in tokens/delimited-token.ts:8

    +

    Defined in tokens/delimited-token.ts:8


    end

    end: number

    Inherited from Token.end

    -

    Defined in tokens/token.ts:8

    +

    Defined in tokens/token.ts:8


    Optional file

    file? : undefined | string

    Inherited from Token.file

    -

    Defined in tokens/token.ts:9

    +

    Defined in tokens/token.ts:9


    input

    input: string

    Inherited from Token.input

    -

    Defined in tokens/token.ts:6

    +

    Defined in tokens/token.ts:6


    kind

    kind: TokenKind

    Inherited from Token.kind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5


    name

    name: string

    -

    Defined in tokens/tag-token.ts:8

    +

    Defined in tokens/tag-token.ts:8


    trimLeft

    trimLeft: boolean = false

    Inherited from DelimitedToken.trimLeft

    -

    Defined in tokens/delimited-token.ts:6

    +

    Defined in tokens/delimited-token.ts:6


    trimRight

    trimRight: boolean = false

    Inherited from DelimitedToken.trimRight

    -

    Defined in tokens/delimited-token.ts:7

    +

    Defined in tokens/delimited-token.ts:7

    Methods

    getPosition

    getPosition(): number[]

    Inherited from Token.getPosition

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    Inherited from Token.getText

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    Inherited from Token.size

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    diff --git a/zh-cn/api/classes/tokens_token_.token.html b/zh-cn/api/classes/tokens_token_.token.html index 680b3db2d..46754d755 100644 --- a/zh-cn/api/classes/tokens_token_.token.html +++ b/zh-cn/api/classes/tokens_token_.token.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: Token

    -
    +
    @@ -107,7 +107,7 @@

    Constructors

    constructor

    + new Token(kind: TokenKind, input: string, begin: number, end: number, file?: undefined | string): Token

    -

    Defined in tokens/token.ts:3

    +

    Defined in tokens/token.ts:3

    Parameters:

    @@ -139,34 +139,34 @@

    Returns: Token

    Properties

    begin

    begin: number

    -

    Defined in tokens/token.ts:7

    +

    Defined in tokens/token.ts:7


    end

    end: number

    -

    Defined in tokens/token.ts:8

    +

    Defined in tokens/token.ts:8


    Optional file

    file? : undefined | string

    -

    Defined in tokens/token.ts:9

    +

    Defined in tokens/token.ts:9


    input

    input: string

    -

    Defined in tokens/token.ts:6

    +

    Defined in tokens/token.ts:6


    kind

    kind: TokenKind

    -

    Defined in tokens/token.ts:5

    +

    Defined in tokens/token.ts:5

    Methods

    getPosition

    getPosition(): number[]

    -

    Defined in tokens/token.ts:14

    +

    Defined in tokens/token.ts:14

    Returns: number[]


    getText

    getText(): string

    -

    Defined in tokens/token.ts:11

    +

    Defined in tokens/token.ts:11

    Returns: string


    size

    size(): number

    -

    Defined in tokens/token.ts:24

    +

    Defined in tokens/token.ts:24

    Returns: number

    diff --git a/zh-cn/api/classes/util_error_.assertionerror.html b/zh-cn/api/classes/util_error_.assertionerror.html index 234b2a27a..38c34c0a3 100644 --- a/zh-cn/api/classes/util_error_.assertionerror.html +++ b/zh-cn/api/classes/util_error_.assertionerror.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: AssertionError

    -
    +
    @@ -97,7 +97,7 @@

    Constructors

    constructor

    + new AssertionError(message: string): AssertionError

    -

    Defined in util/error.ts:74

    +

    Defined in util/error.ts:74

    Parameters:

    @@ -130,7 +130,7 @@
    - +
    diff --git a/zh-cn/api/classes/util_error_.internalundefinedvariableerror.html b/zh-cn/api/classes/util_error_.internalundefinedvariableerror.html index 058ca9939..40f2ff9e5 100644 --- a/zh-cn/api/classes/util_error_.internalundefinedvariableerror.html +++ b/zh-cn/api/classes/util_error_.internalundefinedvariableerror.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: InternalUndefinedVariableError

    -
    +
    @@ -97,7 +97,7 @@

    Constructors

    constructor

    + new InternalUndefinedVariableError(variableName: string): InternalUndefinedVariableError

    -

    Defined in util/error.ts:65

    +

    Defined in util/error.ts:65

    Parameters:

    @@ -126,14 +126,14 @@

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:975


    variableName

    variableName: string

    -

    Defined in util/error.ts:65

    +

    Defined in util/error.ts:65


    Static Error

    Error: ErrorConstructor

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:984

    - +
    diff --git a/zh-cn/api/classes/util_error_.liquiderror.html b/zh-cn/api/classes/util_error_.liquiderror.html index c0be31eff..61a1080b2 100644 --- a/zh-cn/api/classes/util_error_.liquiderror.html +++ b/zh-cn/api/classes/util_error_.liquiderror.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: LiquidError

    -
    +
    @@ -101,7 +101,7 @@

    Constructors

    constructor

    + new LiquidError(err: Error, token: Token): LiquidError

    -

    Defined in util/error.ts:8

    +

    Defined in util/error.ts:8

    Parameters:

    @@ -121,7 +121,7 @@

    Returns: LiquidError

    Properties

    context

    context: string

    -

    Defined in util/error.ts:7

    +

    Defined in util/error.ts:7


    message

    message: string

    Inherited from void

    @@ -132,7 +132,7 @@

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:973


    Private originalError

    originalError: Error

    -

    Defined in util/error.ts:8

    +

    Defined in util/error.ts:8


    Optional stack

    stack? : undefined | string

    Inherited from void

    @@ -140,17 +140,17 @@

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:975


    Private token

    token: Token

    -

    Defined in util/error.ts:6

    +

    Defined in util/error.ts:6


    Static Error

    Error: ErrorConstructor

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:984

    Methods

    Protected update

    update(): void

    -

    Defined in util/error.ts:15

    +

    Defined in util/error.ts:15

    Returns: void

    diff --git a/zh-cn/api/classes/util_error_.parseerror.html b/zh-cn/api/classes/util_error_.parseerror.html index 70a04c18b..fba5de457 100644 --- a/zh-cn/api/classes/util_error_.parseerror.html +++ b/zh-cn/api/classes/util_error_.parseerror.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: ParseError

    -
    +
    @@ -95,7 +95,7 @@

    ParseError

    Constructors

    constructor

    + new ParseError(err: Error, token: Token): ParseError

    Overrides LiquidError.constructor

    -

    Defined in util/error.ts:32

    +

    Defined in util/error.ts:32

    Parameters:

    @@ -116,7 +116,7 @@

    Returns: ParseError

    Properties

    context

    context: string

    Inherited from LiquidError.context

    -

    Defined in util/error.ts:7

    +

    Defined in util/error.ts:7


    message

    message: string

    Inherited from void

    @@ -132,12 +132,12 @@

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:975

    Methods

    Protected update

    update(): void

    Inherited from LiquidError.update

    -

    Defined in util/error.ts:15

    +

    Defined in util/error.ts:15

    Returns: void

    - +
    diff --git a/zh-cn/api/classes/util_error_.rendererror.html b/zh-cn/api/classes/util_error_.rendererror.html index a8d251dc6..6be1f2cea 100644 --- a/zh-cn/api/classes/util_error_.rendererror.html +++ b/zh-cn/api/classes/util_error_.rendererror.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: RenderError

    -
    +
    @@ -95,7 +95,7 @@

    RenderError

    Constructors

    constructor

    + new RenderError(err: Error, tpl: Template): RenderError

    Overrides LiquidError.constructor

    -

    Defined in util/error.ts:41

    +

    Defined in util/error.ts:41

    Parameters:

    @@ -116,7 +116,7 @@

    Returns: RenderError

    Properties

    context

    context: string

    Inherited from LiquidError.context

    -

    Defined in util/error.ts:7

    +

    Defined in util/error.ts:7


    message

    message: string

    Inherited from void

    @@ -132,11 +132,11 @@

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:975

    Methods

    Protected update

    update(): void

    Inherited from LiquidError.update

    -

    Defined in util/error.ts:15

    +

    Defined in util/error.ts:15

    Returns: void


    Static is

    is(obj: any): boolean

    -

    Defined in util/error.ts:48

    +

    Defined in util/error.ts:48

    Parameters:

    @@ -154,7 +154,7 @@
    - +
    diff --git a/zh-cn/api/classes/util_error_.tokenizationerror.html b/zh-cn/api/classes/util_error_.tokenizationerror.html index 3f3d90910..249951d35 100644 --- a/zh-cn/api/classes/util_error_.tokenizationerror.html +++ b/zh-cn/api/classes/util_error_.tokenizationerror.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: TokenizationError

    -
    +
    @@ -95,7 +95,7 @@

    TokenizationError

    Constructors

    constructor

    + new TokenizationError(message: string, token: Token): TokenizationError

    Overrides LiquidError.constructor

    -

    Defined in util/error.ts:24

    +

    Defined in util/error.ts:24

    Parameters:

    @@ -116,7 +116,7 @@

    Returns: TokenizationError

    Properties

    context

    context: string

    Inherited from LiquidError.context

    -

    Defined in util/error.ts:7

    +

    Defined in util/error.ts:7


    message

    message: string

    Inherited from void

    @@ -132,12 +132,12 @@

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:975

    Methods

    Protected update

    update(): void

    Inherited from LiquidError.update

    -

    Defined in util/error.ts:15

    +

    Defined in util/error.ts:15

    Returns: void

    - +
    diff --git a/zh-cn/api/classes/util_error_.undefinedvariableerror.html b/zh-cn/api/classes/util_error_.undefinedvariableerror.html index b2c0ffea6..4120d796f 100644 --- a/zh-cn/api/classes/util_error_.undefinedvariableerror.html +++ b/zh-cn/api/classes/util_error_.undefinedvariableerror.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Class: UndefinedVariableError

    -
    +
    @@ -95,7 +95,7 @@

    UndefinedVariableError

    Constructors

    constructor

    + new UndefinedVariableError(err: Error, token: Token): UndefinedVariableError

    Overrides LiquidError.constructor

    -

    Defined in util/error.ts:53

    +

    Defined in util/error.ts:53

    Parameters:

    @@ -116,7 +116,7 @@

    Returns: UndefinedVariableError

    Properties

    context

    context: string

    Inherited from LiquidError.context

    -

    Defined in util/error.ts:7

    +

    Defined in util/error.ts:7


    message

    message: string

    Inherited from void

    @@ -132,12 +132,12 @@

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:975

    Methods

    Protected update

    update(): void

    Inherited from LiquidError.update

    -

    Defined in util/error.ts:15

    +

    Defined in util/error.ts:15

    Returns: void

    - +
    diff --git a/zh-cn/api/classes/util_strftime_.timezonedate.html b/zh-cn/api/classes/util_strftime_.timezonedate.html deleted file mode 100644 index 5b54cfa29..000000000 --- a/zh-cn/api/classes/util_strftime_.timezonedate.html +++ /dev/null @@ -1,829 +0,0 @@ - - - - - Class: TimezoneDate | LiquidJS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - -
    NameType
    dateStringstring
    -

    Returns: TimezoneDate

    -

    Properties

    ISO8601_TIMEZONE_PATTERN

    ISO8601_TIMEZONE_PATTERN: RegExp = /([zZ]|([+-])(\d{2}):(\d{2}))$/

    -

    Defined in util/strftime.ts:178

    -
    -

    dateString

    dateString: string

    -

    Defined in util/strftime.ts:182

    -
    -

    inputTimezoneOffset

    inputTimezoneOffset: number = 0

    -

    Defined in util/strftime.ts:180

    -
    -

    Static Date

    Date: DateConstructor

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:907

    -

    Methods

    __@toPrimitive

    __@toPrimitive(hint: “default”): string

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:109

    -

    Parameters:

    - - - - - - - - - - - -
    NameType
    hint“default”
    -

    Returns: string

    -

    __@toPrimitive(hint: “string”): string

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:113

    -

    Parameters:

    - - - - - - - - - - - -
    NameType
    hint“string”
    -

    Returns: string

    -

    __@toPrimitive(hint: “number”): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:117

    -

    Parameters:

    - - - - - - - - - - - -
    NameType
    hint“number”
    -

    Returns: number

    -

    __@toPrimitive(hint: string): string | number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:126

    -

    Parameters:

    - - - - - - - - - - - - - -
    NameTypeDescription
    hintstringThe strings “number”, “string”, or “default” to specify what primitive to return.
    -

    Returns: string | number

    -

    A number if ‘hint’ was “number”, a string if ‘hint’ was “string” or “default”.

    -
    -

    getDate

    getDate(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:755

    -

    Returns: number

    -
    -

    getDay

    getDay(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:759

    -

    Returns: number

    -
    -

    getDisplayDate

    getDisplayDate(): Date

    -

    Defined in util/strftime.ts:194

    -

    Returns: Date

    -
    -

    getFullYear

    getFullYear(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:747

    -

    Returns: number

    -
    -

    getHours

    getHours(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:763

    -

    Returns: number

    -
    -

    getMilliseconds

    getMilliseconds(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:775

    -

    Returns: number

    -
    -

    getMinutes

    getMinutes(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:767

    -

    Returns: number

    -
    -

    getMonth

    getMonth(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:751

    -

    Returns: number

    -
    -

    getSeconds

    getSeconds(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:771

    -

    Returns: number

    -
    -

    getTime

    getTime(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:745

    -

    Returns: number

    -
    -

    getTimezoneOffset

    getTimezoneOffset(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:779

    -

    Returns: number

    -
    -

    getUTCDate

    getUTCDate(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:757

    -

    Returns: number

    -
    -

    getUTCDay

    getUTCDay(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:761

    -

    Returns: number

    -
    -

    getUTCFullYear

    getUTCFullYear(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:749

    -

    Returns: number

    -
    -

    getUTCHours

    getUTCHours(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:765

    -

    Returns: number

    -
    -

    getUTCMilliseconds

    getUTCMilliseconds(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:777

    -

    Returns: number

    -
    -

    getUTCMinutes

    getUTCMinutes(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:769

    -

    Returns: number

    -
    -

    getUTCMonth

    getUTCMonth(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:753

    -

    Returns: number

    -
    -

    getUTCSeconds

    getUTCSeconds(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:773

    -

    Returns: number

    -
    -

    setDate

    setDate(date: number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:842

    -

    Parameters:

    - - - - - - - - - - - - - -
    NameTypeDescription
    datenumberA numeric value equal to the day of the month.
    -

    Returns: number

    -
    -

    setFullYear

    setFullYear(year: number, month?: undefined | number, date?: undefined | number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:866

    -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    yearnumberA numeric value for the year.
    month?undefined | numberA zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
    date?undefined | numberA numeric value equal for the day of the month.
    -

    Returns: number

    -
    -

    setHours

    setHours(hours: number, min?: undefined | number, sec?: undefined | number, ms?: undefined | number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:829

    -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    hoursnumberA numeric value equal to the hours value.
    min?undefined | numberA numeric value equal to the minutes value.
    sec?undefined | numberA numeric value equal to the seconds value.
    ms?undefined | numberA numeric value equal to the milliseconds value.
    -

    Returns: number

    -
    -

    setMilliseconds

    setMilliseconds(ms: number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:789

    -

    Parameters:

    - - - - - - - - - - - - - -
    NameTypeDescription
    msnumberA numeric value equal to the millisecond value.
    -

    Returns: number

    -
    -

    setMinutes

    setMinutes(min: number, sec?: undefined | number, ms?: undefined | number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:814

    -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    minnumberA numeric value equal to the minutes value.
    sec?undefined | numberA numeric value equal to the seconds value.
    ms?undefined | numberA numeric value equal to the milliseconds value.
    -

    Returns: number

    -
    -

    setMonth

    setMonth(month: number, date?: undefined | number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:853

    -

    Parameters:

    - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    monthnumberA numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
    date?undefined | numberA numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.
    -

    Returns: number

    -
    -

    setSeconds

    setSeconds(sec: number, ms?: undefined | number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:801

    -

    Parameters:

    - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    secnumberA numeric value equal to the seconds value.
    ms?undefined | numberA numeric value equal to the milliseconds value.
    -

    Returns: number

    -
    -

    setTime

    setTime(time: number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:784

    -

    Parameters:

    - - - - - - - - - - - - - -
    NameTypeDescription
    timenumberA numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
    -

    Returns: number

    -
    -

    setUTCDate

    setUTCDate(date: number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:847

    -

    Parameters:

    - - - - - - - - - - - - - -
    NameTypeDescription
    datenumberA numeric value equal to the day of the month.
    -

    Returns: number

    -
    -

    setUTCFullYear

    setUTCFullYear(year: number, month?: undefined | number, date?: undefined | number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:873

    -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    yearnumberA numeric value equal to the year.
    month?undefined | numberA numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.
    date?undefined | numberA numeric value equal to the day of the month.
    -

    Returns: number

    -
    -

    setUTCHours

    setUTCHours(hours: number, min?: undefined | number, sec?: undefined | number, ms?: undefined | number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:837

    -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    hoursnumberA numeric value equal to the hours value.
    min?undefined | numberA numeric value equal to the minutes value.
    sec?undefined | numberA numeric value equal to the seconds value.
    ms?undefined | numberA numeric value equal to the milliseconds value.
    -

    Returns: number

    -
    -

    setUTCMilliseconds

    setUTCMilliseconds(ms: number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:794

    -

    Parameters:

    - - - - - - - - - - - - - -
    NameTypeDescription
    msnumberA numeric value equal to the millisecond value.
    -

    Returns: number

    -
    -

    setUTCMinutes

    setUTCMinutes(min: number, sec?: undefined | number, ms?: undefined | number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:821

    -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    minnumberA numeric value equal to the minutes value.
    sec?undefined | numberA numeric value equal to the seconds value.
    ms?undefined | numberA numeric value equal to the milliseconds value.
    -

    Returns: number

    -
    -

    setUTCMonth

    setUTCMonth(month: number, date?: undefined | number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:859

    -

    Parameters:

    - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    monthnumberA numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
    date?undefined | numberA numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.
    -

    Returns: number

    -
    -

    setUTCSeconds

    setUTCSeconds(sec: number, ms?: undefined | number): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:807

    -

    Parameters:

    - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    secnumberA numeric value equal to the seconds value.
    ms?undefined | numberA numeric value equal to the milliseconds value.
    -

    Returns: number

    -
    -

    toDateString

    toDateString(): string

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:733

    -

    Returns: string

    -
    -

    toISOString

    toISOString(): string

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:877

    -

    Returns: string

    -
    -

    toJSON

    toJSON(key?: any): string

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:879

    -

    Parameters:

    - - - - - - - - - - - -
    NameType
    key?any
    -

    Returns: string

    -
    -

    toLocaleDateString

    toLocaleDateString(): string

    -

    Inherited from void

    -

    Overrides void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:739

    -

    Returns: string

    -
    -

    toLocaleString

    toLocaleString(): string

    -

    Inherited from void

    -

    Overrides void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:737

    -

    Returns: string

    -
    -

    toLocaleTimeString

    toLocaleTimeString(): string

    -

    Inherited from void

    -

    Overrides void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:741

    -

    Returns: string

    -
    -

    toString

    toString(): string

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:731

    -

    Returns: string

    -
    -

    toTimeString

    toTimeString(): string

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:735

    -

    Returns: string

    -
    -

    toUTCString

    toUTCString(): string

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:875

    -

    Returns: string

    -
    -

    valueOf

    valueOf(): number

    -

    Inherited from void

    -

    Defined in /home/runner/work/liquidjs/liquidjs/node_modules/typescript/lib/lib.es5.d.ts:743

    -

    Returns: number

    - -
    - - - - - - - - - - - - - -
    - - - - - - - - - - - \ No newline at end of file diff --git a/zh-cn/api/enums/context_block_mode_.blockmode.html b/zh-cn/api/enums/context_block_mode_.blockmode.html index 42f9246c7..05eb8992d 100644 --- a/zh-cn/api/enums/context_block_mode_.blockmode.html +++ b/zh-cn/api/enums/context_block_mode_.blockmode.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,19 +87,19 @@

    Enumeration: BlockMode

    -
    +

    Enumeration members

    OUTPUT

    OUTPUT:

    -

    Defined in context/block-mode.ts:3

    +

    Defined in context/block-mode.ts:3


    STORE

    STORE:

    -

    Defined in context/block-mode.ts:5

    +

    Defined in context/block-mode.ts:5

    diff --git a/zh-cn/api/enums/parser_token_kind_.tokenkind.html b/zh-cn/api/enums/parser_token_kind_.tokenkind.html index 5d16ecf65..83751147b 100644 --- a/zh-cn/api/enums/parser_token_kind_.tokenkind.html +++ b/zh-cn/api/enums/parser_token_kind_.tokenkind.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,52 +87,52 @@

    Enumeration: TokenKind

    -
    +

    Enumeration members

    Delimited

    Delimited: = Tag | Output

    -

    Defined in parser/token-kind.ts:14

    +

    Defined in parser/token-kind.ts:14


    Filter

    Filter: = 32

    -

    Defined in parser/token-kind.ts:7

    +

    Defined in parser/token-kind.ts:7


    HTML

    HTML: = 16

    -

    Defined in parser/token-kind.ts:6

    +

    Defined in parser/token-kind.ts:6


    Hash

    Hash: = 64

    -

    Defined in parser/token-kind.ts:8

    +

    Defined in parser/token-kind.ts:8


    Literal

    Literal: = 2

    -

    Defined in parser/token-kind.ts:3

    +

    Defined in parser/token-kind.ts:3


    Number

    Number: = 1

    -

    Defined in parser/token-kind.ts:2

    +

    Defined in parser/token-kind.ts:2


    Operator

    Operator: = 2048

    -

    Defined in parser/token-kind.ts:13

    +

    Defined in parser/token-kind.ts:13


    Output

    Output: = 8

    -

    Defined in parser/token-kind.ts:5

    +

    Defined in parser/token-kind.ts:5


    PropertyAccess

    PropertyAccess: = 128

    -

    Defined in parser/token-kind.ts:9

    +

    Defined in parser/token-kind.ts:9


    Quoted

    Quoted: = 1024

    -

    Defined in parser/token-kind.ts:12

    +

    Defined in parser/token-kind.ts:12


    Range

    Range: = 512

    -

    Defined in parser/token-kind.ts:11

    +

    Defined in parser/token-kind.ts:11


    Tag

    Tag: = 4

    -

    Defined in parser/token-kind.ts:4

    +

    Defined in parser/token-kind.ts:4


    Word

    Word: = 256

    -

    Defined in parser/token-kind.ts:10

    +

    Defined in parser/token-kind.ts:10

    diff --git a/zh-cn/api/globals.html b/zh-cn/api/globals.html index 102869aea..036cccc80 100644 --- a/zh-cn/api/globals.html +++ b/zh-cn/api/globals.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    liquidjs

    -
    +
    diff --git a/zh-cn/api/interfaces/cache_cache_.cache.html b/zh-cn/api/interfaces/cache_cache_.cache.html index 7001dbfdc..e82250137 100644 --- a/zh-cn/api/interfaces/cache_cache_.cache.html +++ b/zh-cn/api/interfaces/cache_cache_.cache.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: Cache <T>

    -
    +
    @@ -99,7 +99,7 @@
  • LRU
  • Methods

    read

    read(key: string): T | undefined | Promise‹T | undefined›

    -

    Defined in cache/cache.ts:3

    +

    Defined in cache/cache.ts:3

    Parameters:

    @@ -116,7 +116,7 @@

    Returns: T | undefined | Promise‹T | undefined›


    write

    write(key: string, value: T): void | Promise‹void›

    -

    Defined in cache/cache.ts:2

    +

    Defined in cache/cache.ts:2

    Parameters:

    @@ -138,7 +138,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/context_scope_.plainobject.html b/zh-cn/api/interfaces/context_scope_.plainobject.html index 7ee3623b2..cb1d88db9 100644 --- a/zh-cn/api/interfaces/context_scope_.plainobject.html +++ b/zh-cn/api/interfaces/context_scope_.plainobject.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: PlainObject

    -
    +
    @@ -98,11 +98,11 @@
  • [ key: string]: any
  • Properties

    Optional toLiquid

    toLiquid? : undefined | function

    -

    Defined in context/scope.ts:5

    +

    Defined in context/scope.ts:5

    - +
    diff --git a/zh-cn/api/interfaces/drop_comparable_.comparable.html b/zh-cn/api/interfaces/drop_comparable_.comparable.html index dbafbfc97..8934176e4 100644 --- a/zh-cn/api/interfaces/drop_comparable_.comparable.html +++ b/zh-cn/api/interfaces/drop_comparable_.comparable.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: Comparable

    -
    +
    @@ -100,7 +100,7 @@
  • NullDrop
  • Properties

    equals

    equals: function

    -

    Defined in drop/comparable.ts:4

    +

    Defined in drop/comparable.ts:4

    Type declaration:

    ▸ (rhs: any): boolean

    Parameters:

    @@ -117,7 +117,7 @@

    geq

    geq: function

    -

    Defined in drop/comparable.ts:6

    +

    Defined in drop/comparable.ts:6

    Type declaration:

    ▸ (rhs: any): boolean

    Parameters:

    @@ -134,7 +134,7 @@

    gt

    gt: function

    -

    Defined in drop/comparable.ts:5

    +

    Defined in drop/comparable.ts:5

    Type declaration:

    ▸ (rhs: any): boolean

    Parameters:

    @@ -151,7 +151,7 @@

    leq

    leq: function

    -

    Defined in drop/comparable.ts:8

    +

    Defined in drop/comparable.ts:8

    Type declaration:

    ▸ (rhs: any): boolean

    Parameters:

    @@ -168,7 +168,7 @@

    lt

    lt: function

    -

    Defined in drop/comparable.ts:7

    +

    Defined in drop/comparable.ts:7

    Type declaration:

    ▸ (rhs: any): boolean

    Parameters:

    @@ -186,7 +186,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/emitters_emitter_.emitter.html b/zh-cn/api/interfaces/emitters_emitter_.emitter.html new file mode 100644 index 000000000..47a51d421 --- /dev/null +++ b/zh-cn/api/interfaces/emitters_emitter_.emitter.html @@ -0,0 +1,202 @@ + + + + + Interface: Emitter | LiquidJS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + +
    NameType
    htmlany
    +

    Returns: void

    + +
    + + + + + + + + + + + + + +
    + + + + + + + + + + + \ No newline at end of file diff --git a/zh-cn/api/interfaces/fs_fs_.fs.html b/zh-cn/api/interfaces/fs_fs_.fs.html index d1c653da9..0746f62f3 100644 --- a/zh-cn/api/interfaces/fs_fs_.fs.html +++ b/zh-cn/api/interfaces/fs_fs_.fs.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: FS

    -
    +
    @@ -95,7 +95,7 @@
  • FS
  • Properties

    exists

    exists: function

    -

    Defined in fs/fs.ts:2

    +

    Defined in fs/fs.ts:2

    Type declaration:

    ▸ (filepath: string): Promise‹boolean›

    Parameters:

    @@ -112,7 +112,7 @@

    existsSync

    existsSync: function

    -

    Defined in fs/fs.ts:4

    +

    Defined in fs/fs.ts:4

    Type declaration:

    ▸ (filepath: string): boolean

    Parameters:

    @@ -129,10 +129,10 @@

    Optional fallback

    fallback? : undefined | function

    -

    Defined in fs/fs.ts:7

    +

    Defined in fs/fs.ts:7


    readFile

    readFile: function

    -

    Defined in fs/fs.ts:3

    +

    Defined in fs/fs.ts:3

    Type declaration:

    ▸ (filepath: string): Promise‹string›

    Parameters:

    @@ -149,7 +149,7 @@

    readFileSync

    readFileSync: function

    -

    Defined in fs/fs.ts:5

    +

    Defined in fs/fs.ts:5

    Type declaration:

    ▸ (filepath: string): string

    Parameters:

    @@ -166,7 +166,7 @@

    resolve

    resolve: function

    -

    Defined in fs/fs.ts:6

    +

    Defined in fs/fs.ts:6

    Type declaration:

    ▸ (root: string, file: string, ext: string): string

    Parameters:

    @@ -192,7 +192,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/liquid_options_.liquidoptions.html b/zh-cn/api/interfaces/liquid_options_.liquidoptions.html index 452787873..bfea0e6f0 100644 --- a/zh-cn/api/interfaces/liquid_options_.liquidoptions.html +++ b/zh-cn/api/interfaces/liquid_options_.liquidoptions.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: LiquidOptions

    -
    +
    @@ -97,74 +97,80 @@

    Properties

    Optional cache

    cache? : boolean | number | CacheTemplate[]›

    -

    Defined in liquid-options.ts:16

    +

    Defined in liquid-options.ts:17


    Optional dynamicPartials

    dynamicPartials? : undefined | false | true

    -

    Defined in liquid-options.ts:20

    +

    Defined in liquid-options.ts:21


    Optional extname

    extname? : undefined | string

    -

    Defined in liquid-options.ts:14

    +

    Defined in liquid-options.ts:15


    Optional fs

    fs? : FS

    -

    Defined in liquid-options.ts:48

    +

    Defined in liquid-options.ts:51


    Optional globals

    globals? : undefined | object

    -

    Defined in liquid-options.ts:50

    +

    Defined in liquid-options.ts:53


    Optional greedy

    greedy? : undefined | false | true

    -

    Defined in liquid-options.ts:46

    +

    Defined in liquid-options.ts:49


    Optional jsTruthy

    jsTruthy? : undefined | false | true

    -

    Defined in liquid-options.ts:18

    +

    Defined in liquid-options.ts:19


    Optional keepOutputType

    keepOutputType? : undefined | false | true

    -

    Defined in liquid-options.ts:52

    +

    Defined in liquid-options.ts:55


    Optional lenientIf

    lenientIf? : undefined | false | true

    -

    Defined in liquid-options.ts:26

    +

    Defined in liquid-options.ts:27


    Optional operators

    operators? : Operators

    -

    Defined in liquid-options.ts:54

    +

    Defined in liquid-options.ts:57

    +
    +

    Optional orderedFilterParameters

    orderedFilterParameters? : undefined | false | true

    +

    Defined in liquid-options.ts:59


    Optional outputDelimiterLeft

    outputDelimiterLeft? : undefined | string

    -

    Defined in liquid-options.ts:40

    +

    Defined in liquid-options.ts:43


    Optional outputDelimiterRight

    outputDelimiterRight? : undefined | string

    -

    Defined in liquid-options.ts:42

    +

    Defined in liquid-options.ts:45


    Optional preserveTimezones

    preserveTimezones? : undefined | false | true

    -

    Defined in liquid-options.ts:44

    +

    Defined in liquid-options.ts:47


    Optional root

    root? : string | string[]

    -

    Defined in liquid-options.ts:12

    +

    Defined in liquid-options.ts:13


    Optional strictFilters

    strictFilters? : undefined | false | true

    -

    Defined in liquid-options.ts:22

    +

    Defined in liquid-options.ts:23


    Optional strictVariables

    strictVariables? : undefined | false | true

    -

    Defined in liquid-options.ts:24

    +

    Defined in liquid-options.ts:25


    Optional tagDelimiterLeft

    tagDelimiterLeft? : undefined | string

    -

    Defined in liquid-options.ts:36

    +

    Defined in liquid-options.ts:39


    Optional tagDelimiterRight

    tagDelimiterRight? : undefined | string

    -

    Defined in liquid-options.ts:38

    +

    Defined in liquid-options.ts:41

    +
    +

    Optional timezoneOffset

    timezoneOffset? : undefined | number

    +

    Defined in liquid-options.ts:29


    Optional trimOutputLeft

    trimOutputLeft? : undefined | false | true

    -

    Defined in liquid-options.ts:34

    +

    Defined in liquid-options.ts:37


    Optional trimOutputRight

    trimOutputRight? : undefined | false | true

    -

    Defined in liquid-options.ts:32

    +

    Defined in liquid-options.ts:35


    Optional trimTagLeft

    trimTagLeft? : undefined | false | true

    -

    Defined in liquid-options.ts:30

    +

    Defined in liquid-options.ts:33


    Optional trimTagRight

    trimTagRight? : undefined | false | true

    -

    Defined in liquid-options.ts:28

    +

    Defined in liquid-options.ts:31

    - +
    @@ -173,7 +179,7 @@
    目录 -
    1. Hierarchy
    2. Properties
      1. Optional cache
      2. Optional dynamicPartials
      3. Optional extname
      4. Optional fs
      5. Optional globals
      6. Optional greedy
      7. Optional jsTruthy
      8. Optional keepOutputType
      9. Optional lenientIf
      10. Optional operators
      11. Optional outputDelimiterLeft
      12. Optional outputDelimiterRight
      13. Optional preserveTimezones
      14. Optional root
      15. Optional strictFilters
      16. Optional strictVariables
      17. Optional tagDelimiterLeft
      18. Optional tagDelimiterRight
      19. Optional trimOutputLeft
      20. Optional trimOutputRight
      21. Optional trimTagLeft
      22. Optional trimTagRight
    +
    1. Hierarchy
    2. Properties
      1. Optional cache
      2. Optional dynamicPartials
      3. Optional extname
      4. Optional fs
      5. Optional globals
      6. Optional greedy
      7. Optional jsTruthy
      8. Optional keepOutputType
      9. Optional lenientIf
      10. Optional operators
      11. Optional orderedFilterParameters
      12. Optional outputDelimiterLeft
      13. Optional outputDelimiterRight
      14. Optional preserveTimezones
      15. Optional root
      16. Optional strictFilters
      17. Optional strictVariables
      18. Optional tagDelimiterLeft
      19. Optional tagDelimiterRight
      20. Optional timezoneOffset
      21. Optional trimOutputLeft
      22. Optional trimOutputRight
      23. Optional trimTagLeft
      24. Optional trimTagRight
    回到顶部
    diff --git a/zh-cn/api/interfaces/liquid_options_.normalizedfulloptions.html b/zh-cn/api/interfaces/liquid_options_.normalizedfulloptions.html index 277db5f08..2aa35412f 100644 --- a/zh-cn/api/interfaces/liquid_options_.normalizedfulloptions.html +++ b/zh-cn/api/interfaces/liquid_options_.normalizedfulloptions.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: NormalizedFullOptions

    -
    +
    @@ -95,99 +95,107 @@

    NormalizedFullOptions

    Properties

    cache

    cache: undefined | CacheTemplate[]›

    Overrides NormalizedOptions.cache

    -

    Defined in liquid-options.ts:66

    +

    Defined in liquid-options.ts:71


    dynamicPartials

    dynamicPartials: boolean

    Overrides LiquidOptions.dynamicPartials

    -

    Defined in liquid-options.ts:68

    +

    Defined in liquid-options.ts:73


    extname

    extname: string

    Overrides LiquidOptions.extname

    -

    Defined in liquid-options.ts:65

    +

    Defined in liquid-options.ts:70


    fs

    fs: FS

    Overrides LiquidOptions.fs

    -

    Defined in liquid-options.ts:69

    +

    Defined in liquid-options.ts:74


    globals

    globals: object

    Overrides LiquidOptions.globals

    -

    Defined in liquid-options.ts:83

    +

    Defined in liquid-options.ts:88


    greedy

    greedy: boolean

    Overrides LiquidOptions.greedy

    -

    Defined in liquid-options.ts:82

    +

    Defined in liquid-options.ts:87


    jsTruthy

    jsTruthy: boolean

    Overrides LiquidOptions.jsTruthy

    -

    Defined in liquid-options.ts:67

    +

    Defined in liquid-options.ts:72


    keepOutputType

    keepOutputType: boolean

    Overrides LiquidOptions.keepOutputType

    -

    Defined in liquid-options.ts:84

    +

    Defined in liquid-options.ts:89


    lenientIf

    lenientIf: boolean

    Overrides LiquidOptions.lenientIf

    -

    Defined in liquid-options.ts:72

    +

    Defined in liquid-options.ts:77


    operators

    operators: Operators

    Overrides LiquidOptions.operators

    -

    Defined in liquid-options.ts:85

    +

    Defined in liquid-options.ts:90


    operatorsTrie

    operatorsTrie: Trie

    Overrides NormalizedOptions.operatorsTrie

    -

    Defined in liquid-options.ts:86

    +

    Defined in liquid-options.ts:91

    +
    +

    Optional orderedFilterParameters

    orderedFilterParameters? : undefined | false | true

    +

    Inherited from LiquidOptions.orderedFilterParameters

    +

    Defined in liquid-options.ts:59


    outputDelimiterLeft

    outputDelimiterLeft: string

    Overrides LiquidOptions.outputDelimiterLeft

    -

    Defined in liquid-options.ts:79

    +

    Defined in liquid-options.ts:84


    outputDelimiterRight

    outputDelimiterRight: string

    Overrides LiquidOptions.outputDelimiterRight

    -

    Defined in liquid-options.ts:80

    +

    Defined in liquid-options.ts:85


    preserveTimezones

    preserveTimezones: boolean

    Overrides LiquidOptions.preserveTimezones

    -

    Defined in liquid-options.ts:81

    +

    Defined in liquid-options.ts:86


    root

    root: string[]

    Overrides NormalizedOptions.root

    -

    Defined in liquid-options.ts:64

    +

    Defined in liquid-options.ts:69


    strictFilters

    strictFilters: boolean

    Overrides LiquidOptions.strictFilters

    -

    Defined in liquid-options.ts:70

    +

    Defined in liquid-options.ts:75


    strictVariables

    strictVariables: boolean

    Overrides LiquidOptions.strictVariables

    -

    Defined in liquid-options.ts:71

    +

    Defined in liquid-options.ts:76


    tagDelimiterLeft

    tagDelimiterLeft: string

    Overrides LiquidOptions.tagDelimiterLeft

    -

    Defined in liquid-options.ts:77

    +

    Defined in liquid-options.ts:82


    tagDelimiterRight

    tagDelimiterRight: string

    Overrides LiquidOptions.tagDelimiterRight

    -

    Defined in liquid-options.ts:78

    +

    Defined in liquid-options.ts:83

    +
    +

    Optional timezoneOffset

    timezoneOffset? : undefined | number

    +

    Inherited from LiquidOptions.timezoneOffset

    +

    Defined in liquid-options.ts:29


    trimOutputLeft

    trimOutputLeft: boolean

    Overrides LiquidOptions.trimOutputLeft

    -

    Defined in liquid-options.ts:76

    +

    Defined in liquid-options.ts:81


    trimOutputRight

    trimOutputRight: boolean

    Overrides LiquidOptions.trimOutputRight

    -

    Defined in liquid-options.ts:75

    +

    Defined in liquid-options.ts:80


    trimTagLeft

    trimTagLeft: boolean

    Overrides LiquidOptions.trimTagLeft

    -

    Defined in liquid-options.ts:74

    +

    Defined in liquid-options.ts:79


    trimTagRight

    trimTagRight: boolean

    Overrides LiquidOptions.trimTagRight

    -

    Defined in liquid-options.ts:73

    +

    Defined in liquid-options.ts:78

    - +
    @@ -196,7 +204,7 @@
    目录 -
    1. Hierarchy
    2. Properties
      1. cache
      2. dynamicPartials
      3. extname
      4. fs
      5. globals
      6. greedy
      7. jsTruthy
      8. keepOutputType
      9. lenientIf
      10. operators
      11. operatorsTrie
      12. outputDelimiterLeft
      13. outputDelimiterRight
      14. preserveTimezones
      15. root
      16. strictFilters
      17. strictVariables
      18. tagDelimiterLeft
      19. tagDelimiterRight
      20. trimOutputLeft
      21. trimOutputRight
      22. trimTagLeft
      23. trimTagRight
    +
    1. Hierarchy
    2. Properties
      1. cache
      2. dynamicPartials
      3. extname
      4. fs
      5. globals
      6. greedy
      7. jsTruthy
      8. keepOutputType
      9. lenientIf
      10. operators
      11. operatorsTrie
      12. Optional orderedFilterParameters
      13. outputDelimiterLeft
      14. outputDelimiterRight
      15. preserveTimezones
      16. root
      17. strictFilters
      18. strictVariables
      19. tagDelimiterLeft
      20. tagDelimiterRight
      21. Optional timezoneOffset
      22. trimOutputLeft
      23. trimOutputRight
      24. trimTagLeft
      25. trimTagRight
    回到顶部
    diff --git a/zh-cn/api/interfaces/liquid_options_.normalizedoptions.html b/zh-cn/api/interfaces/liquid_options_.normalizedoptions.html index 1fdfbe63e..dc306d985 100644 --- a/zh-cn/api/interfaces/liquid_options_.normalizedoptions.html +++ b/zh-cn/api/interfaces/liquid_options_.normalizedoptions.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: NormalizedOptions

    -
    +
    @@ -99,98 +99,106 @@

    Properties

    Optional cache

    cache? : CacheTemplate[]›

    Overrides LiquidOptions.cache

    -

    Defined in liquid-options.ts:59

    +

    Defined in liquid-options.ts:64


    Optional dynamicPartials

    dynamicPartials? : undefined | false | true

    Inherited from LiquidOptions.dynamicPartials

    -

    Defined in liquid-options.ts:20

    +

    Defined in liquid-options.ts:21


    Optional extname

    extname? : undefined | string

    Inherited from LiquidOptions.extname

    -

    Defined in liquid-options.ts:14

    +

    Defined in liquid-options.ts:15


    Optional fs

    fs? : FS

    Inherited from LiquidOptions.fs

    -

    Defined in liquid-options.ts:48

    +

    Defined in liquid-options.ts:51


    Optional globals

    globals? : undefined | object

    Inherited from LiquidOptions.globals

    -

    Defined in liquid-options.ts:50

    +

    Defined in liquid-options.ts:53


    Optional greedy

    greedy? : undefined | false | true

    Inherited from LiquidOptions.greedy

    -

    Defined in liquid-options.ts:46

    +

    Defined in liquid-options.ts:49


    Optional jsTruthy

    jsTruthy? : undefined | false | true

    Inherited from LiquidOptions.jsTruthy

    -

    Defined in liquid-options.ts:18

    +

    Defined in liquid-options.ts:19


    Optional keepOutputType

    keepOutputType? : undefined | false | true

    Inherited from LiquidOptions.keepOutputType

    -

    Defined in liquid-options.ts:52

    +

    Defined in liquid-options.ts:55


    Optional lenientIf

    lenientIf? : undefined | false | true

    Inherited from LiquidOptions.lenientIf

    -

    Defined in liquid-options.ts:26

    +

    Defined in liquid-options.ts:27


    Optional operators

    operators? : Operators

    Inherited from LiquidOptions.operators

    -

    Defined in liquid-options.ts:54

    +

    Defined in liquid-options.ts:57


    Optional operatorsTrie

    operatorsTrie? : Trie

    -

    Defined in liquid-options.ts:60

    +

    Defined in liquid-options.ts:65

    +
    +

    Optional orderedFilterParameters

    orderedFilterParameters? : undefined | false | true

    +

    Inherited from LiquidOptions.orderedFilterParameters

    +

    Defined in liquid-options.ts:59


    Optional outputDelimiterLeft

    outputDelimiterLeft? : undefined | string

    Inherited from LiquidOptions.outputDelimiterLeft

    -

    Defined in liquid-options.ts:40

    +

    Defined in liquid-options.ts:43


    Optional outputDelimiterRight

    outputDelimiterRight? : undefined | string

    Inherited from LiquidOptions.outputDelimiterRight

    -

    Defined in liquid-options.ts:42

    +

    Defined in liquid-options.ts:45


    Optional preserveTimezones

    preserveTimezones? : undefined | false | true

    Inherited from LiquidOptions.preserveTimezones

    -

    Defined in liquid-options.ts:44

    +

    Defined in liquid-options.ts:47


    Optional root

    root? : string[]

    Overrides LiquidOptions.root

    -

    Defined in liquid-options.ts:58

    +

    Defined in liquid-options.ts:63


    Optional strictFilters

    strictFilters? : undefined | false | true

    Inherited from LiquidOptions.strictFilters

    -

    Defined in liquid-options.ts:22

    +

    Defined in liquid-options.ts:23


    Optional strictVariables

    strictVariables? : undefined | false | true

    Inherited from LiquidOptions.strictVariables

    -

    Defined in liquid-options.ts:24

    +

    Defined in liquid-options.ts:25


    Optional tagDelimiterLeft

    tagDelimiterLeft? : undefined | string

    Inherited from LiquidOptions.tagDelimiterLeft

    -

    Defined in liquid-options.ts:36

    +

    Defined in liquid-options.ts:39


    Optional tagDelimiterRight

    tagDelimiterRight? : undefined | string

    Inherited from LiquidOptions.tagDelimiterRight

    -

    Defined in liquid-options.ts:38

    +

    Defined in liquid-options.ts:41

    +
    +

    Optional timezoneOffset

    timezoneOffset? : undefined | number

    +

    Inherited from LiquidOptions.timezoneOffset

    +

    Defined in liquid-options.ts:29


    Optional trimOutputLeft

    trimOutputLeft? : undefined | false | true

    Inherited from LiquidOptions.trimOutputLeft

    -

    Defined in liquid-options.ts:34

    +

    Defined in liquid-options.ts:37


    Optional trimOutputRight

    trimOutputRight? : undefined | false | true

    Inherited from LiquidOptions.trimOutputRight

    -

    Defined in liquid-options.ts:32

    +

    Defined in liquid-options.ts:35


    Optional trimTagLeft

    trimTagLeft? : undefined | false | true

    Inherited from LiquidOptions.trimTagLeft

    -

    Defined in liquid-options.ts:30

    +

    Defined in liquid-options.ts:33


    Optional trimTagRight

    trimTagRight? : undefined | false | true

    Inherited from LiquidOptions.trimTagRight

    -

    Defined in liquid-options.ts:28

    +

    Defined in liquid-options.ts:31

    - +
    @@ -199,7 +207,7 @@
    目录 -
    1. Hierarchy
    2. Properties
      1. Optional cache
      2. Optional dynamicPartials
      3. Optional extname
      4. Optional fs
      5. Optional globals
      6. Optional greedy
      7. Optional jsTruthy
      8. Optional keepOutputType
      9. Optional lenientIf
      10. Optional operators
      11. Optional operatorsTrie
      12. Optional outputDelimiterLeft
      13. Optional outputDelimiterRight
      14. Optional preserveTimezones
      15. Optional root
      16. Optional strictFilters
      17. Optional strictVariables
      18. Optional tagDelimiterLeft
      19. Optional tagDelimiterRight
      20. Optional trimOutputLeft
      21. Optional trimOutputRight
      22. Optional trimTagLeft
      23. Optional trimTagRight
    +
    1. Hierarchy
    2. Properties
      1. Optional cache
      2. Optional dynamicPartials
      3. Optional extname
      4. Optional fs
      5. Optional globals
      6. Optional greedy
      7. Optional jsTruthy
      8. Optional keepOutputType
      9. Optional lenientIf
      10. Optional operators
      11. Optional operatorsTrie
      12. Optional orderedFilterParameters
      13. Optional outputDelimiterLeft
      14. Optional outputDelimiterRight
      15. Optional preserveTimezones
      16. Optional root
      17. Optional strictFilters
      18. Optional strictVariables
      19. Optional tagDelimiterLeft
      20. Optional tagDelimiterRight
      21. Optional timezoneOffset
      22. Optional trimOutputLeft
      23. Optional trimOutputRight
      24. Optional trimTagLeft
      25. Optional trimTagRight
    回到顶部
    diff --git a/zh-cn/api/interfaces/render_emitter_.emitter.html b/zh-cn/api/interfaces/render_emitter_.emitter.html new file mode 100644 index 000000000..eba4403df --- /dev/null +++ b/zh-cn/api/interfaces/render_emitter_.emitter.html @@ -0,0 +1,205 @@ + + + + + Interface: Emitter | LiquidJS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +
    NameTypeDescription
    htmlanystring, Drop or other primitive value
    +

    Returns: void

    + +
    + + + + + + + + + + + + + +
    + + + + + + + + + + + \ No newline at end of file diff --git a/zh-cn/api/interfaces/render_operator_.operators.html b/zh-cn/api/interfaces/render_operator_.operators.html index 3424c0413..be6a7b256 100644 --- a/zh-cn/api/interfaces/render_operator_.operators.html +++ b/zh-cn/api/interfaces/render_operator_.operators.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: Operators

    -
    +
    @@ -122,7 +122,7 @@
    diff --git a/zh-cn/api/interfaces/template_filter_filter_impl_.filterimpl.html b/zh-cn/api/interfaces/template_filter_filter_impl_.filterimpl.html index ba8a8f506..931cdd969 100644 --- a/zh-cn/api/interfaces/template_filter_filter_impl_.filterimpl.html +++ b/zh-cn/api/interfaces/template_filter_filter_impl_.filterimpl.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: FilterImpl

    -
    +
    @@ -95,14 +95,14 @@
  • FilterImpl
  • Properties

    context

    context: Context

    -

    Defined in template/filter/filter-impl.ts:5

    +

    Defined in template/filter/filter-impl.ts:5


    liquid

    liquid: Liquid

    -

    Defined in template/filter/filter-impl.ts:6

    +

    Defined in template/filter/filter-impl.ts:6

    diff --git a/zh-cn/api/interfaces/template_filter_filter_impl_options_.filterimploptions.html b/zh-cn/api/interfaces/template_filter_filter_impl_options_.filterimploptions.html index d65bdc5e3..e376c0fcc 100644 --- a/zh-cn/api/interfaces/template_filter_filter_impl_options_.filterimploptions.html +++ b/zh-cn/api/interfaces/template_filter_filter_impl_options_.filterimploptions.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: FilterImplOptions

    -
    +
    @@ -95,7 +95,7 @@
  • FilterImplOptions
  • Callable

    ▸ (this: FilterImpl, value: any, …args: any[]): any

    -

    Defined in template/filter/filter-impl-options.ts:3

    +

    Defined in template/filter/filter-impl-options.ts:3

    Parameters:

    @@ -121,7 +121,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/template_tag_tag_impl_.tagimpl.html b/zh-cn/api/interfaces/template_tag_tag_impl_.tagimpl.html index 7d8381d71..f990480a5 100644 --- a/zh-cn/api/interfaces/template_tag_tag_impl_.tagimpl.html +++ b/zh-cn/api/interfaces/template_tag_tag_impl_.tagimpl.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: TagImpl

    -
    +
    @@ -100,16 +100,16 @@
  • [ key: string]: any
  • Properties

    liquid

    liquid: Liquid

    -

    Defined in template/tag/tag-impl.ts:5

    +

    Defined in template/tag/tag-impl.ts:5


    Optional parse

    parse? : undefined | function

    Inherited from TagImplOptions.parse

    -

    Defined in template/tag/tag-impl-options.ts:9

    +

    Defined in template/tag/tag-impl-options.ts:9


    render

    render: function

    Inherited from TagImplOptions.render

    -

    Defined in template/tag/tag-impl-options.ts:10

    -

    Type declaration:

    ▸ (this: TagImpl, ctx: Context, emitter: Emitter, hash: Hash): any

    +

    Defined in template/tag/tag-impl-options.ts:10

    +

    Type declaration:

    ▸ (this: TagImpl, ctx: Context, emitter: Emitter, hash: Hash): any

    Parameters:

    @@ -128,7 +128,7 @@ - + @@ -138,7 +138,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/template_tag_tag_impl_options_.tagimploptions.html b/zh-cn/api/interfaces/template_tag_tag_impl_options_.tagimploptions.html index c1d7a6f62..a6f37f5db 100644 --- a/zh-cn/api/interfaces/template_tag_tag_impl_options_.tagimploptions.html +++ b/zh-cn/api/interfaces/template_tag_tag_impl_options_.tagimploptions.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: TagImplOptions

    -
    +
    @@ -97,11 +97,11 @@

    Properties

    Optional parse

    parse? : undefined | function

    -

    Defined in template/tag/tag-impl-options.ts:9

    +

    Defined in template/tag/tag-impl-options.ts:9


    render

    render: function

    -

    Defined in template/tag/tag-impl-options.ts:10

    -

    Type declaration:

    ▸ (this: TagImpl, ctx: Context, emitter: Emitter, hash: Hash): any

    +

    Defined in template/tag/tag-impl-options.ts:10

    +

    Type declaration:

    ▸ (this: TagImpl, ctx: Context, emitter: Emitter, hash: Hash): any

    Parameters:

    emitterEmitterEmitter
    hash
    @@ -120,7 +120,7 @@ - + @@ -130,7 +130,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/template_template_.template.html b/zh-cn/api/interfaces/template_template_.template.html index aeaff0b99..c4fd77893 100644 --- a/zh-cn/api/interfaces/template_template_.template.html +++ b/zh-cn/api/interfaces/template_template_.template.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: Template

    -
    +
    @@ -100,9 +100,9 @@
  • Tag
  • Properties

    token

    token: Token

    -

    Defined in template/template.ts:6

    -

    Methods

    render

    render(ctx: Context, emitter: Emitter): any

    -

    Defined in template/template.ts:7

    +

    Defined in template/template.ts:6

    +

    Methods

    render

    render(ctx: Context, emitter: Emitter): any

    +

    Defined in template/template.ts:7

    Parameters:

    emitterEmitterEmitter
    hash
    @@ -117,14 +117,14 @@ - +
    emitterEmitterEmitter

    Returns: any

    diff --git a/zh-cn/api/interfaces/util_async_.thenable.html b/zh-cn/api/interfaces/util_async_.thenable.html index 6802b0ab5..47802e50b 100644 --- a/zh-cn/api/interfaces/util_async_.thenable.html +++ b/zh-cn/api/interfaces/util_async_.thenable.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: Thenable

    -
    +
    @@ -95,7 +95,7 @@
  • Thenable
  • Methods

    catch

    catch(reject: resolver): Thenable

    -

    Defined in util/async.ts:7

    +

    Defined in util/async.ts:7

    Parameters:

    @@ -112,7 +112,7 @@

    Returns: Thenable


    then

    then(resolve: resolver, reject?: resolver): Thenable

    -

    Defined in util/async.ts:6

    +

    Defined in util/async.ts:6

    Parameters:

    @@ -134,7 +134,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/util_operator_trie_.trie.html b/zh-cn/api/interfaces/util_operator_trie_.trie.html index e14ab06c5..f1f684a2e 100644 --- a/zh-cn/api/interfaces/util_operator_trie_.trie.html +++ b/zh-cn/api/interfaces/util_operator_trie_.trie.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: Trie

    -
    +
    @@ -100,7 +100,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/util_strftime_.formatoptions.html b/zh-cn/api/interfaces/util_strftime_.formatoptions.html index 0cb47eee4..ebd2940bd 100644 --- a/zh-cn/api/interfaces/util_strftime_.formatoptions.html +++ b/zh-cn/api/interfaces/util_strftime_.formatoptions.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Interface: FormatOptions

    -
    +
    @@ -95,17 +95,17 @@
  • FormatOptions
  • Properties

    flags

    flags: object

    -

    Defined in util/strftime.ts:20

    +

    Defined in util/strftime.ts:22


    Optional modifier

    modifier? : undefined | string

    -

    Defined in util/strftime.ts:22

    +

    Defined in util/strftime.ts:24


    Optional width

    width? : undefined | string

    -

    Defined in util/strftime.ts:21

    +

    Defined in util/strftime.ts:23

    - +
    diff --git a/zh-cn/api/modules/builtin_filters_array_.html b/zh-cn/api/modules/builtin_filters_array_.html index 68ca53afc..18c7652a6 100644 --- a/zh-cn/api/modules/builtin_filters_array_.html +++ b/zh-cn/api/modules/builtin_filters_array_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "builtin/filters/array"

    -
    +

    Functions

    compact

    compact<T>(this: FilterImpl, arr: T[]): any[]

    -

    Defined in builtin/filters/array.ts:27

    +

    Defined in builtin/filters/array.ts:27

    Type parameters:

    T

    Parameters:

    @@ -115,7 +115,7 @@

    Returns: any[]


    concat

    concat<T1, T2>(v: T1[], arg: T2[] | T2): T1 | T2[]

    -

    Defined in builtin/filters/array.ts:31

    +

    Defined in builtin/filters/array.ts:31

    Type parameters:

    T1

    T2

    @@ -139,7 +139,7 @@

    Returns: T1 | T2[]


    Const first

    first(v: any): any

    -

    Defined in builtin/filters/array.ts:9

    +

    Defined in builtin/filters/array.ts:9

    Parameters:

    @@ -156,7 +156,7 @@

    Returns: any


    Const join

    join(v: any[], arg: string): string

    -

    Defined in builtin/filters/array.ts:7

    +

    Defined in builtin/filters/array.ts:7

    Parameters:

    @@ -177,7 +177,7 @@

    Returns: string


    Const last

    last(v: any): any

    -

    Defined in builtin/filters/array.ts:8

    +

    Defined in builtin/filters/array.ts:8

    Parameters:

    @@ -194,7 +194,7 @@

    Returns: any


    map

    map<T1, T2>(this: FilterImpl, arr: Scope[], property: string): object[]

    -

    Defined in builtin/filters/array.ts:23

    +

    Defined in builtin/filters/array.ts:23

    Type parameters:

    T1

    T2

    @@ -222,7 +222,7 @@

    Returns: object[]


    Const reverse

    reverse(v: any[]): any[]

    -

    Defined in builtin/filters/array.ts:10

    +

    Defined in builtin/filters/array.ts:10

    Parameters:

    @@ -239,7 +239,7 @@

    Returns: any[]


    Const size

    size(v: string | any[]): number

    -

    Defined in builtin/filters/array.ts:21

    +

    Defined in builtin/filters/array.ts:21

    Parameters:

    @@ -256,7 +256,7 @@

    Returns: number


    slice

    slice<T>(v: T[], begin: number, length: number): T[]

    -

    Defined in builtin/filters/array.ts:35

    +

    Defined in builtin/filters/array.ts:35

    Type parameters:

    T

    Parameters:

    @@ -287,7 +287,7 @@

    Returns: T[]


    sort

    sort<T>(this: FilterImpl, arr: T[], property?: undefined | string): any[]

    -

    Defined in builtin/filters/array.ts:12

    +

    Defined in builtin/filters/array.ts:12

    Type parameters:

    T

    Parameters:

    @@ -314,7 +314,7 @@

    Returns: any[]


    uniq

    uniq<T>(arr: T[]): T[]

    -

    Defined in builtin/filters/array.ts:47

    +

    Defined in builtin/filters/array.ts:47

    Type parameters:

    T

    Parameters:

    @@ -333,7 +333,7 @@

    Returns: T[]


    where

    where<T>(this: FilterImpl, arr: T[], property: string, expected?: any): T[]

    -

    Defined in builtin/filters/array.ts:40

    +

    Defined in builtin/filters/array.ts:40

    Type parameters:

    T: object

    Parameters:

    @@ -365,7 +365,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_filters_date_.html b/zh-cn/api/modules/builtin_filters_date_.html index ca2d1694a..170d2992b 100644 --- a/zh-cn/api/modules/builtin_filters_date_.html +++ b/zh-cn/api/modules/builtin_filters_date_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "builtin/filters/date"

    -
    +

    Functions

    date

    date(this: FilterImpl, v: string | Date, arg: string): string | Date

    -

    Defined in builtin/filters/date.ts:5

    +

    Defined in builtin/filters/date.ts:5

    Parameters:

    @@ -117,7 +117,7 @@

    Returns: string | Date


    isValidDate

    isValidDate(date: any): boolean

    -

    Defined in builtin/filters/date.ts:23

    +

    Defined in builtin/filters/date.ts:25

    Parameters:

    @@ -135,7 +135,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_filters_html_.html b/zh-cn/api/modules/builtin_filters_html_.html index 255b7c4e2..d8d61da08 100644 --- a/zh-cn/api/modules/builtin_filters_html_.html +++ b/zh-cn/api/modules/builtin_filters_html_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "builtin/filters/html"

    -
    +

    Functions

    escape

    escape(str: string): string

    -

    Defined in builtin/filters/html.ts:18

    +

    Defined in builtin/filters/html.ts:18

    Parameters:

    @@ -109,7 +109,7 @@

    Returns: string


    escapeOnce

    escapeOnce(str: string): string

    -

    Defined in builtin/filters/html.ts:26

    +

    Defined in builtin/filters/html.ts:26

    Parameters:

    @@ -126,7 +126,7 @@

    Returns: string


    newlineToBr

    newlineToBr(v: string): string

    -

    Defined in builtin/filters/html.ts:30

    +

    Defined in builtin/filters/html.ts:30

    Parameters:

    @@ -143,7 +143,7 @@

    Returns: string


    stripHtml

    stripHtml(v: string): string

    -

    Defined in builtin/filters/html.ts:34

    +

    Defined in builtin/filters/html.ts:34

    Parameters:

    @@ -160,7 +160,7 @@

    Returns: string


    unescape

    unescape(str: string): string

    -

    Defined in builtin/filters/html.ts:22

    +

    Defined in builtin/filters/html.ts:22

    Parameters:

    @@ -175,33 +175,33 @@

    Returns: string

    -

    Object literals

    Const escapeMap

    escapeMap: object

    Defined in builtin/filters/html.ts:3

    +

    Object literals

    Const escapeMap

    escapeMap: object

    Defined in builtin/filters/html.ts:3

    : string = “"”

    -

    Defined in builtin/filters/html.ts:7

    +

    Defined in builtin/filters/html.ts:7

    &

    &: string = “&”

    -

    Defined in builtin/filters/html.ts:4

    +

    Defined in builtin/filters/html.ts:4

    : string = “'”

    -

    Defined in builtin/filters/html.ts:8

    +

    Defined in builtin/filters/html.ts:8

    <

    <: string = “<”

    -

    Defined in builtin/filters/html.ts:5

    +

    Defined in builtin/filters/html.ts:5

    >

    >: string = “>”

    -

    Defined in builtin/filters/html.ts:6

    +

    Defined in builtin/filters/html.ts:6


    -

    Const unescapeMap

    unescapeMap: object

    Defined in builtin/filters/html.ts:10

    +

    Const unescapeMap

    unescapeMap: object

    Defined in builtin/filters/html.ts:10

    "

    ": string = “””

    -

    Defined in builtin/filters/html.ts:14

    +

    Defined in builtin/filters/html.ts:14

    '

    ': string = “‘“

    -

    Defined in builtin/filters/html.ts:15

    +

    Defined in builtin/filters/html.ts:15

    &

    &: string = “&”

    -

    Defined in builtin/filters/html.ts:11

    +

    Defined in builtin/filters/html.ts:11

    >

    >: string = “>”

    -

    Defined in builtin/filters/html.ts:13

    +

    Defined in builtin/filters/html.ts:13

    <

    <: string = “<”

    -

    Defined in builtin/filters/html.ts:12

    +

    Defined in builtin/filters/html.ts:12

    @@ -210,7 +210,7 @@
    目录 -
    1. Functions
      1. escape
      2. escapeOnce
      3. newlineToBr
      4. stripHtml
      5. unescape
    2. Object literals
      1. Const escapeMap
      2. ▪ escapeMap: object
      3. &
      4. <
      5. >
      6. Const unescapeMap
      7. ▪ unescapeMap: object
      8. &#34;
      9. '
      10. &
      11. >
      12. <
    +
    1. Functions
      1. escape
      2. escapeOnce
      3. newlineToBr
      4. stripHtml
      5. unescape
    2. Object literals
      1. Const escapeMap
      2. ▪ escapeMap: object
      3. &
      4. <
      5. >
      6. Const unescapeMap
      7. ▪ unescapeMap: object
      8. "
      9. '
      10. &
      11. >
      12. <
    回到顶部
    diff --git a/zh-cn/api/modules/builtin_filters_index_.html b/zh-cn/api/modules/builtin_filters_index_.html index 7b9a88fae..fee69ef4c 100644 --- a/zh-cn/api/modules/builtin_filters_index_.html +++ b/zh-cn/api/modules/builtin_filters_index_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/filters/index"

    -
    +
    diff --git a/zh-cn/api/modules/builtin_filters_math_.html b/zh-cn/api/modules/builtin_filters_math_.html index a3cb77181..2cd9ec23e 100644 --- a/zh-cn/api/modules/builtin_filters_math_.html +++ b/zh-cn/api/modules/builtin_filters_math_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,26 +87,26 @@

    External module: "builtin/filters/math"

    -
    +

    Variables

    Const abs

    abs: abs = Math.abs

    -

    Defined in builtin/filters/math.ts:3

    +

    Defined in builtin/filters/math.ts:3


    Const atLeast

    atLeast: max = Math.max

    -

    Defined in builtin/filters/math.ts:4

    +

    Defined in builtin/filters/math.ts:4


    Const atMost

    atMost: min = Math.min

    -

    Defined in builtin/filters/math.ts:5

    +

    Defined in builtin/filters/math.ts:5


    Const ceil

    ceil: ceil = Math.ceil

    -

    Defined in builtin/filters/math.ts:6

    +

    Defined in builtin/filters/math.ts:6


    Const floor

    floor: floor = Math.floor

    -

    Defined in builtin/filters/math.ts:8

    +

    Defined in builtin/filters/math.ts:8

    Functions

    Const dividedBy

    dividedBy(v: number, arg: number): number

    -

    Defined in builtin/filters/math.ts:7

    +

    Defined in builtin/filters/math.ts:7

    Parameters:

    @@ -127,7 +127,7 @@

    Returns: number


    Const minus

    minus(v: number, arg: number): number

    -

    Defined in builtin/filters/math.ts:9

    +

    Defined in builtin/filters/math.ts:9

    Parameters:

    @@ -148,7 +148,7 @@

    Returns: number


    Const modulo

    modulo(v: number, arg: number): number

    -

    Defined in builtin/filters/math.ts:10

    +

    Defined in builtin/filters/math.ts:10

    Parameters:

    @@ -169,7 +169,7 @@

    Returns: number


    plus

    plus(v: number, arg: number): number

    -

    Defined in builtin/filters/math.ts:18

    +

    Defined in builtin/filters/math.ts:18

    Parameters:

    @@ -190,7 +190,7 @@

    Returns: number


    round

    round(v: number, arg: number): number

    -

    Defined in builtin/filters/math.ts:13

    +

    Defined in builtin/filters/math.ts:13

    Parameters:

    @@ -214,7 +214,7 @@

    Returns: number


    sortNatural

    sortNatural(input: any[], property?: undefined | string): any[]

    -

    Defined in builtin/filters/math.ts:22

    +

    Defined in builtin/filters/math.ts:22

    Parameters:

    @@ -235,7 +235,7 @@

    Returns: any[]


    Const times

    times(v: number, arg: number): number

    -

    Defined in builtin/filters/math.ts:11

    +

    Defined in builtin/filters/math.ts:11

    Parameters:

    @@ -257,7 +257,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_filters_object_.html b/zh-cn/api/modules/builtin_filters_object_.html index eaafaf40b..83573a385 100644 --- a/zh-cn/api/modules/builtin_filters_object_.html +++ b/zh-cn/api/modules/builtin_filters_object_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "builtin/filters/object"

    -
    +

    Functions

    Default

    Default<T1, T2>(this: FilterImpl, v: string | T1, arg: T2): string | T1 | T2

    -

    Defined in builtin/filters/object.ts:5

    +

    Defined in builtin/filters/object.ts:5

    Type parameters:

    T1

    T2

    @@ -120,7 +120,7 @@

    Returns: string | T1 | T2


    json

    json(v: any): string

    -

    Defined in builtin/filters/object.ts:9

    +

    Defined in builtin/filters/object.ts:9

    Parameters:

    @@ -138,7 +138,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_filters_string_.html b/zh-cn/api/modules/builtin_filters_string_.html index ae8ed0890..d982051c6 100644 --- a/zh-cn/api/modules/builtin_filters_string_.html +++ b/zh-cn/api/modules/builtin_filters_string_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "builtin/filters/string"

    -
    +

    Functions

    append

    append(v: string, arg: string): string

    -

    Defined in builtin/filters/string.ts:9

    +

    Defined in builtin/filters/string.ts:9

    Parameters:

    @@ -113,7 +113,7 @@

    Returns: string


    capitalize

    capitalize(str: string): string

    -

    Defined in builtin/filters/string.ts:55

    +

    Defined in builtin/filters/string.ts:55

    Parameters:

    @@ -130,7 +130,7 @@

    Returns: string


    downcase

    downcase(v: string): string

    -

    Defined in builtin/filters/string.ts:23

    +

    Defined in builtin/filters/string.ts:23

    Parameters:

    @@ -147,7 +147,7 @@

    Returns: string


    lstrip

    lstrip(v: string): string

    -

    Defined in builtin/filters/string.ts:19

    +

    Defined in builtin/filters/string.ts:19

    Parameters:

    @@ -164,7 +164,7 @@

    Returns: string


    prepend

    prepend(v: string, arg: string): string

    -

    Defined in builtin/filters/string.ts:14

    +

    Defined in builtin/filters/string.ts:14

    Parameters:

    @@ -185,7 +185,7 @@

    Returns: string


    remove

    remove(v: string, arg: string): string

    -

    Defined in builtin/filters/string.ts:31

    +

    Defined in builtin/filters/string.ts:31

    Parameters:

    @@ -206,7 +206,7 @@

    Returns: string


    removeFirst

    removeFirst(v: string, l: string): string

    -

    Defined in builtin/filters/string.ts:35

    +

    Defined in builtin/filters/string.ts:35

    Parameters:

    @@ -227,7 +227,7 @@

    Returns: string


    replace

    replace(v: string, pattern: string, replacement: string): string

    -

    Defined in builtin/filters/string.ts:60

    +

    Defined in builtin/filters/string.ts:60

    Parameters:

    @@ -252,7 +252,7 @@

    Returns: string


    replaceFirst

    replaceFirst(v: string, arg1: string, arg2: string): string

    -

    Defined in builtin/filters/string.ts:64

    +

    Defined in builtin/filters/string.ts:64

    Parameters:

    @@ -277,7 +277,7 @@

    Returns: string


    rstrip

    rstrip(str: string): string

    -

    Defined in builtin/filters/string.ts:39

    +

    Defined in builtin/filters/string.ts:39

    Parameters:

    @@ -294,7 +294,7 @@

    Returns: string


    split

    split(v: string, arg: string): string[]

    -

    Defined in builtin/filters/string.ts:43

    +

    Defined in builtin/filters/string.ts:43

    Parameters:

    @@ -315,7 +315,7 @@

    Returns: string[]


    strip

    strip(v: string): string

    -

    Defined in builtin/filters/string.ts:47

    +

    Defined in builtin/filters/string.ts:47

    Parameters:

    @@ -332,7 +332,7 @@

    Returns: string


    stripNewlines

    stripNewlines(v: string): string

    -

    Defined in builtin/filters/string.ts:51

    +

    Defined in builtin/filters/string.ts:51

    Parameters:

    @@ -349,7 +349,7 @@

    Returns: string


    truncate

    truncate(v: string, l: number, o: string): string

    -

    Defined in builtin/filters/string.ts:68

    +

    Defined in builtin/filters/string.ts:68

    Parameters:

    @@ -378,7 +378,7 @@

    Returns: string


    truncatewords

    truncatewords(v: string, l: number, o: string): string

    -

    Defined in builtin/filters/string.ts:74

    +

    Defined in builtin/filters/string.ts:74

    Parameters:

    @@ -407,7 +407,7 @@

    Returns: string


    upcase

    upcase(str: string): string

    -

    Defined in builtin/filters/string.ts:27

    +

    Defined in builtin/filters/string.ts:27

    Parameters:

    @@ -425,7 +425,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_filters_url_.html b/zh-cn/api/modules/builtin_filters_url_.html index 41163333d..3f2798d8b 100644 --- a/zh-cn/api/modules/builtin_filters_url_.html +++ b/zh-cn/api/modules/builtin_filters_url_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "builtin/filters/url"

    -
    +

    Functions

    Const urlDecode

    urlDecode(x: string): string

    -

    Defined in builtin/filters/url.ts:1

    +

    Defined in builtin/filters/url.ts:1

    Parameters:

    @@ -109,7 +109,7 @@

    Returns: string


    Const urlEncode

    urlEncode(x: string): string

    -

    Defined in builtin/filters/url.ts:2

    +

    Defined in builtin/filters/url.ts:2

    Parameters:

    @@ -127,7 +127,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_assign_.html b/zh-cn/api/modules/builtin_tags_assign_.html index fbf680914..77a28024b 100644 --- a/zh-cn/api/modules/builtin_tags_assign_.html +++ b/zh-cn/api/modules/builtin_tags_assign_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/assign"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_block_.html b/zh-cn/api/modules/builtin_tags_block_.html index 3859a3e01..8f0ca1b76 100644 --- a/zh-cn/api/modules/builtin_tags_block_.html +++ b/zh-cn/api/modules/builtin_tags_block_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/block"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_break_.html b/zh-cn/api/modules/builtin_tags_break_.html index b06cfbdd5..8216ad35b 100644 --- a/zh-cn/api/modules/builtin_tags_break_.html +++ b/zh-cn/api/modules/builtin_tags_break_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/break"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_capture_.html b/zh-cn/api/modules/builtin_tags_capture_.html index 0705f3f0b..9f9427eac 100644 --- a/zh-cn/api/modules/builtin_tags_capture_.html +++ b/zh-cn/api/modules/builtin_tags_capture_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "builtin/tags/capture"

    -
    +

    Functions

    readVariableName

    readVariableName(tokenizer: Tokenizer): undefined | string

    -

    Defined in builtin/tags/capture.ts:27

    +

    Defined in builtin/tags/capture.ts:27

    Parameters:

    @@ -110,7 +110,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_case_.html b/zh-cn/api/modules/builtin_tags_case_.html index 472f77448..82093dc6e 100644 --- a/zh-cn/api/modules/builtin_tags_case_.html +++ b/zh-cn/api/modules/builtin_tags_case_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/case"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_comment_.html b/zh-cn/api/modules/builtin_tags_comment_.html index 50c45c932..93462cdbf 100644 --- a/zh-cn/api/modules/builtin_tags_comment_.html +++ b/zh-cn/api/modules/builtin_tags_comment_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/comment"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_continue_.html b/zh-cn/api/modules/builtin_tags_continue_.html index 3a78011c7..47eedbef9 100644 --- a/zh-cn/api/modules/builtin_tags_continue_.html +++ b/zh-cn/api/modules/builtin_tags_continue_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/continue"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_cycle_.html b/zh-cn/api/modules/builtin_tags_cycle_.html index 559d896c3..1ac44bbf2 100644 --- a/zh-cn/api/modules/builtin_tags_cycle_.html +++ b/zh-cn/api/modules/builtin_tags_cycle_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/cycle"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_decrement_.html b/zh-cn/api/modules/builtin_tags_decrement_.html index e4e8c6b45..4e346aadd 100644 --- a/zh-cn/api/modules/builtin_tags_decrement_.html +++ b/zh-cn/api/modules/builtin_tags_decrement_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/decrement"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_for_.html b/zh-cn/api/modules/builtin_tags_for_.html index 5dfa3b2d4..9ea147c53 100644 --- a/zh-cn/api/modules/builtin_tags_for_.html +++ b/zh-cn/api/modules/builtin_tags_for_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,82 @@

    External module: "builtin/tags/for"

    -
    +
    - +

    Type aliases

    valueof

    Ƭ valueof: T[keyof T]

    +

    Defined in builtin/tags/for.ts:8

    +

    Variables

    Const MODIFIERS

    MODIFIERS: string[] = [‘offset’, ‘limit’, ‘reversed’]

    +

    Defined in builtin/tags/for.ts:6

    +

    Functions

    limit

    limit<T>(arr: Array‹T›, count: number): T[]

    +

    Defined in builtin/tags/for.ts:85

    +

    Type parameters:

    +

    T

    +

    Parameters:

    +
    + + + + + + + + + + + + + + +
    NameType
    arrArray‹T›
    countnumber
    +

    Returns: T[]

    +
    +

    offset

    offset<T>(arr: Array‹T›, count: number): T[]

    +

    Defined in builtin/tags/for.ts:81

    +

    Type parameters:

    +

    T

    +

    Parameters:

    + + + + + + + + + + + + + + + +
    NameType
    arrArray‹T›
    countnumber
    +

    Returns: T[]

    +
    +

    reversed

    reversed<T>(arr: Array‹T›): T[]

    +

    Defined in builtin/tags/for.ts:77

    +

    Type parameters:

    +

    T

    +

    Parameters:

    + + + + + + + + + + + +
    NameType
    arrArray‹T›
    +

    Returns: T[]

    +
    @@ -103,7 +171,7 @@
    目录 - +
    1. Type aliases
      1. valueof
    2. Variables
      1. Const MODIFIERS
    3. Functions
      1. limit
      2. offset
      3. reversed
    回到顶部
    diff --git a/zh-cn/api/modules/builtin_tags_if_.html b/zh-cn/api/modules/builtin_tags_if_.html index 7c15f78b1..3b5205d89 100644 --- a/zh-cn/api/modules/builtin_tags_if_.html +++ b/zh-cn/api/modules/builtin_tags_if_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/if"

    -
    +
    diff --git a/zh-cn/api/modules/builtin_tags_include_.html b/zh-cn/api/modules/builtin_tags_include_.html index 2d5d111ff..4e7f162b0 100644 --- a/zh-cn/api/modules/builtin_tags_include_.html +++ b/zh-cn/api/modules/builtin_tags_include_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/include"

    -
    +
    diff --git a/zh-cn/api/modules/builtin_tags_increment_.html b/zh-cn/api/modules/builtin_tags_increment_.html index 1f9a9ebfd..a88a319b6 100644 --- a/zh-cn/api/modules/builtin_tags_increment_.html +++ b/zh-cn/api/modules/builtin_tags_increment_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/increment"

    -
    +
    diff --git a/zh-cn/api/modules/builtin_tags_index_.html b/zh-cn/api/modules/builtin_tags_index_.html index 78e3073c3..3e392fce7 100644 --- a/zh-cn/api/modules/builtin_tags_index_.html +++ b/zh-cn/api/modules/builtin_tags_index_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,67 +87,67 @@

    External module: "builtin/tags/index"

    -
    +
    -

    Object literals

    Const tags

    tags: object

    Defined in builtin/tags/index.ts:21

    +

    Object literals

    Const tags

    tags: object

    Defined in builtin/tags/index.ts:21

    assign

    assign: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    block

    block: object

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    Type declaration:

    break

    break: object = Break

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    Type declaration:

    capture

    capture: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    case

    case: TagImplOptions = Case

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    comment

    comment: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    continue

    continue: object = Continue

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    Type declaration:

    cycle

    cycle: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    decrement

    decrement: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    for

    for: TagImplOptions = For

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    if

    if: TagImplOptions = If

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    include

    include: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    increment

    increment: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    layout

    layout: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    raw

    raw: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    render

    render: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    tablerow

    tablerow: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    unless

    unless: TagImplOptions

    -

    Defined in builtin/tags/index.ts:22

    +

    Defined in builtin/tags/index.ts:22

    @@ -156,7 +156,7 @@
    目录 -
    1. Object literals
      1. Const tags
      2. ▪ tags: object
      3. assign
      4. block
        1. Type declaration:
      5. break
        1. Type declaration:
      6. capture
      7. case
      8. comment
      9. continue
        1. Type declaration:
      10. cycle
      11. decrement
      12. for
      13. if
      14. include
      15. increment
      16. layout
      17. raw
      18. render
      19. tablerow
      20. unless
    +
    1. Object literals
      1. Const tags
      2. ▪ tags: object
      3. assign
      4. block
        1. Type declaration:
      5. break
        1. Type declaration:
      6. capture
      7. case
      8. comment
      9. continue
        1. Type declaration:
      10. cycle
      11. decrement
      12. for
      13. if
      14. include
      15. increment
      16. layout
      17. raw
      18. render
      19. tablerow
      20. unless
    回到顶部
    diff --git a/zh-cn/api/modules/builtin_tags_layout_.html b/zh-cn/api/modules/builtin_tags_layout_.html index d2ec44851..3187cd2ff 100644 --- a/zh-cn/api/modules/builtin_tags_layout_.html +++ b/zh-cn/api/modules/builtin_tags_layout_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/layout"

    -
    +
    diff --git a/zh-cn/api/modules/builtin_tags_raw_.html b/zh-cn/api/modules/builtin_tags_raw_.html index 7559df41c..8f0795ec8 100644 --- a/zh-cn/api/modules/builtin_tags_raw_.html +++ b/zh-cn/api/modules/builtin_tags_raw_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/raw"

    -
    +
    diff --git a/zh-cn/api/modules/builtin_tags_render_.html b/zh-cn/api/modules/builtin_tags_render_.html index 8b6da9569..b02f87aaf 100644 --- a/zh-cn/api/modules/builtin_tags_render_.html +++ b/zh-cn/api/modules/builtin_tags_render_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,62 @@

    External module: "builtin/tags/render"

    -
    +
    - +

    Type aliases

    ParsedFileName

    Ƭ ParsedFileName: Template[] | Token | string | undefined

    +

    Defined in builtin/tags/render.ts:73

    +

    Functions

    parseFilePath

    parseFilePath(tokenizer: Tokenizer, liquid: Liquid): ParsedFileName | null

    +

    Defined in builtin/tags/render.ts:81

    +

    Parameters:

    + + + + + + + + + + + + + + + +
    NameType
    tokenizerTokenizer
    liquidLiquid
    +

    Returns: ParsedFileName | null

    +

    null for “none”,

    +
    +

    renderFilePath

    renderFilePath(file: ParsedFileName, ctx: Context, liquid: Liquid): any

    +

    Defined in builtin/tags/render.ts:102

    +

    Parameters:

    + + + + + + + + + + + + + + + + + + + +
    NameType
    fileParsedFileName
    ctxContext
    liquidLiquid
    +

    Returns: any

    +
    @@ -103,7 +151,7 @@
    目录 - +
    1. Type aliases
      1. ParsedFileName
    2. Functions
      1. parseFilePath
      2. renderFilePath
    回到顶部
    diff --git a/zh-cn/api/modules/builtin_tags_tablerow_.html b/zh-cn/api/modules/builtin_tags_tablerow_.html index a0fc3fdd2..6b14f305f 100644 --- a/zh-cn/api/modules/builtin_tags_tablerow_.html +++ b/zh-cn/api/modules/builtin_tags_tablerow_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/tablerow"

    -
    +
    diff --git a/zh-cn/api/modules/builtin_tags_unless_.html b/zh-cn/api/modules/builtin_tags_unless_.html index bdc598b56..e1728e97b 100644 --- a/zh-cn/api/modules/builtin_tags_unless_.html +++ b/zh-cn/api/modules/builtin_tags_unless_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "builtin/tags/unless"

    -
    +
    diff --git a/zh-cn/api/modules/cache_cache_.html b/zh-cn/api/modules/cache_cache_.html index c44bd92f8..8df19cf33 100644 --- a/zh-cn/api/modules/cache_cache_.html +++ b/zh-cn/api/modules/cache_cache_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "cache/cache"

    -
    +
    diff --git a/zh-cn/api/modules/cache_lru_.html b/zh-cn/api/modules/cache_lru_.html index ed222d52d..922cd441a 100644 --- a/zh-cn/api/modules/cache_lru_.html +++ b/zh-cn/api/modules/cache_lru_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "cache/lru"

    -
    +
    diff --git a/zh-cn/api/modules/context_block_mode_.html b/zh-cn/api/modules/context_block_mode_.html index f0b138f3b..6e6d53005 100644 --- a/zh-cn/api/modules/context_block_mode_.html +++ b/zh-cn/api/modules/context_block_mode_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "context/block-mode"

    -
    +
    diff --git a/zh-cn/api/modules/context_context_.html b/zh-cn/api/modules/context_context_.html index 63a5c32d2..f97216610 100644 --- a/zh-cn/api/modules/context_context_.html +++ b/zh-cn/api/modules/context_context_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "context/context"

    -
    +

    Functions

    readFirst

    readFirst(obj: Scope): any

    -

    Defined in context/context.ts:84

    +

    Defined in context/context.ts:84

    Parameters:

    @@ -109,7 +109,7 @@

    Returns: any


    readLast

    readLast(obj: Scope): any

    -

    Defined in context/context.ts:89

    +

    Defined in context/context.ts:89

    Parameters:

    @@ -126,7 +126,7 @@

    Returns: any


    readProperty

    readProperty(obj: Scope, key: string): any

    -

    Defined in context/context.ts:70

    +

    Defined in context/context.ts:70

    Parameters:

    @@ -147,7 +147,7 @@

    Returns: any


    readSize

    readSize(obj: Scope): any

    -

    Defined in context/context.ts:94

    +

    Defined in context/context.ts:94

    Parameters:

    @@ -165,7 +165,7 @@
    - +
    diff --git a/zh-cn/api/modules/context_scope_.html b/zh-cn/api/modules/context_scope_.html index 9068ca873..58c1ce3d6 100644 --- a/zh-cn/api/modules/context_scope_.html +++ b/zh-cn/api/modules/context_scope_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,16 +87,16 @@

    External module: "context/scope"

    -
    +

    Type aliases

    Scope

    Ƭ Scope: PlainObject | Drop

    -

    Defined in context/scope.ts:8

    +

    Defined in context/scope.ts:8

    - +
    diff --git a/zh-cn/api/modules/drop_blank_drop_.html b/zh-cn/api/modules/drop_blank_drop_.html index 219352da6..c42a139df 100644 --- a/zh-cn/api/modules/drop_blank_drop_.html +++ b/zh-cn/api/modules/drop_blank_drop_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "drop/blank-drop"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/drop_block_drop_.html b/zh-cn/api/modules/drop_block_drop_.html index 7275c528f..471fba755 100644 --- a/zh-cn/api/modules/drop_block_drop_.html +++ b/zh-cn/api/modules/drop_block_drop_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "drop/block-drop"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/drop_comparable_.html b/zh-cn/api/modules/drop_comparable_.html index 65c0c22cf..d9ab015ad 100644 --- a/zh-cn/api/modules/drop_comparable_.html +++ b/zh-cn/api/modules/drop_comparable_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "drop/comparable"

    -
    +

    Functions

    isComparable

    isComparable(arg: any): boolean

    -

    Defined in drop/comparable.ts:11

    +

    Defined in drop/comparable.ts:11

    Parameters:

    @@ -110,7 +110,7 @@
    - +
    diff --git a/zh-cn/api/modules/drop_drop_.html b/zh-cn/api/modules/drop_drop_.html index 6e22b8113..a930c87af 100644 --- a/zh-cn/api/modules/drop_drop_.html +++ b/zh-cn/api/modules/drop_drop_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "drop/drop"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/drop_empty_drop_.html b/zh-cn/api/modules/drop_empty_drop_.html index d84cf2c63..a0c2e1997 100644 --- a/zh-cn/api/modules/drop_empty_drop_.html +++ b/zh-cn/api/modules/drop_empty_drop_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "drop/empty-drop"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/drop_forloop_drop_.html b/zh-cn/api/modules/drop_forloop_drop_.html index e2a9f7d30..3718710ab 100644 --- a/zh-cn/api/modules/drop_forloop_drop_.html +++ b/zh-cn/api/modules/drop_forloop_drop_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "drop/forloop-drop"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/drop_null_drop_.html b/zh-cn/api/modules/drop_null_drop_.html index 86ac85c99..2500ffed9 100644 --- a/zh-cn/api/modules/drop_null_drop_.html +++ b/zh-cn/api/modules/drop_null_drop_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "drop/null-drop"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/drop_tablerowloop_drop_.html b/zh-cn/api/modules/drop_tablerowloop_drop_.html index 8f66552be..ee32a0340 100644 --- a/zh-cn/api/modules/drop_tablerowloop_drop_.html +++ b/zh-cn/api/modules/drop_tablerowloop_drop_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "drop/tablerowloop-drop"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/emitters_emitter_.html b/zh-cn/api/modules/emitters_emitter_.html new file mode 100644 index 000000000..91aff9e73 --- /dev/null +++ b/zh-cn/api/modules/emitters_emitter_.html @@ -0,0 +1,176 @@ + + + + + External module: "emitters/emitter" | LiquidJS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + \ No newline at end of file diff --git a/zh-cn/api/modules/emitters_keeping_type_emitter_.html b/zh-cn/api/modules/emitters_keeping_type_emitter_.html new file mode 100644 index 000000000..3e569a167 --- /dev/null +++ b/zh-cn/api/modules/emitters_keeping_type_emitter_.html @@ -0,0 +1,176 @@ + + + + + External module: "emitters/keeping-type-emitter" | LiquidJS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + +
    +
    + + + + + + + + + + + \ No newline at end of file diff --git a/zh-cn/api/modules/emitters_simple_emitter_.html b/zh-cn/api/modules/emitters_simple_emitter_.html new file mode 100644 index 000000000..04db68418 --- /dev/null +++ b/zh-cn/api/modules/emitters_simple_emitter_.html @@ -0,0 +1,176 @@ + + + + + External module: "emitters/simple-emitter" | LiquidJS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + +
    +
    + + + + + + + + + + + \ No newline at end of file diff --git a/zh-cn/api/modules/emitters_streamed_emitter_.html b/zh-cn/api/modules/emitters_streamed_emitter_.html new file mode 100644 index 000000000..828f86990 --- /dev/null +++ b/zh-cn/api/modules/emitters_streamed_emitter_.html @@ -0,0 +1,176 @@ + + + + + External module: "emitters/streamed-emitter" | LiquidJS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + +
    +
    + + + + + + + + + + + \ No newline at end of file diff --git a/zh-cn/api/modules/fs_browser_.html b/zh-cn/api/modules/fs_browser_.html index b833fd116..9d61f5430 100644 --- a/zh-cn/api/modules/fs_browser_.html +++ b/zh-cn/api/modules/fs_browser_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "fs/browser"

    -
    +

    Functions

    domResolve

    domResolve(root: string, path: string): string

    -

    Defined in fs/browser.ts:3

    +

    Defined in fs/browser.ts:3

    Parameters:

    @@ -113,7 +113,7 @@

    Returns: string


    exists

    exists(filepath: string): Promise‹boolean›

    -

    Defined in fs/browser.ts:56

    +

    Defined in fs/browser.ts:56

    Parameters:

    @@ -130,7 +130,7 @@

    Returns: Promise‹boolean›


    existsSync

    existsSync(filepath: string): boolean

    -

    Defined in fs/browser.ts:60

    +

    Defined in fs/browser.ts:60

    Parameters:

    @@ -147,7 +147,7 @@

    Returns: boolean


    readFile

    readFile(url: string): Promise‹string›

    -

    Defined in fs/browser.ts:28

    +

    Defined in fs/browser.ts:28

    Parameters:

    @@ -164,7 +164,7 @@

    Returns: Promise‹string›


    readFileSync

    readFileSync(url: string): string

    -

    Defined in fs/browser.ts:46

    +

    Defined in fs/browser.ts:46

    Parameters:

    @@ -181,7 +181,7 @@

    Returns: string


    resolve

    resolve(root: string, filepath: string, ext: string): string

    -

    Defined in fs/browser.ts:18

    +

    Defined in fs/browser.ts:18

    Parameters:

    @@ -207,7 +207,7 @@
    - +
    diff --git a/zh-cn/api/modules/fs_fs_.html b/zh-cn/api/modules/fs_fs_.html index ff5dc8bd2..d6c8112d2 100644 --- a/zh-cn/api/modules/fs_fs_.html +++ b/zh-cn/api/modules/fs_fs_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "fs/fs"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/fs_node_.html b/zh-cn/api/modules/fs_node_.html index ca7c1643b..3f8057a6f 100644 --- a/zh-cn/api/modules/fs_node_.html +++ b/zh-cn/api/modules/fs_node_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "fs/node"

    -
    +

    Variables

    Const readFileAsync

    readFileAsync: function = _.promisify<string, string, string>(nodeReadFile)

    -

    Defined in fs/node.ts:6

    +

    Defined in fs/node.ts:6

    Type declaration:

    ▸ (arg1: T1, arg2: T2): Promise‹T3›

    Parameters:

    @@ -113,7 +113,7 @@

    Const statAsync

    statAsync: function = _.promisify(stat)

    -

    Defined in fs/node.ts:5

    +

    Defined in fs/node.ts:5

    Type declaration:

    ▸ (arg1: T1): Promise‹T2›

    Parameters:

    @@ -129,7 +129,7 @@

    Functions

    exists

    exists(filepath: string): Promise‹boolean›

    -

    Defined in fs/node.ts:8

    +

    Defined in fs/node.ts:8

    Parameters:

    @@ -146,7 +146,7 @@

    Returns: Promise‹boolean›


    existsSync

    existsSync(filepath: string): boolean

    -

    Defined in fs/node.ts:14

    +

    Defined in fs/node.ts:14

    Parameters:

    @@ -163,7 +163,7 @@

    Returns: boolean


    fallback

    fallback(file: string): undefined | string

    -

    Defined in fs/node.ts:29

    +

    Defined in fs/node.ts:29

    Parameters:

    @@ -180,7 +180,7 @@

    Returns: undefined | string


    readFile

    readFile(filepath: string): Promise‹string›

    -

    Defined in fs/node.ts:11

    +

    Defined in fs/node.ts:11

    Parameters:

    @@ -197,7 +197,7 @@

    Returns: Promise‹string›


    readFileSync

    readFileSync(filepath: string): string

    -

    Defined in fs/node.ts:22

    +

    Defined in fs/node.ts:22

    Parameters:

    @@ -214,7 +214,7 @@

    Returns: string


    resolve

    resolve(root: string, file: string, ext: string): string

    -

    Defined in fs/node.ts:25

    +

    Defined in fs/node.ts:25

    Parameters:

    @@ -240,7 +240,7 @@
    - +
    diff --git a/zh-cn/api/modules/liquid_.html b/zh-cn/api/modules/liquid_.html index 1c4643fba..26d63ab08 100644 --- a/zh-cn/api/modules/liquid_.html +++ b/zh-cn/api/modules/liquid_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "liquid"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/liquid_options_.html b/zh-cn/api/modules/liquid_options_.html index a53c9cfb7..972182236 100644 --- a/zh-cn/api/modules/liquid_options_.html +++ b/zh-cn/api/modules/liquid_options_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "liquid-options"

    -
    +

    Functions

    applyDefault

    applyDefault(options: NormalizedOptions): NormalizedFullOptions

    -

    Defined in liquid-options.ts:133

    +

    Defined in liquid-options.ts:139

    Parameters:

    @@ -109,7 +109,7 @@

    Returns: NormalizedFullOptions


    normalize

    normalize(options?: LiquidOptions): NormalizedOptions

    -

    Defined in liquid-options.ts:115

    +

    Defined in liquid-options.ts:121

    Parameters:

    @@ -126,7 +126,7 @@

    Returns: NormalizedOptions


    normalizeStringArray

    normalizeStringArray(value: any): string[]

    -

    Defined in liquid-options.ts:137

    +

    Defined in liquid-options.ts:143

    Parameters:

    @@ -141,57 +141,83 @@

    Returns: string[]

    -

    Object literals

    Const defaultOptions

    defaultOptions: object

    Defined in liquid-options.ts:89

    +

    Object literals

    Const defaultOptions

    defaultOptions: object

    Defined in liquid-options.ts:94

    cache

    cache: undefined = undefined

    -

    Defined in liquid-options.ts:91

    +

    Defined in liquid-options.ts:96

    dynamicPartials

    dynamicPartials: true = true

    -

    Defined in liquid-options.ts:94

    +

    Defined in liquid-options.ts:99

    extname

    extname: string = “”

    -

    Defined in liquid-options.ts:92

    +

    Defined in liquid-options.ts:97

    fs

    fs: “fs/node” = fs

    -

    Defined in liquid-options.ts:93

    +

    Defined in liquid-options.ts:98

    globals

    globals: object

    -

    Defined in liquid-options.ts:109

    +

    Defined in liquid-options.ts:114

    Type declaration:

    greedy

    greedy: true = true

    -

    Defined in liquid-options.ts:100

    +

    Defined in liquid-options.ts:105

    jsTruthy

    jsTruthy: false = false

    -

    Defined in liquid-options.ts:95

    +

    Defined in liquid-options.ts:100

    keepOutputType

    keepOutputType: false = false

    -

    Defined in liquid-options.ts:110

    +

    Defined in liquid-options.ts:115

    lenientIf

    lenientIf: false = false

    -

    Defined in liquid-options.ts:108

    +

    Defined in liquid-options.ts:113

    operators

    operators: Operators = defaultOperators

    -

    Defined in liquid-options.ts:111

    +

    Defined in liquid-options.ts:117

    operatorsTrie

    operatorsTrie: Trie = createTrie(defaultOperators)

    -

    Defined in liquid-options.ts:112

    -

    outputDelimiterLeft

    outputDelimiterLeft: string = “{{“

    -

    Defined in liquid-options.ts:103

    -

    outputDelimiterRight

    outputDelimiterRight: string = “}}”

    -

    Defined in liquid-options.ts:104

    -

    preserveTimezones

    preserveTimezones: false = false

    -

    Defined in liquid-options.ts:105

    -

    root

    root: string[] = [‘.’]

    -

    Defined in liquid-options.ts:90

    -

    strictFilters

    strictFilters: false = false

    -

    Defined in liquid-options.ts:106

    -

    strictVariables

    strictVariables: false = false

    -

    Defined in liquid-options.ts:107

    -

    tagDelimiterLeft

    tagDelimiterLeft: string = “{%“

    -

    Defined in liquid-options.ts:101

    +

    Defined in liquid-options.ts:118

    +

    outputDelimiterLeft

    outputDelimiterLeft: string = “{{" + +*Defined in [liquid-options.ts:108](https://github.com/harttle/liquidjs/blob/master/src/liquid-options.ts#L108)* + +### outputDelimiterRight + +• **outputDelimiterRight**: *string* = "}}" + +*Defined in [liquid-options.ts:109](https://github.com/harttle/liquidjs/blob/master/src/liquid-options.ts#L109)* + +### preserveTimezones + +• **preserveTimezones**: *false* = false + +*Defined in [liquid-options.ts:110](https://github.com/harttle/liquidjs/blob/master/src/liquid-options.ts#L110)* + +### root + +• **root**: *string[]* = ['.'] + +*Defined in [liquid-options.ts:95](https://github.com/harttle/liquidjs/blob/master/src/liquid-options.ts#L95)* + +### strictFilters + +• **strictFilters**: *false* = false + +*Defined in [liquid-options.ts:111](https://github.com/harttle/liquidjs/blob/master/src/liquid-options.ts#L111)* + +### strictVariables + +• **strictVariables**: *false* = false + +*Defined in [liquid-options.ts:112](https://github.com/harttle/liquidjs/blob/master/src/liquid-options.ts#L112)* + +### tagDelimiterLeft + +• **tagDelimiterLeft**: *string* = "{%“

    +

    Defined in liquid-options.ts:106

    tagDelimiterRight

    tagDelimiterRight: string = “%}”

    -

    Defined in liquid-options.ts:102

    +

    Defined in liquid-options.ts:107

    +

    timezoneOffset

    timezoneOffset: number = timezoneOffset

    +

    Defined in liquid-options.ts:116

    trimOutputLeft

    trimOutputLeft: false = false

    -

    Defined in liquid-options.ts:99

    +

    Defined in liquid-options.ts:104

    trimOutputRight

    trimOutputRight: false = false

    -

    Defined in liquid-options.ts:98

    +

    Defined in liquid-options.ts:103

    trimTagLeft

    trimTagLeft: false = false

    -

    Defined in liquid-options.ts:97

    +

    Defined in liquid-options.ts:102

    trimTagRight

    trimTagRight: false = false

    -

    Defined in liquid-options.ts:96

    +

    Defined in liquid-options.ts:101

    @@ -200,7 +226,7 @@
    目录 -
    1. Functions
      1. applyDefault
      2. normalize
      3. normalizeStringArray
    2. Object literals
      1. Const defaultOptions
      2. ▪ defaultOptions: object
      3. cache
      4. dynamicPartials
      5. extname
      6. fs
      7. globals
        1. Type declaration:
      8. greedy
      9. jsTruthy
      10. keepOutputType
      11. lenientIf
      12. operators
      13. operatorsTrie
      14. outputDelimiterLeft
      15. outputDelimiterRight
      16. preserveTimezones
      17. root
      18. strictFilters
      19. strictVariables
      20. tagDelimiterLeft
      21. tagDelimiterRight
      22. trimOutputLeft
      23. trimOutputRight
      24. trimTagLeft
      25. trimTagRight
    +
    1. Functions
      1. applyDefault
      2. normalize
      3. normalizeStringArray
    2. Object literals
      1. Const defaultOptions
      2. ▪ defaultOptions: object
      3. cache
      4. dynamicPartials
      5. extname
      6. fs
      7. globals
        1. Type declaration:
      8. greedy
      9. jsTruthy
      10. keepOutputType
      11. lenientIf
      12. operators
      13. operatorsTrie
      14. outputDelimiterLeft
      15. tagDelimiterRight
      16. timezoneOffset
      17. trimOutputLeft
      18. trimOutputRight
      19. trimTagLeft
      20. trimTagRight
    回到顶部
    diff --git a/zh-cn/api/modules/parser_filter_arg_.html b/zh-cn/api/modules/parser_filter_arg_.html index 880a411cd..2a6e77960 100644 --- a/zh-cn/api/modules/parser_filter_arg_.html +++ b/zh-cn/api/modules/parser_filter_arg_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,17 +87,17 @@

    External module: "parser/filter-arg"

    -
    +

    Type aliases

    FilterArg

    Ƭ FilterArg: ValueToken | KeyValuePair

    -

    Defined in parser/filter-arg.ts:6

    +

    Defined in parser/filter-arg.ts:6


    KeyValuePair

    Ƭ KeyValuePair: [undefined | string, undefined | QuotedToken | PropertyAccessToken | LiteralToken | RangeToken]

    -

    Defined in parser/filter-arg.ts:4

    +

    Defined in parser/filter-arg.ts:4

    Functions

    isKeyValuePair

    isKeyValuePair(arr: FilterArg): boolean

    -

    Defined in parser/filter-arg.ts:8

    +

    Defined in parser/filter-arg.ts:8

    Parameters:

    @@ -115,7 +115,7 @@
    - +
    diff --git a/zh-cn/api/modules/parser_match_operator_.html b/zh-cn/api/modules/parser_match_operator_.html index 12082b995..ba365786d 100644 --- a/zh-cn/api/modules/parser_match_operator_.html +++ b/zh-cn/api/modules/parser_match_operator_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "parser/match-operator"

    -
    +

    Functions

    matchOperator

    matchOperator(str: string, begin: number, trie: Trie, end: number): number

    -

    Defined in parser/match-operator.ts:4

    +

    Defined in parser/match-operator.ts:4

    Parameters:

    @@ -127,7 +127,7 @@
    - +
    diff --git a/zh-cn/api/modules/parser_parse_stream_.html b/zh-cn/api/modules/parser_parse_stream_.html index 2405f63d3..313674a0a 100644 --- a/zh-cn/api/modules/parser_parse_stream_.html +++ b/zh-cn/api/modules/parser_parse_stream_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "parser/parse-stream"

    -
    +

    Type aliases

    ParseToken

    Ƭ ParseToken: function

    -

    Defined in parser/parse-stream.ts:6

    +

    Defined in parser/parse-stream.ts:6

    Type declaration:

    ▸ (token: T, remainTokens: T[]): Template

    Parameters:

    @@ -114,7 +114,7 @@
    - +
    diff --git a/zh-cn/api/modules/parser_parse_string_literal_.html b/zh-cn/api/modules/parser_parse_string_literal_.html index 332ab49d4..3558695ec 100644 --- a/zh-cn/api/modules/parser_parse_string_literal_.html +++ b/zh-cn/api/modules/parser_parse_string_literal_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,17 +87,17 @@

    External module: "parser/parse-string-literal"

    -
    +

    Variables

    Const rHex

    rHex: RegExp = /[\da-fA-F]/

    -

    Defined in parser/parse-string-literal.ts:1

    +

    Defined in parser/parse-string-literal.ts:1


    Const rOct

    rOct: RegExp = /[0-7]/

    -

    Defined in parser/parse-string-literal.ts:2

    +

    Defined in parser/parse-string-literal.ts:2

    Functions

    hexVal

    hexVal(c: string): number

    -

    Defined in parser/parse-string-literal.ts:12

    +

    Defined in parser/parse-string-literal.ts:12

    Parameters:

    @@ -114,7 +114,7 @@

    Returns: number


    parseStringLiteral

    parseStringLiteral(str: string): string

    -

    Defined in parser/parse-string-literal.ts:19

    +

    Defined in parser/parse-string-literal.ts:19

    Parameters:

    @@ -129,23 +129,23 @@

    Returns: string

    -

    Object literals

    Const escapeChar

    escapeChar: object

    Defined in parser/parse-string-literal.ts:3

    +

    Object literals

    Const escapeChar

    escapeChar: object

    Defined in parser/parse-string-literal.ts:3

    b

    b: string = “”

    -

    Defined in parser/parse-string-literal.ts:4

    +

    Defined in parser/parse-string-literal.ts:4

    f

    f: string = “ “

    -

    Defined in parser/parse-string-literal.ts:5

    +

    Defined in parser/parse-string-literal.ts:5

    n

    n: string = “

    -

    Defined in parser/parse-string-literal.ts:6

    +

    Defined in parser/parse-string-literal.ts:6

    r

    r: string = “

    -

    Defined in parser/parse-string-literal.ts:7

    +

    Defined in parser/parse-string-literal.ts:7

    t

    t: string = “ “

    -

    Defined in parser/parse-string-literal.ts:8

    +

    Defined in parser/parse-string-literal.ts:8

    v

    v: string = “ “

    -

    Defined in parser/parse-string-literal.ts:9

    +

    Defined in parser/parse-string-literal.ts:9

    @@ -154,7 +154,7 @@
    目录 -
    1. Variables
      1. Const rHex
      2. Const rOct
    2. Functions
      1. hexVal
      2. parseStringLiteral
    3. Object literals
      1. Const escapeChar
      2. ▪ escapeChar: object
      3. b
      4. f
      5. n
      6. r
      7. t
      8. v
    +
    1. Variables
      1. Const rHex
      2. Const rOct
    2. Functions
      1. hexVal
      2. parseStringLiteral
    3. Object literals
      1. Const escapeChar
      2. ▪ escapeChar: object
      3. b
      4. f
      5. n
      6. r
      7. t
      8. v
    回到顶部
    diff --git a/zh-cn/api/modules/parser_parser_.html b/zh-cn/api/modules/parser_parser_.html index db86be0b8..0328c0c55 100644 --- a/zh-cn/api/modules/parser_parser_.html +++ b/zh-cn/api/modules/parser_parser_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "parser/parser"

    -
    +
    diff --git a/zh-cn/api/modules/parser_token_kind_.html b/zh-cn/api/modules/parser_token_kind_.html index 6e0532966..e1f18c701 100644 --- a/zh-cn/api/modules/parser_token_kind_.html +++ b/zh-cn/api/modules/parser_token_kind_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "parser/token-kind"

    -
    +
    diff --git a/zh-cn/api/modules/parser_tokenizer_.html b/zh-cn/api/modules/parser_tokenizer_.html index 097afabc4..31215e631 100644 --- a/zh-cn/api/modules/parser_tokenizer_.html +++ b/zh-cn/api/modules/parser_tokenizer_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "parser/tokenizer"

    -
    +
    diff --git a/zh-cn/api/modules/parser_whitespace_ctrl_.html b/zh-cn/api/modules/parser_whitespace_ctrl_.html index 77cdafbbc..25e17eb04 100644 --- a/zh-cn/api/modules/parser_whitespace_ctrl_.html +++ b/zh-cn/api/modules/parser_whitespace_ctrl_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "parser/whitespace-ctrl"

    -
    +

    Functions

    trimLeft

    trimLeft(token: Token, greedy: boolean): void

    -

    Defined in parser/whitespace-ctrl.ts:27

    +

    Defined in parser/whitespace-ctrl.ts:27

    Parameters:

    @@ -113,7 +113,7 @@

    Returns: void


    trimRight

    trimRight(token: Token, greedy: boolean): void

    -

    Defined in parser/whitespace-ctrl.ts:34

    +

    Defined in parser/whitespace-ctrl.ts:34

    Parameters:

    @@ -134,7 +134,7 @@

    Returns: void


    whiteSpaceCtrl

    whiteSpaceCtrl(tokens: Token[], options: NormalizedFullOptions): void

    -

    Defined in parser/whitespace-ctrl.ts:6

    +

    Defined in parser/whitespace-ctrl.ts:6

    Parameters:

    @@ -156,7 +156,7 @@
    - +
    diff --git a/zh-cn/api/modules/render_boolean_.html b/zh-cn/api/modules/render_boolean_.html index f57411799..51adc1afe 100644 --- a/zh-cn/api/modules/render_boolean_.html +++ b/zh-cn/api/modules/render_boolean_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "render/boolean"

    -
    +

    Functions

    isFalsy

    isFalsy(val: any, ctx: Context): boolean

    -

    Defined in render/boolean.ts:7

    +

    Defined in render/boolean.ts:7

    Parameters:

    @@ -113,7 +113,7 @@

    Returns: boolean


    isTruthy

    isTruthy(val: any, ctx: Context): boolean

    -

    Defined in render/boolean.ts:3

    +

    Defined in render/boolean.ts:3

    Parameters:

    @@ -135,7 +135,7 @@
    - +
    diff --git a/zh-cn/api/modules/render_emitter_.html b/zh-cn/api/modules/render_emitter_.html index ec9fc6674..36e2ab6a0 100644 --- a/zh-cn/api/modules/render_emitter_.html +++ b/zh-cn/api/modules/render_emitter_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "render/emitter"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/render_expression_.html b/zh-cn/api/modules/render_expression_.html index 989265ca4..c2246b946 100644 --- a/zh-cn/api/modules/render_expression_.html +++ b/zh-cn/api/modules/render_expression_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "render/expression"

    -
    +

    Functions

    evalLiteralToken

    evalLiteralToken(token: LiteralToken): any

    -

    Defined in render/expression.ts:74

    +

    Defined in render/expression.ts:73

    Parameters:

    @@ -109,7 +109,7 @@

    Returns: any


    evalNumberToken

    evalNumberToken(token: NumberToken): number

    -

    Defined in render/expression.ts:60

    +

    Defined in render/expression.ts:59

    Parameters:

    @@ -126,7 +126,7 @@

    Returns: number


    evalOperatorToken

    evalOperatorToken(operators: Operators, token: OperatorToken, lhs: any, rhs: any, ctx: Context): boolean

    -

    Defined in render/expression.ts:69

    +

    Defined in render/expression.ts:68

    Parameters:

    @@ -159,7 +159,7 @@

    Returns: boolean


    evalPropertyAccessToken

    evalPropertyAccessToken(token: PropertyAccessToken, ctx: Context, lenient: boolean): null | object

    -

    Defined in render/expression.ts:49

    +

    Defined in render/expression.ts:49

    Parameters:

    @@ -184,7 +184,7 @@

    Returns: null | object


    evalQuotedToken

    evalQuotedToken(token: QuotedToken): string

    -

    Defined in render/expression.ts:65

    +

    Defined in render/expression.ts:64

    Parameters:

    @@ -201,7 +201,7 @@

    Returns: string


    evalRangeToken

    evalRangeToken(token: RangeToken, ctx: Context): number[]

    -

    Defined in render/expression.ts:78

    +

    Defined in render/expression.ts:77

    Parameters:

    @@ -222,7 +222,7 @@

    Returns: number[]


    evalToken

    evalToken(token: Token | undefined, ctx: Context, lenient: boolean): any

    -

    Defined in render/expression.ts:40

    +

    Defined in render/expression.ts:40

    Parameters:

    @@ -251,7 +251,7 @@

    Returns: any


    toPostfix

    toPostfix(tokens: IterableIterator‹Token›): IterableIterator‹Token

    -

    Defined in render/expression.ts:84

    +

    Defined in render/expression.ts:83

    Parameters:

    @@ -269,7 +269,7 @@
    - +
    diff --git a/zh-cn/api/modules/render_operator_.html b/zh-cn/api/modules/render_operator_.html index e80487faf..8bd72177d 100644 --- a/zh-cn/api/modules/render_operator_.html +++ b/zh-cn/api/modules/render_operator_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,13 +87,13 @@

    External module: "render/operator"

    -
    +
    -

    Object literals

    Const defaultOperators

    defaultOperators: object

    Defined in render/operator.ts:10

    +

    Object literals

    Const defaultOperators

    defaultOperators: object

    Defined in render/operator.ts:10

    !=

    !=(l: any, r: any): boolean

    -

    Defined in render/operator.ts:16

    +

    Defined in render/operator.ts:16

    Parameters:

    @@ -113,7 +113,7 @@

    Returns: boolean

    <

    <(l: any, r: any): boolean

    -

    Defined in render/operator.ts:26

    +

    Defined in render/operator.ts:26

    Parameters:

    @@ -133,7 +133,7 @@

    Returns: boolean

    <=

    <=(l: any, r: any): boolean

    -

    Defined in render/operator.ts:36

    +

    Defined in render/operator.ts:36

    Parameters:

    @@ -153,7 +153,7 @@

    Returns: boolean

    ==

    ==(l: any, r: any): boolean

    -

    Defined in render/operator.ts:11

    +

    Defined in render/operator.ts:11

    Parameters:

    @@ -173,7 +173,7 @@

    Returns: boolean

    >

    >(l: any, r: any): boolean

    -

    Defined in render/operator.ts:21

    +

    Defined in render/operator.ts:21

    Parameters:

    @@ -193,7 +193,7 @@

    Returns: boolean

    >=

    >=(l: any, r: any): boolean

    -

    Defined in render/operator.ts:31

    +

    Defined in render/operator.ts:31

    Parameters:

    @@ -213,7 +213,7 @@

    Returns: boolean

    and

    and(l: any, r: any, ctx: Context): boolean

    -

    Defined in render/operator.ts:44

    +

    Defined in render/operator.ts:44

    Parameters:

    @@ -237,7 +237,7 @@

    Returns: boolean

    contains

    contains(l: any, r: any): boolean

    -

    Defined in render/operator.ts:41

    +

    Defined in render/operator.ts:41

    Parameters:

    @@ -257,7 +257,7 @@

    Returns: boolean

    or

    or(l: any, r: any, ctx: Context): boolean

    -

    Defined in render/operator.ts:45

    +

    Defined in render/operator.ts:45

    Parameters:

    @@ -283,7 +283,7 @@
    - +
    @@ -292,7 +292,7 @@
    目录 -
    1. Object literals
      1. Const defaultOperators
      2. ▪ defaultOperators: object
      3. !=
      4. <
      5. <=
      6. ==
      7. >
      8. >=
      9. and
      10. contains
      11. or
    +
    1. Object literals
      1. Const defaultOperators
      2. ▪ defaultOperators: object
      3. !=
      4. <
      5. <=
      6. ==
      7. >
      8. >=
      9. and
      10. contains
      11. or
    回到顶部
    diff --git a/zh-cn/api/modules/render_render_.html b/zh-cn/api/modules/render_render_.html index 174012a7a..c950c0560 100644 --- a/zh-cn/api/modules/render_render_.html +++ b/zh-cn/api/modules/render_render_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "render/render"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/template_filter_filter_.html b/zh-cn/api/modules/template_filter_filter_.html index a87112b1e..0c48f1146 100644 --- a/zh-cn/api/modules/template_filter_filter_.html +++ b/zh-cn/api/modules/template_filter_filter_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/filter/filter"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/template_filter_filter_impl_.html b/zh-cn/api/modules/template_filter_filter_impl_.html index 65bf99b44..333156d5b 100644 --- a/zh-cn/api/modules/template_filter_filter_impl_.html +++ b/zh-cn/api/modules/template_filter_filter_impl_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/filter/filter-impl"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/template_filter_filter_impl_options_.html b/zh-cn/api/modules/template_filter_filter_impl_options_.html index eeceefa08..879240434 100644 --- a/zh-cn/api/modules/template_filter_filter_impl_options_.html +++ b/zh-cn/api/modules/template_filter_filter_impl_options_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/filter/filter-impl-options"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/template_filter_filter_map_.html b/zh-cn/api/modules/template_filter_filter_map_.html index a30d17913..6a1dab46a 100644 --- a/zh-cn/api/modules/template_filter_filter_map_.html +++ b/zh-cn/api/modules/template_filter_filter_map_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/filter/filter-map"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/template_html_.html b/zh-cn/api/modules/template_html_.html index 3b12d1052..939b7991e 100644 --- a/zh-cn/api/modules/template_html_.html +++ b/zh-cn/api/modules/template_html_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/html"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/template_output_.html b/zh-cn/api/modules/template_output_.html index 3a65133cd..6ca3568b0 100644 --- a/zh-cn/api/modules/template_output_.html +++ b/zh-cn/api/modules/template_output_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/output"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/template_tag_hash_.html b/zh-cn/api/modules/template_tag_hash_.html index 78830e4a4..73db8c01c 100644 --- a/zh-cn/api/modules/template_tag_hash_.html +++ b/zh-cn/api/modules/template_tag_hash_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/tag/hash"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/template_tag_tag_.html b/zh-cn/api/modules/template_tag_tag_.html index 02884b241..4feaa47a9 100644 --- a/zh-cn/api/modules/template_tag_tag_.html +++ b/zh-cn/api/modules/template_tag_tag_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/tag/tag"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/template_tag_tag_impl_.html b/zh-cn/api/modules/template_tag_tag_impl_.html index 376266d41..a9c487631 100644 --- a/zh-cn/api/modules/template_tag_tag_impl_.html +++ b/zh-cn/api/modules/template_tag_tag_impl_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/tag/tag-impl"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/template_tag_tag_impl_options_.html b/zh-cn/api/modules/template_tag_tag_impl_options_.html index a8244aec1..a2c2ee41c 100644 --- a/zh-cn/api/modules/template_tag_tag_impl_options_.html +++ b/zh-cn/api/modules/template_tag_tag_impl_options_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/tag/tag-impl-options"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/template_tag_tag_map_.html b/zh-cn/api/modules/template_tag_tag_map_.html index acc91c77a..6ac5661d2 100644 --- a/zh-cn/api/modules/template_tag_tag_map_.html +++ b/zh-cn/api/modules/template_tag_tag_map_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/tag/tag-map"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/template_template_.html b/zh-cn/api/modules/template_template_.html index 2a1210b67..ae094bd2e 100644 --- a/zh-cn/api/modules/template_template_.html +++ b/zh-cn/api/modules/template_template_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/template"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/template_template_impl_.html b/zh-cn/api/modules/template_template_impl_.html index a5639ab9a..90947acfc 100644 --- a/zh-cn/api/modules/template_template_impl_.html +++ b/zh-cn/api/modules/template_template_impl_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/template-impl"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/template_value_.html b/zh-cn/api/modules/template_value_.html index a7783b516..9676a1a4f 100644 --- a/zh-cn/api/modules/template_value_.html +++ b/zh-cn/api/modules/template_value_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "template/value"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/tokens_delimited_token_.html b/zh-cn/api/modules/tokens_delimited_token_.html index 586836604..9c2172f2f 100644 --- a/zh-cn/api/modules/tokens_delimited_token_.html +++ b/zh-cn/api/modules/tokens_delimited_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/delimited-token"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/tokens_filter_token_.html b/zh-cn/api/modules/tokens_filter_token_.html index 9b527b57c..3b0dbc6b3 100644 --- a/zh-cn/api/modules/tokens_filter_token_.html +++ b/zh-cn/api/modules/tokens_filter_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/filter-token"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/tokens_hash_token_.html b/zh-cn/api/modules/tokens_hash_token_.html index 2c974de2a..d1005affb 100644 --- a/zh-cn/api/modules/tokens_hash_token_.html +++ b/zh-cn/api/modules/tokens_hash_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/hash-token"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/tokens_html_token_.html b/zh-cn/api/modules/tokens_html_token_.html index 0f133c236..65d1a3ee3 100644 --- a/zh-cn/api/modules/tokens_html_token_.html +++ b/zh-cn/api/modules/tokens_html_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/html-token"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/tokens_identifier_token_.html b/zh-cn/api/modules/tokens_identifier_token_.html index 5ccbbea09..d040ea925 100644 --- a/zh-cn/api/modules/tokens_identifier_token_.html +++ b/zh-cn/api/modules/tokens_identifier_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/identifier-token"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/tokens_literal_token_.html b/zh-cn/api/modules/tokens_literal_token_.html index 31865c7a9..d7b784b47 100644 --- a/zh-cn/api/modules/tokens_literal_token_.html +++ b/zh-cn/api/modules/tokens_literal_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/literal-token"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/tokens_number_token_.html b/zh-cn/api/modules/tokens_number_token_.html index 918e99b56..f6e71e970 100644 --- a/zh-cn/api/modules/tokens_number_token_.html +++ b/zh-cn/api/modules/tokens_number_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/number-token"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/tokens_operator_token_.html b/zh-cn/api/modules/tokens_operator_token_.html index f5b7d5e76..16e8e6cef 100644 --- a/zh-cn/api/modules/tokens_operator_token_.html +++ b/zh-cn/api/modules/tokens_operator_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,33 +87,33 @@

    External module: "tokens/operator-token"

    -
    +
    -

    Object literals

    Const precedence

    precedence: object

    Defined in tokens/operator-token.ts:4

    +

    Object literals

    Const precedence

    precedence: object

    Defined in tokens/operator-token.ts:4

    !=

    !=: number = 1

    -

    Defined in tokens/operator-token.ts:6

    +

    Defined in tokens/operator-token.ts:6

    <

    <: number = 1

    -

    Defined in tokens/operator-token.ts:8

    +

    Defined in tokens/operator-token.ts:8

    <=

    <=: number = 1

    -

    Defined in tokens/operator-token.ts:10

    +

    Defined in tokens/operator-token.ts:10

    ==

    ==: number = 1

    -

    Defined in tokens/operator-token.ts:5

    +

    Defined in tokens/operator-token.ts:5

    >

    >: number = 1

    -

    Defined in tokens/operator-token.ts:7

    +

    Defined in tokens/operator-token.ts:7

    >=

    >=: number = 1

    -

    Defined in tokens/operator-token.ts:9

    +

    Defined in tokens/operator-token.ts:9

    and

    and: number = 0

    -

    Defined in tokens/operator-token.ts:12

    +

    Defined in tokens/operator-token.ts:12

    contains

    contains: number = 1

    -

    Defined in tokens/operator-token.ts:11

    +

    Defined in tokens/operator-token.ts:11

    or

    or: number = 0

    -

    Defined in tokens/operator-token.ts:13

    +

    Defined in tokens/operator-token.ts:13

    - +
    @@ -122,7 +122,7 @@
    目录 -
    1. Object literals
      1. Const precedence
      2. ▪ precedence: object
      3. !=
      4. <
      5. <=
      6. ==
      7. >
      8. >=
      9. and
      10. contains
      11. or
    +
    1. Object literals
      1. Const precedence
      2. ▪ precedence: object
      3. !=
      4. <
      5. <=
      6. ==
      7. >
      8. >=
      9. and
      10. contains
      11. or
    回到顶部
    diff --git a/zh-cn/api/modules/tokens_output_token_.html b/zh-cn/api/modules/tokens_output_token_.html index 10ab9b8dd..930109d43 100644 --- a/zh-cn/api/modules/tokens_output_token_.html +++ b/zh-cn/api/modules/tokens_output_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/output-token"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/tokens_property_access_token_.html b/zh-cn/api/modules/tokens_property_access_token_.html index f764c05e8..d22e50993 100644 --- a/zh-cn/api/modules/tokens_property_access_token_.html +++ b/zh-cn/api/modules/tokens_property_access_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/property-access-token"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/tokens_quoted_token_.html b/zh-cn/api/modules/tokens_quoted_token_.html index 7797c8b37..7af88bb9e 100644 --- a/zh-cn/api/modules/tokens_quoted_token_.html +++ b/zh-cn/api/modules/tokens_quoted_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/quoted-token"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/tokens_range_token_.html b/zh-cn/api/modules/tokens_range_token_.html index c54ced66b..ad45d2e77 100644 --- a/zh-cn/api/modules/tokens_range_token_.html +++ b/zh-cn/api/modules/tokens_range_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/range-token"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/tokens_tag_token_.html b/zh-cn/api/modules/tokens_tag_token_.html index af8fbc86a..e40712fce 100644 --- a/zh-cn/api/modules/tokens_tag_token_.html +++ b/zh-cn/api/modules/tokens_tag_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/tag-token"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/tokens_token_.html b/zh-cn/api/modules/tokens_token_.html index 5ca077002..9a5c0ba87 100644 --- a/zh-cn/api/modules/tokens_token_.html +++ b/zh-cn/api/modules/tokens_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "tokens/token"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/tokens_toplevel_token_.html b/zh-cn/api/modules/tokens_toplevel_token_.html index f8cd204d8..8e2385401 100644 --- a/zh-cn/api/modules/tokens_toplevel_token_.html +++ b/zh-cn/api/modules/tokens_toplevel_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,16 +87,16 @@

    External module: "tokens/toplevel-token"

    -
    +

    Type aliases

    TopLevelToken

    Ƭ TopLevelToken: TagToken | OutputToken | HTMLToken

    -

    Defined in tokens/toplevel-token.ts:5

    +

    Defined in tokens/toplevel-token.ts:5

    - +
    diff --git a/zh-cn/api/modules/tokens_value_token_.html b/zh-cn/api/modules/tokens_value_token_.html index df5321287..6a608d682 100644 --- a/zh-cn/api/modules/tokens_value_token_.html +++ b/zh-cn/api/modules/tokens_value_token_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,16 +87,16 @@

    External module: "tokens/value-token"

    -
    +

    Type aliases

    ValueToken

    Ƭ ValueToken: RangeToken | LiteralToken | QuotedToken | PropertyAccessToken

    -

    Defined in tokens/value-token.ts:6

    +

    Defined in tokens/value-token.ts:6

    - +
    diff --git a/zh-cn/api/modules/types_.html b/zh-cn/api/modules/types_.html index bffc1efed..918ad3fdf 100644 --- a/zh-cn/api/modules/types_.html +++ b/zh-cn/api/modules/types_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,14 +87,14 @@

    External module: "types"

    -
    +
    - +
    diff --git a/zh-cn/api/modules/util_assert_.html b/zh-cn/api/modules/util_assert_.html index 417123c3a..77a0441e0 100644 --- a/zh-cn/api/modules/util_assert_.html +++ b/zh-cn/api/modules/util_assert_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "util/assert"

    -
    +

    Functions

    assert

    assert<T>(predicate: T | null | undefined, message?: undefined | function): void

    -

    Defined in util/assert.ts:3

    +

    Defined in util/assert.ts:3

    Type parameters:

    T

    Parameters:

    @@ -116,7 +116,7 @@
    - +
    diff --git a/zh-cn/api/modules/util_async_.html b/zh-cn/api/modules/util_async_.html index d7d98d6f1..e1e386448 100644 --- a/zh-cn/api/modules/util_async_.html +++ b/zh-cn/api/modules/util_async_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "util/async"

    -
    +

    Type aliases

    resolver

    Ƭ resolver: function

    -

    Defined in util/async.ts:3

    +

    Defined in util/async.ts:3

    Type declaration:

    ▸ (x?: any): any

    Parameters:

    @@ -108,7 +108,7 @@

    Functions

    createRejectedThenable

    createRejectedThenable(err: Error): Thenable

    -

    Defined in util/async.ts:18

    +

    Defined in util/async.ts:18

    Parameters:

    @@ -125,7 +125,7 @@

    Returns: Thenable


    createResolvedThenable

    createResolvedThenable(value: any): Thenable

    -

    Defined in util/async.ts:10

    +

    Defined in util/async.ts:10

    Parameters:

    @@ -142,7 +142,7 @@

    Returns: Thenable


    isAsyncIterator

    isAsyncIterator(val: any): boolean

    -

    Defined in util/async.ts:33

    +

    Defined in util/async.ts:33

    Parameters:

    @@ -159,7 +159,7 @@

    Returns: boolean


    isThenable

    isThenable(val: any): boolean

    -

    Defined in util/async.ts:29

    +

    Defined in util/async.ts:29

    Parameters:

    @@ -176,7 +176,7 @@

    Returns: boolean


    toPromise

    toPromise(val: IterableIterator‹any› | Thenable | any): Promise‹any›

    -

    Defined in util/async.ts:65

    +

    Defined in util/async.ts:65

    Parameters:

    @@ -193,7 +193,7 @@

    Returns: Promise‹any›


    toThenable

    toThenable(val: IterableIterator‹any› | Thenable | any): Thenable

    -

    Defined in util/async.ts:38

    +

    Defined in util/async.ts:38

    Parameters:

    @@ -210,7 +210,7 @@

    Returns: Thenable


    toValue

    toValue(val: IterableIterator‹any› | Thenable | any): any

    -

    Defined in util/async.ts:70

    +

    Defined in util/async.ts:70

    Parameters:

    @@ -228,7 +228,7 @@
    - +
    diff --git a/zh-cn/api/modules/util_character_.html b/zh-cn/api/modules/util_character_.html index 37e23dcd2..e38055818 100644 --- a/zh-cn/api/modules/util_character_.html +++ b/zh-cn/api/modules/util_character_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,37 +87,37 @@

    External module: "util/character"

    -
    +

    Variables

    Const BLANK

    BLANK: 4 = 4

    -

    Defined in util/character.ts:8

    +

    Defined in util/character.ts:8


    Const IDENTIFIER

    IDENTIFIER: 1 = 1

    -

    Defined in util/character.ts:6

    +

    Defined in util/character.ts:6


    Const INLINE_BLANK

    INLINE_BLANK: 16 = 16

    -

    Defined in util/character.ts:10

    +

    Defined in util/character.ts:10


    Const NUMBER

    NUMBER: 32 = 32

    -

    Defined in util/character.ts:11

    +

    Defined in util/character.ts:11


    Const OPERATOR

    OPERATOR: 2 = 2

    -

    Defined in util/character.ts:7

    +

    Defined in util/character.ts:7


    Const QUOTE

    QUOTE: 8 = 8

    -

    Defined in util/character.ts:9

    +

    Defined in util/character.ts:9


    Const SIGN

    SIGN: 64 = 64

    -

    Defined in util/character.ts:12

    +

    Defined in util/character.ts:12


    Const TYPES

    TYPES: number[] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 4, 4, 4, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 2, 8, 0, 0, 0, 0, 8, 0, 0, 0, 64, 0, 65, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 0, 2, 2, 2, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]

    -

    Defined in util/character.ts:5

    +

    Defined in util/character.ts:5

    - +
    diff --git a/zh-cn/api/modules/util_collection_.html b/zh-cn/api/modules/util_collection_.html index 36ad92bb9..9c0b8ebf1 100644 --- a/zh-cn/api/modules/util_collection_.html +++ b/zh-cn/api/modules/util_collection_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "util/collection"

    -
    +

    Functions

    toArray

    toArray(val: any): any[]

    -

    Defined in util/collection.ts:10

    +

    Defined in util/collection.ts:10

    Parameters:

    @@ -109,7 +109,7 @@

    Returns: any[]


    toEnumerable

    toEnumerable(val: any): any[]

    -

    Defined in util/collection.ts:3

    +

    Defined in util/collection.ts:3

    Parameters:

    @@ -127,7 +127,7 @@
    - +
    diff --git a/zh-cn/api/modules/util_error_.html b/zh-cn/api/modules/util_error_.html index 10a0846e7..1cf9821ea 100644 --- a/zh-cn/api/modules/util_error_.html +++ b/zh-cn/api/modules/util_error_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "util/error"

    -
    +

    Functions

    mkContext

    mkContext(token: Token): string

    -

    Defined in util/error.ts:82

    +

    Defined in util/error.ts:82

    Parameters:

    @@ -109,7 +109,7 @@

    Returns: string


    mkMessage

    mkMessage(msg: string, token: Token): string

    -

    Defined in util/error.ts:101

    +

    Defined in util/error.ts:101

    Parameters:

    @@ -131,7 +131,7 @@
    - +
    diff --git a/zh-cn/api/modules/util_literal_.html b/zh-cn/api/modules/util_literal_.html index 03242bbe1..dbb93ae8a 100644 --- a/zh-cn/api/modules/util_literal_.html +++ b/zh-cn/api/modules/util_literal_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,29 +87,29 @@

    External module: "util/literal"

    -
    +

    Variables

    Const nil

    nil: NullDrop = new NullDrop()

    -

    Defined in util/literal.ts:5

    -

    Object literals

    Const literalValues

    literalValues: object

    Defined in util/literal.ts:6

    +

    Defined in util/literal.ts:5

    +

    Object literals

    Const literalValues

    literalValues: object

    Defined in util/literal.ts:6

    blank

    blank: BlankDrop = new BlankDrop()

    -

    Defined in util/literal.ts:12

    +

    Defined in util/literal.ts:12

    empty

    empty: EmptyDrop = new EmptyDrop()

    -

    Defined in util/literal.ts:11

    +

    Defined in util/literal.ts:11

    false

    false: boolean = false

    -

    Defined in util/literal.ts:8

    +

    Defined in util/literal.ts:8

    nil

    nil: NullDrop = nil

    -

    Defined in util/literal.ts:9

    +

    Defined in util/literal.ts:9

    null

    null: NullDrop = nil

    -

    Defined in util/literal.ts:10

    +

    Defined in util/literal.ts:10

    true

    true: boolean = true

    -

    Defined in util/literal.ts:7

    +

    Defined in util/literal.ts:7

    - +
    @@ -118,7 +118,7 @@
    目录 -
    1. Variables
      1. Const nil
    2. Object literals
      1. Const literalValues
      2. ▪ literalValues: object
      3. blank
      4. empty
      5. false
      6. nil
      7. null
      8. true
    +
    1. Variables
      1. Const nil
    2. Object literals
      1. Const literalValues
      2. ▪ literalValues: object
      3. blank
      4. empty
      5. false
      6. nil
      7. null
      8. true
    回到顶部
    diff --git a/zh-cn/api/modules/util_operator_trie_.html b/zh-cn/api/modules/util_operator_trie_.html index e48c5cfcc..29a46537e 100644 --- a/zh-cn/api/modules/util_operator_trie_.html +++ b/zh-cn/api/modules/util_operator_trie_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "util/operator-trie"

    -
    +

    Functions

    createTrie

    createTrie(operators: Operators): Trie

    -

    Defined in util/operator-trie.ts:8

    +

    Defined in util/operator-trie.ts:8

    Parameters:

    @@ -110,7 +110,7 @@
    - +
    diff --git a/zh-cn/api/modules/util_strftime_.html b/zh-cn/api/modules/util_strftime_.html index df6549cc3..adf175f28 100644 --- a/zh-cn/api/modules/util_strftime_.html +++ b/zh-cn/api/modules/util_strftime_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,26 +87,32 @@

    External module: "util/strftime"

    -
    +
    -

    Variables

    Const dayNames

    dayNames: string[] = [
    ‘Sunday’, ‘Monday’, ‘Tuesday’, ‘Wednesday’, ‘Thursday’, ‘Friday’, ‘Saturday’
    ]

    -

    Defined in util/strftime.ts:8

    +

    Variables

    Const ISO8601_TIMEZONE_PATTERN

    ISO8601_TIMEZONE_PATTERN: RegExp = /([zZ]|([+-])(\d{2}):(\d{2}))$/

    +

    Defined in util/strftime.ts:4

    +
    +

    Const dayNames

    dayNames: string[] = [
    ‘Sunday’, ‘Monday’, ‘Tuesday’, ‘Wednesday’, ‘Thursday’, ‘Friday’, ‘Saturday’
    ]

    +

    Defined in util/strftime.ts:10


    Const dayNamesShort

    dayNamesShort: string[] = dayNames.map(abbr)

    -

    Defined in util/strftime.ts:12

    +

    Defined in util/strftime.ts:14


    Const monthNames

    monthNames: string[] = [
    ‘January’, ‘February’, ‘March’, ‘April’, ‘May’, ‘June’, ‘July’, ‘August’,
    ‘September’, ‘October’, ‘November’, ‘December’
    ]

    -

    Defined in util/strftime.ts:4

    +

    Defined in util/strftime.ts:6


    Const monthNamesShort

    monthNamesShort: string[] = monthNames.map(abbr)

    -

    Defined in util/strftime.ts:11

    +

    Defined in util/strftime.ts:13


    Const rFormat

    rFormat: RegExp = /%([-_0^#:]+)?(\d+)?([EO])?(.)/

    -

    Defined in util/strftime.ts:3

    +

    Defined in util/strftime.ts:5

    +
    +

    Const timezoneOffset

    timezoneOffset: number = new Date().getTimezoneOffset()

    +

    Defined in util/strftime.ts:3

    Functions

    abbr

    abbr(str: string): string

    -

    Defined in util/strftime.ts:25

    +

    Defined in util/strftime.ts:27

    Parameters:

    @@ -123,7 +129,7 @@

    Returns: string


    century

    century(d: Date): number

    -

    Defined in util/strftime.ts:58

    +

    Defined in util/strftime.ts:60

    Parameters:

    @@ -139,8 +145,25 @@

    Returns: number


    +

    createDateFixedToTimezone

    createDateFixedToTimezone(dateString: string): Date

    +

    Defined in util/strftime.ts:186

    +

    Parameters:

    + + + + + + + + + + + +
    NameType
    dateStringstring
    +

    Returns: Date

    +

    daysInMonth

    daysInMonth(d: Date): number[]

    -

    Defined in util/strftime.ts:30

    +

    Defined in util/strftime.ts:32

    Parameters:

    @@ -156,8 +179,8 @@

    Returns: number[]


    -

    default

    default(inputDate: Date, formatStr: string): string

    -

    Defined in util/strftime.ts:141

    +

    default

    default(d: Date, formatStr: string): string

    +

    Defined in util/strftime.ts:142

    Parameters:

    @@ -167,7 +190,7 @@ - + @@ -178,7 +201,7 @@

    Returns: string


    format

    format(d: Date, match: RegExpExecArray): any

    -

    Defined in util/strftime.ts:160

    +

    Defined in util/strftime.ts:156

    Parameters:

    inputDated Date
    @@ -199,7 +222,7 @@

    Returns: any


    getDayOfYear

    getDayOfYear(d: Date): number

    -

    Defined in util/strftime.ts:34

    +

    Defined in util/strftime.ts:36

    Parameters:

    @@ -216,7 +239,7 @@

    Returns: number


    getSuffix

    getSuffix(d: Date): any

    -

    Defined in util/strftime.ts:53

    +

    Defined in util/strftime.ts:55

    Parameters:

    @@ -233,7 +256,7 @@

    Returns: any


    getWeekOfYear

    getWeekOfYear(d: Date, startDay: number): string

    -

    Defined in util/strftime.ts:41

    +

    Defined in util/strftime.ts:43

    Parameters:

    @@ -254,7 +277,7 @@

    Returns: string


    isLeapYear

    isLeapYear(d: Date): boolean

    -

    Defined in util/strftime.ts:49

    +

    Defined in util/strftime.ts:51

    Parameters:

    @@ -269,12 +292,12 @@

    Returns: boolean

    -

    Object literals

    Const formatCodes

    formatCodes: object

    Defined in util/strftime.ts:92

    +

    Object literals

    Const formatCodes

    formatCodes: object

    Defined in util/strftime.ts:94

    %

    %(): string

    -

    Defined in util/strftime.ts:139

    +

    Defined in util/strftime.ts:140

    Returns: string

    A

    A(d: Date): string

    -

    Defined in util/strftime.ts:94

    +

    Defined in util/strftime.ts:96

    Parameters:

    @@ -290,7 +313,7 @@

    Returns: string

    B

    B(d: Date): string

    -

    Defined in util/strftime.ts:96

    +

    Defined in util/strftime.ts:98

    Parameters:

    @@ -306,7 +329,7 @@

    Returns: string

    C

    C(d: Date): number

    -

    Defined in util/strftime.ts:98

    +

    Defined in util/strftime.ts:100

    Parameters:

    @@ -322,7 +345,7 @@

    Returns: number

    H

    H(d: Date): number

    -

    Defined in util/strftime.ts:101

    +

    Defined in util/strftime.ts:103

    Parameters:

    @@ -338,7 +361,7 @@

    Returns: number

    I

    I(d: Date): string

    -

    Defined in util/strftime.ts:102

    +

    Defined in util/strftime.ts:104

    Parameters:

    @@ -354,7 +377,7 @@

    Returns: string

    L

    L(d: Date): number

    -

    Defined in util/strftime.ts:106

    +

    Defined in util/strftime.ts:108

    Parameters:

    @@ -370,7 +393,7 @@

    Returns: number

    M

    M(d: Date): number

    -

    Defined in util/strftime.ts:108

    +

    Defined in util/strftime.ts:110

    Parameters:

    @@ -386,7 +409,7 @@

    Returns: number

    N

    N(d: Date, opts: FormatOptions): any

    -

    Defined in util/strftime.ts:109

    +

    Defined in util/strftime.ts:111

    Parameters:

    @@ -406,7 +429,7 @@

    Returns: any

    P

    P(d: Date): *”am” | “pm”*

    -

    Defined in util/strftime.ts:115

    +

    Defined in util/strftime.ts:117

    Parameters:

    @@ -422,7 +445,7 @@

    Returns: *”am” | “pm”*

    S

    S(d: Date): number

    -

    Defined in util/strftime.ts:118

    +

    Defined in util/strftime.ts:120

    Parameters:

    @@ -438,7 +461,7 @@

    Returns: number

    U

    U(d: Date): string

    -

    Defined in util/strftime.ts:120

    +

    Defined in util/strftime.ts:122

    Parameters:

    @@ -454,7 +477,7 @@

    Returns: string

    W

    W(d: Date): string

    -

    Defined in util/strftime.ts:122

    +

    Defined in util/strftime.ts:124

    Parameters:

    @@ -470,7 +493,7 @@

    Returns: string

    X

    X(d: Date): string

    -

    Defined in util/strftime.ts:124

    +

    Defined in util/strftime.ts:126

    Parameters:

    @@ -486,7 +509,7 @@

    Returns: string

    Y

    Y(d: Date): number

    -

    Defined in util/strftime.ts:126

    +

    Defined in util/strftime.ts:128

    Parameters:

    @@ -502,7 +525,7 @@

    Returns: number

    a

    a(d: Date): string

    -

    Defined in util/strftime.ts:93

    +

    Defined in util/strftime.ts:95

    Parameters:

    @@ -518,7 +541,7 @@

    Returns: string

    b

    b(d: Date): string

    -

    Defined in util/strftime.ts:95

    +

    Defined in util/strftime.ts:97

    Parameters:

    @@ -534,7 +557,7 @@

    Returns: string

    c

    c(d: Date): string

    -

    Defined in util/strftime.ts:97

    +

    Defined in util/strftime.ts:99

    Parameters:

    @@ -550,7 +573,7 @@

    Returns: string

    d

    d(d: Date): number

    -

    Defined in util/strftime.ts:99

    +

    Defined in util/strftime.ts:101

    Parameters:

    @@ -566,7 +589,7 @@

    Returns: number

    e

    e(d: Date): number

    -

    Defined in util/strftime.ts:100

    +

    Defined in util/strftime.ts:102

    Parameters:

    @@ -582,7 +605,7 @@

    Returns: number

    j

    j(d: Date): number

    -

    Defined in util/strftime.ts:103

    +

    Defined in util/strftime.ts:105

    Parameters:

    @@ -598,7 +621,7 @@

    Returns: number

    k

    k(d: Date): number

    -

    Defined in util/strftime.ts:104

    +

    Defined in util/strftime.ts:106

    Parameters:

    @@ -614,7 +637,7 @@

    Returns: number

    l

    l(d: Date): string

    -

    Defined in util/strftime.ts:105

    +

    Defined in util/strftime.ts:107

    Parameters:

    @@ -630,7 +653,7 @@

    Returns: string

    m

    m(d: Date): number

    -

    Defined in util/strftime.ts:107

    +

    Defined in util/strftime.ts:109

    Parameters:

    @@ -646,10 +669,10 @@

    Returns: number

    n

    n(): string

    -

    Defined in util/strftime.ts:138

    +

    Defined in util/strftime.ts:139

    Returns: string

    p

    p(d: Date): *”AM” | “PM”*

    -

    Defined in util/strftime.ts:114

    +

    Defined in util/strftime.ts:116

    Parameters:

    @@ -665,7 +688,7 @@

    Returns: *”AM” | “PM”*

    q

    q(d: Date): any

    -

    Defined in util/strftime.ts:116

    +

    Defined in util/strftime.ts:118

    Parameters:

    @@ -681,7 +704,7 @@

    Returns: any

    s

    s(d: Date): number

    -

    Defined in util/strftime.ts:117

    +

    Defined in util/strftime.ts:119

    Parameters:

    @@ -697,10 +720,10 @@

    Returns: number

    t

    t(): string

    -

    Defined in util/strftime.ts:137

    +

    Defined in util/strftime.ts:138

    Returns: string

    u

    u(d: Date): number

    -

    Defined in util/strftime.ts:119

    +

    Defined in util/strftime.ts:121

    Parameters:

    @@ -716,7 +739,7 @@

    Returns: number

    w

    w(d: Date): number

    -

    Defined in util/strftime.ts:121

    +

    Defined in util/strftime.ts:123

    Parameters:

    @@ -732,7 +755,7 @@

    Returns: number

    x

    x(d: Date): string

    -

    Defined in util/strftime.ts:123

    +

    Defined in util/strftime.ts:125

    Parameters:

    @@ -748,7 +771,7 @@

    Returns: string

    y

    y(d: Date): string

    -

    Defined in util/strftime.ts:125

    +

    Defined in util/strftime.ts:127

    Parameters:

    @@ -764,7 +787,7 @@

    Returns: string

    z

    z(d: Date, opts: FormatOptions): string

    -

    Defined in util/strftime.ts:127

    +

    Defined in util/strftime.ts:129

    Parameters:

    @@ -784,69 +807,69 @@

    Returns: string


    -

    Const padChars

    padChars: object

    Defined in util/strftime.ts:80

    +

    Const padChars

    padChars: object

    Defined in util/strftime.ts:82

    A

    A: string = “ “

    -

    Defined in util/strftime.ts:82

    +

    Defined in util/strftime.ts:84

    B

    B: string = “ “

    -

    Defined in util/strftime.ts:84

    +

    Defined in util/strftime.ts:86

    P

    P: string = “ “

    -

    Defined in util/strftime.ts:90

    +

    Defined in util/strftime.ts:92

    a

    a: string = “ “

    -

    Defined in util/strftime.ts:81

    +

    Defined in util/strftime.ts:83

    b

    b: string = “ “

    -

    Defined in util/strftime.ts:83

    +

    Defined in util/strftime.ts:85

    c

    c: string = “ “

    -

    Defined in util/strftime.ts:85

    +

    Defined in util/strftime.ts:87

    e

    e: string = “ “

    -

    Defined in util/strftime.ts:86

    +

    Defined in util/strftime.ts:88

    k

    k: string = “ “

    -

    Defined in util/strftime.ts:87

    +

    Defined in util/strftime.ts:89

    l

    l: string = “ “

    -

    Defined in util/strftime.ts:88

    +

    Defined in util/strftime.ts:90

    p

    p: string = “ “

    -

    Defined in util/strftime.ts:89

    +

    Defined in util/strftime.ts:91


    -

    Const padWidths

    padWidths: object

    Defined in util/strftime.ts:63

    +

    Const padWidths

    padWidths: object

    Defined in util/strftime.ts:65

    H

    H: number = 2

    -

    Defined in util/strftime.ts:66

    +

    Defined in util/strftime.ts:68

    I

    I: number = 2

    -

    Defined in util/strftime.ts:67

    +

    Defined in util/strftime.ts:69

    L

    L: number = 3

    -

    Defined in util/strftime.ts:71

    +

    Defined in util/strftime.ts:73

    M

    M: number = 2

    -

    Defined in util/strftime.ts:73

    +

    Defined in util/strftime.ts:75

    S

    S: number = 2

    -

    Defined in util/strftime.ts:74

    +

    Defined in util/strftime.ts:76

    U

    U: number = 2

    -

    Defined in util/strftime.ts:75

    +

    Defined in util/strftime.ts:77

    W

    W: number = 2

    -

    Defined in util/strftime.ts:76

    +

    Defined in util/strftime.ts:78

    d

    d: number = 2

    -

    Defined in util/strftime.ts:64

    +

    Defined in util/strftime.ts:66

    e

    e: number = 2

    -

    Defined in util/strftime.ts:65

    +

    Defined in util/strftime.ts:67

    j

    j: number = 3

    -

    Defined in util/strftime.ts:68

    +

    Defined in util/strftime.ts:70

    k

    k: number = 2

    -

    Defined in util/strftime.ts:69

    +

    Defined in util/strftime.ts:71

    l

    l: number = 2

    -

    Defined in util/strftime.ts:70

    +

    Defined in util/strftime.ts:72

    m

    m: number = 2

    -

    Defined in util/strftime.ts:72

    +

    Defined in util/strftime.ts:74


    -

    Const suffixes

    suffixes: object

    Defined in util/strftime.ts:13

    +

    Const suffixes

    suffixes: object

    Defined in util/strftime.ts:15

    1

    1: string = “st”

    -

    Defined in util/strftime.ts:14

    +

    Defined in util/strftime.ts:16

    2

    2: string = “nd”

    -

    Defined in util/strftime.ts:15

    +

    Defined in util/strftime.ts:17

    3

    3: string = “rd”

    -

    Defined in util/strftime.ts:16

    +

    Defined in util/strftime.ts:18

    default

    default: string = “th”

    -

    Defined in util/strftime.ts:17

    +

    Defined in util/strftime.ts:19

    @@ -855,7 +878,7 @@
    目录 -
    1. Variables
      1. Const dayNames
      2. Const dayNamesShort
      3. Const monthNames
      4. Const monthNamesShort
      5. Const rFormat
    2. Functions
      1. abbr
      2. century
      3. daysInMonth
      4. default
      5. format
      6. getDayOfYear
      7. getSuffix
      8. getWeekOfYear
      9. isLeapYear
    3. Object literals
      1. Const formatCodes
      2. ▪ formatCodes: object
      3. %
      4. A
      5. B
      6. C
      7. H
      8. I
      9. L
      10. M
      11. N
      12. P
      13. S
      14. U
      15. W
      16. X
      17. Y
      18. a
      19. b
      20. c
      21. d
      22. e
      23. j
      24. k
      25. l
      26. m
      27. n
      28. p
      29. q
      30. s
      31. t
      32. u
      33. w
      34. x
      35. y
      36. z
      37. Const padChars
      38. ▪ padChars: object
      39. A
      40. B
      41. P
      42. a
      43. b
      44. c
      45. e
      46. k
      47. l
      48. p
      49. Const padWidths
      50. ▪ padWidths: object
      51. H
      52. I
      53. L
      54. M
      55. S
      56. U
      57. W
      58. d
      59. e
      60. j
      61. k
      62. l
      63. m
      64. Const suffixes
      65. ▪ suffixes: object
      66. 1
      67. 2
      68. 3
      69. default
    +
    1. Variables
      1. Const ISO8601_TIMEZONE_PATTERN
      2. Const dayNames
      3. Const dayNamesShort
      4. Const monthNames
      5. Const monthNamesShort
      6. Const rFormat
      7. Const timezoneOffset
    2. Functions
      1. abbr
      2. century
      3. createDateFixedToTimezone
      4. daysInMonth
      5. default
      6. format
      7. getDayOfYear
      8. getSuffix
      9. getWeekOfYear
      10. isLeapYear
    3. Object literals
      1. Const formatCodes
      2. ▪ formatCodes: object
      3. %
      4. A
      5. B
      6. C
      7. H
      8. I
      9. L
      10. M
      11. N
      12. P
      13. S
      14. U
      15. W
      16. X
      17. Y
      18. a
      19. b
      20. c
      21. d
      22. e
      23. j
      24. k
      25. l
      26. m
      27. n
      28. p
      29. q
      30. s
      31. t
      32. u
      33. w
      34. x
      35. y
      36. z
      37. Const padChars
      38. ▪ padChars: object
      39. A
      40. B
      41. P
      42. a
      43. b
      44. c
      45. e
      46. k
      47. l
      48. p
      49. Const padWidths
      50. ▪ padWidths: object
      51. H
      52. I
      53. L
      54. M
      55. S
      56. U
      57. W
      58. d
      59. e
      60. j
      61. k
      62. l
      63. m
      64. Const suffixes
      65. ▪ suffixes: object
      66. 1
      67. 2
      68. 3
      69. default
    回到顶部
    diff --git a/zh-cn/api/modules/util_type_guards_.html b/zh-cn/api/modules/util_type_guards_.html index a18b6e380..ff2d0ea10 100644 --- a/zh-cn/api/modules/util_type_guards_.html +++ b/zh-cn/api/modules/util_type_guards_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    External module: "util/type-guards"

    -
    +

    Functions

    getKind

    getKind(val: any): any

    -

    Defined in util/type-guards.ts:58

    +

    Defined in util/type-guards.ts:58

    Parameters:

    @@ -109,7 +109,7 @@

    Returns: any


    isDelimitedToken

    isDelimitedToken(val: any): boolean

    -

    Defined in util/type-guards.ts:14

    +

    Defined in util/type-guards.ts:14

    Parameters:

    @@ -126,7 +126,7 @@

    Returns: boolean


    isHTMLToken

    isHTMLToken(val: any): boolean

    -

    Defined in util/type-guards.ts:22

    +

    Defined in util/type-guards.ts:22

    Parameters:

    @@ -143,7 +143,7 @@

    Returns: boolean


    isLiteralToken

    isLiteralToken(val: any): boolean

    -

    Defined in util/type-guards.ts:38

    +

    Defined in util/type-guards.ts:38

    Parameters:

    @@ -160,7 +160,7 @@

    Returns: boolean


    isNumberToken

    isNumberToken(val: any): boolean

    -

    Defined in util/type-guards.ts:42

    +

    Defined in util/type-guards.ts:42

    Parameters:

    @@ -177,7 +177,7 @@

    Returns: boolean


    isOperatorToken

    isOperatorToken(val: any): boolean

    -

    Defined in util/type-guards.ts:18

    +

    Defined in util/type-guards.ts:18

    Parameters:

    @@ -194,7 +194,7 @@

    Returns: boolean


    isOutputToken

    isOutputToken(val: any): boolean

    -

    Defined in util/type-guards.ts:26

    +

    Defined in util/type-guards.ts:26

    Parameters:

    @@ -211,7 +211,7 @@

    Returns: boolean


    isPropertyAccessToken

    isPropertyAccessToken(val: any): boolean

    -

    Defined in util/type-guards.ts:46

    +

    Defined in util/type-guards.ts:46

    Parameters:

    @@ -228,7 +228,7 @@

    Returns: boolean


    isQuotedToken

    isQuotedToken(val: any): boolean

    -

    Defined in util/type-guards.ts:34

    +

    Defined in util/type-guards.ts:34

    Parameters:

    @@ -245,7 +245,7 @@

    Returns: boolean


    isRangeToken

    isRangeToken(val: any): boolean

    -

    Defined in util/type-guards.ts:54

    +

    Defined in util/type-guards.ts:54

    Parameters:

    @@ -262,7 +262,7 @@

    Returns: boolean


    isTagToken

    isTagToken(val: any): boolean

    -

    Defined in util/type-guards.ts:30

    +

    Defined in util/type-guards.ts:30

    Parameters:

    @@ -279,7 +279,7 @@

    Returns: boolean


    isWordToken

    isWordToken(val: any): boolean

    -

    Defined in util/type-guards.ts:50

    +

    Defined in util/type-guards.ts:50

    Parameters:

    @@ -297,7 +297,7 @@
    - +
    diff --git a/zh-cn/api/modules/util_underscore_.html b/zh-cn/api/modules/util_underscore_.html index a0c004425..d2895bb97 100644 --- a/zh-cn/api/modules/util_underscore_.html +++ b/zh-cn/api/modules/util_underscore_.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,17 +87,17 @@

    External module: "util/underscore"

    -
    +

    Variables

    Const toLowerCase

    toLowerCase: toLowerCase = String.prototype.toLowerCase

    -

    Defined in util/underscore.ts:4

    +

    Defined in util/underscore.ts:4


    Const toStr

    toStr: toString = Object.prototype.toString

    -

    Defined in util/underscore.ts:3

    +

    Defined in util/underscore.ts:3

    Functions

    caseInsensitiveCompare

    caseInsensitiveCompare(a: any, b: any): 1 | 0 | -1

    -

    Defined in util/underscore.ts:140

    +

    Defined in util/underscore.ts:137

    Parameters:

    @@ -118,7 +118,7 @@

    Returns: 1 | 0 | -1


    changeCase

    changeCase(str: string): string

    -

    Defined in util/underscore.ts:130

    +

    Defined in util/underscore.ts:127

    Parameters:

    @@ -135,7 +135,7 @@

    Returns: string


    ellipsis

    ellipsis(str: string, N: number): string

    -

    Defined in util/underscore.ts:135

    +

    Defined in util/underscore.ts:132

    Parameters:

    @@ -156,7 +156,7 @@

    Returns: string


    forOwn

    forOwn<T>(object: object | undefined, iteratee: function): object

    -

    Defined in util/underscore.ts:66

    +

    Defined in util/underscore.ts:63

    Type parameters:

    T

    Parameters:

    @@ -190,7 +190,7 @@

    identify

    identify<T>(val: T): T

    -

    Defined in util/underscore.ts:119

    +

    Defined in util/underscore.ts:116

    Type parameters:

    T

    Parameters:

    @@ -209,7 +209,7 @@

    Returns: T


    isArray

    isArray(value: any): boolean

    -

    Defined in util/underscore.ts:53

    +

    Defined in util/underscore.ts:50

    Parameters:

    @@ -226,7 +226,7 @@

    Returns: boolean


    isFunction

    isFunction(value: any): boolean

    -

    Defined in util/underscore.ts:15

    +

    Defined in util/underscore.ts:10

    Parameters:

    @@ -243,7 +243,7 @@

    Returns: boolean


    isNil

    isNil(value: any): boolean

    -

    Defined in util/underscore.ts:49

    +

    Defined in util/underscore.ts:46

    Parameters:

    @@ -260,7 +260,7 @@

    Returns: boolean


    isNumber

    isNumber(value: any): boolean

    -

    Defined in util/underscore.ts:40

    +

    Defined in util/underscore.ts:37

    Parameters:

    @@ -277,7 +277,7 @@

    Returns: boolean


    isObject

    isObject(value: any): boolean

    -

    Defined in util/underscore.ts:91

    +

    Defined in util/underscore.ts:88

    Parameters:

    @@ -294,7 +294,7 @@

    Returns: boolean


    isString

    isString(value: any): boolean

    -

    Defined in util/underscore.ts:11

    +

    Defined in util/underscore.ts:6

    Parameters:

    @@ -311,7 +311,7 @@

    Returns: boolean


    last

    last<T>(arr: T[]): T

    -

    Defined in util/underscore.ts:79

    +

    Defined in util/underscore.ts:76

    Type parameters:

    T

    Parameters:

    @@ -329,7 +329,7 @@

    Returns: T

    last(arr: string): string

    -

    Defined in util/underscore.ts:80

    +

    Defined in util/underscore.ts:77

    Parameters:

    @@ -346,7 +346,7 @@

    Returns: string


    pad

    pad(str: any, length: number, ch: string, add: function): any

    -

    Defined in util/underscore.ts:112

    +

    Defined in util/underscore.ts:109

    Parameters:

    str: any

    length: number

    @@ -373,7 +373,7 @@

    Returns: any


    padEnd

    padEnd(str: any, length: number, ch: string): any

    -

    Defined in util/underscore.ts:108

    +

    Defined in util/underscore.ts:105

    Parameters:

    @@ -402,7 +402,7 @@

    Returns: any


    padStart

    padStart(str: any, length: number, ch: string): any

    -

    Defined in util/underscore.ts:104

    +

    Defined in util/underscore.ts:101

    Parameters:

    @@ -431,7 +431,7 @@

    Returns: any


    promisify

    promisify<T1, T2>(fn: function): function

    -

    Defined in util/underscore.ts:19

    +

    Defined in util/underscore.ts:14

    Type parameters:

    T1

    T2

    @@ -475,7 +475,7 @@

    promisify<T1, T2, T3>(fn: function): function

    -

    Defined in util/underscore.ts:20

    +

    Defined in util/underscore.ts:15

    Type parameters:

    T1

    T2

    @@ -526,7 +526,7 @@

    range

    range(start: number, stop: number, step: number): number[]

    -

    Defined in util/underscore.ts:96

    +

    Defined in util/underscore.ts:93

    Parameters:

    @@ -555,7 +555,7 @@

    Returns: number[]


    snakeCase

    snakeCase(str: string): string

    -

    Defined in util/underscore.ts:123

    +

    Defined in util/underscore.ts:120

    Parameters:

    @@ -572,7 +572,7 @@

    Returns: string


    stringify

    stringify(value: any): string

    -

    Defined in util/underscore.ts:31

    +

    Defined in util/underscore.ts:26

    Parameters:

    @@ -589,7 +589,7 @@

    Returns: string


    toLiquid

    toLiquid(value: any): any

    -

    Defined in util/underscore.ts:44

    +

    Defined in util/underscore.ts:41

    Parameters:

    @@ -606,7 +606,7 @@

    Returns: any


    toValue

    toValue(value: any): any

    -

    Defined in util/underscore.ts:36

    +

    Defined in util/underscore.ts:33

    Parameters:

    @@ -624,7 +624,7 @@
    - +
    diff --git a/zh-cn/filters/abs.html b/zh-cn/filters/abs.html index f4ba90fe3..9b1e9170d 100644 --- a/zh-cn/filters/abs.html +++ b/zh-cn/filters/abs.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    abs

    -
    +
    @@ -95,27 +95,27 @@

    返回数字的绝对值。

    输入

    -
    {{ -17 | abs }}
    +
    {{ -17 | abs }}

    输出

    -
    17
    +
    17

    输入

    -
    {{ 4 | abs }}
    +
    {{ 4 | abs }}

    输出

    -
    4
    +
    4

    对于只包含数字的字符串也好使:

    输入

    -
    {{ "-19.86" | abs }}
    +
    {{ "-19.86" | abs }}

    输出

    -
    19.86
    +
    19.86
    diff --git a/zh-cn/filters/append.html b/zh-cn/filters/append.html index e52525ede..9765377cb 100644 --- a/zh-cn/filters/append.html +++ b/zh-cn/filters/append.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    append

    -
    +
    @@ -95,21 +95,21 @@

    连接两个字符串并返回结果。

    输入

    -
    {{ "/my/fancy/url" | append: ".html" }}
    +
    {{ "/my/fancy/url" | append: ".html" }}

    输出

    -
    /my/fancy/url.html
    +
    /my/fancy/url.html

    也可以用于变量。

    输入

    -
    {% assign filename = "/index.html" %}
    {{ "website.com" | append: filename }}
    +
    {% assign filename = "/index.html" %}
    {{ "website.com" | append: filename }}

    输出

    -

    website.com/index.html
    +

    website.com/index.html
    diff --git a/zh-cn/filters/at_least.html b/zh-cn/filters/at_least.html index e7f5e8d06..83fd85faa 100644 --- a/zh-cn/filters/at_least.html +++ b/zh-cn/filters/at_least.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    at_least

    -
    +
    @@ -95,20 +95,20 @@

    限制数字到某个最小值。

    输入

    -
    {{ 4 | at_least: 5 }}
    +
    {{ 4 | at_least: 5 }}

    输出

    -
    5
    +
    5

    输入

    -
    {{ 4 | at_least: 3 }}
    +
    {{ 4 | at_least: 3 }}

    输出

    -
    4
    +
    4
    diff --git a/zh-cn/filters/at_most.html b/zh-cn/filters/at_most.html index 4a65619f9..4214583db 100644 --- a/zh-cn/filters/at_most.html +++ b/zh-cn/filters/at_most.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    at_most

    -
    +
    @@ -95,20 +95,20 @@

    限制数字到某个最大值。

    输入

    -
    {{ 4 | at_most: 5 }}
    +
    {{ 4 | at_most: 5 }}

    输出

    -
    4
    +
    4

    输入

    -
    {{ 4 | at_most: 3 }}
    +
    {{ 4 | at_most: 3 }}

    输出

    -
    3
    +
    3
    diff --git a/zh-cn/filters/capitalize.html b/zh-cn/filters/capitalize.html index b223b6468..1feac5103 100644 --- a/zh-cn/filters/capitalize.html +++ b/zh-cn/filters/capitalize.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    capitalize

    -
    +
    @@ -95,21 +95,21 @@

    把字符串首字母改为大写。

    输入

    -
    {{ "title" | capitalize }}
    +
    {{ "title" | capitalize }}

    输出

    -
    Title
    +
    Title

    capitalize 只会大写首字母,因此后续单词的不会受影响:

    Input

    -
    {{ "my great title" | capitalize }}
    +
    {{ "my great title" | capitalize }}

    输出

    -
    My great title
    +
    My great title
    diff --git a/zh-cn/filters/ceil.html b/zh-cn/filters/ceil.html index 669efbd51..ae9f9e34c 100644 --- a/zh-cn/filters/ceil.html +++ b/zh-cn/filters/ceil.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    ceil

    -
    +
    @@ -95,33 +95,33 @@

    向上取整,取整前 LiquidJS 会首先把输入转换为数字。

    输入

    -
    {{ 1.2 | ceil }}
    +
    {{ 1.2 | ceil }}

    输出

    -
    2
    +
    2

    输入

    -
    {{ 2.0 | ceil }}
    +
    {{ 2.0 | ceil }}

    输出

    -
    2
    +
    2

    输入

    -
    {{ 183.357 | ceil }}
    +
    {{ 183.357 | ceil }}

    输出

    -
    184
    +
    184

    下面的例子中输入是字符串:

    输入

    -
    {{ "3.5" | ceil }}
    +
    {{ "3.5" | ceil }}

    输出

    -
    4
    +
    4
    diff --git a/zh-cn/filters/compact.html b/zh-cn/filters/compact.html index 4c1ac2b07..6f7bcb5bf 100644 --- a/zh-cn/filters/compact.html +++ b/zh-cn/filters/compact.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    compact

    -
    +
    @@ -96,21 +96,21 @@

    从数组里移除任何 nullundefined 值。

    假设 site.pages 是网页列表,有些网页包含 category 属性用来标明类别。如果把它们 map 到数组里,那么对于没有 category 属性的元素就会是 undefined

    输入

    -
    {% assign site_categories = site.pages | map: "category" %}

    {% for category in site_categories %}
    - {{ category }}
    {% endfor %}
    +
    {% assign site_categories = site.pages | map: "category" %}

    {% for category in site_categories %}
    - {{ category }}
    {% endfor %}

    输出

    -
    - business
    - celebrities
    -
    - lifestyle
    - sports
    -
    - technology
    +
    - business
    - celebrities
    -
    - lifestyle
    - sports
    -
    - technology

    使用 compact 创建 site_categories 数组,可以移除所有 nullundefined 值。

    输入

    -
    {% assign site_categories = site.pages | map: "category" | compact %}

    {% for category in site_categories %}
    - {{ category }}
    {% endfor %}
    +
    {% assign site_categories = site.pages | map: "category" | compact %}

    {% for category in site_categories %}
    - {{ category }}
    {% endfor %}

    输出

    -
    - business
    - celebrities
    - lifestyle
    - sports
    - technology
    +
    - business
    - celebrities
    - lifestyle
    - sports
    - technology
    diff --git a/zh-cn/filters/concat.html b/zh-cn/filters/concat.html index ec33212e4..8cf6e286f 100644 --- a/zh-cn/filters/concat.html +++ b/zh-cn/filters/concat.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,27 +87,27 @@

    concat

    -
    +

    Concatenates (joins together) multiple arrays. The resulting array contains all the items from the input arrays.

    输入

    -
    {% assign fruits = "apples, oranges, peaches" | split: ", " %}
    {% assign vegetables = "carrots, turnips, potatoes" | split: ", " %}

    {% assign everything = fruits | concat: vegetables %}

    {% for item in everything %}
    - {{ item }}
    {% endfor %}
    +
    {% assign fruits = "apples, oranges, peaches" | split: ", " %}
    {% assign vegetables = "carrots, turnips, potatoes" | split: ", " %}

    {% assign everything = fruits | concat: vegetables %}

    {% for item in everything %}
    - {{ item }}
    {% endfor %}

    输出

    -
    - apples
    - oranges
    - peaches
    - carrots
    - turnips
    - potatoes
    +
    - apples
    - oranges
    - peaches
    - carrots
    - turnips
    - potatoes

    You can string together concat filters to join more than two arrays:

    输入

    -
    {% assign furniture = "chairs, tables, shelves" | split: ", " %}

    {% assign everything = fruits | concat: vegetables | concat: furniture %}

    {% for item in everything %}
    - {{ item }}
    {% endfor %}
    +
    {% assign furniture = "chairs, tables, shelves" | split: ", " %}

    {% assign everything = fruits | concat: vegetables | concat: furniture %}

    {% for item in everything %}
    - {{ item }}
    {% endfor %}

    输出

    -
    - apples
    - oranges
    - peaches
    - carrots
    - turnips
    - potatoes
    - chairs
    - tables
    - shelves
    +
    - apples
    - oranges
    - peaches
    - carrots
    - turnips
    - potatoes
    - chairs
    - tables
    - shelves
    diff --git a/zh-cn/filters/date.html b/zh-cn/filters/date.html index e7ae79cd2..2d7f7c9f1 100644 --- a/zh-cn/filters/date.html +++ b/zh-cn/filters/date.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,38 +87,44 @@

    date

    -
    +

    Added in: v1.9.1

    -

    把时间戳转换为字符串。LiquidJS 尝试跟 Shopify/Liquid 保持一致,它用的是 Ruby 核心的 Time#strftime(string)。此外 LiquidJS 会先通过 new Date() 尝试把输入转换为 Date 对象。

    +

    把时间戳转换为字符串。LiquidJS 尝试跟 Shopify/Liquid 保持一致,它用的是 Ruby 核心的 Time#strftime(string)。此外 LiquidJS 会先通过 new Date() 尝试把输入转换为 Date 对象。

    输入

    -
    {{ article.published_at | date: "%a, %b %d, %y" }}
    +
    {{ article.published_at | date: "%a, %b %d, %y" }}

    输出

    -
    Fri, Jul 17, 15
    +
    Fri, Jul 17, 15
    + +
    时区

    日期在输出时会转换为当地时区,设置 timezoneOffset LiquidJS 参数可以指定一个不同的时区。或者设置 preserveTimezonestrue 来保持字面量时间戳的时区,数据中的日期对象不受此参数的影响。

    +

    输入

    -
    {{ article.published_at | date: "%Y" }}
    +
    {{ article.published_at | date: "%Y" }}

    输出

    -
    2015
    +
    2015

    对于包含格式正确的字符串也好使:

    输入

    -
    {{ "March 14, 2016" | date: "%b %d, %y" }}
    +
    {{ "March 14, 2016" | date: "%b %d, %y" }}

    输出

    -
    Mar 14, 16
    +
    Mar 14, 16
    + +
    时间戳字符串

    LiquidJS 使用 JavaScript [Date][newDate] 来解析输入字符串,意味着支持 IETF-compliant RFC 2822 时间戳特定版本的 ISO8601

    +

    可以用特殊值 "now"(或"today")来获取当前时间:

    输入

    -
    This page was last updated at {{ "now" | date: "%Y-%m-%d %H:%M" }}.
    +
    This page was last updated at {{ "now" | date: "%Y-%m-%d %H:%M" }}.

    输出

    -
    This page was last updated at 2020-03-25 15:57.
    +
    This page was last updated at 2020-03-25 15:57.
    当前时间

    注意得到的当前时间是模板渲染时的时间,如果你在用静态站点生成器或者模板有被缓存这一时间可能与用户看到的时间不同。

    @@ -126,7 +132,7 @@
    diff --git a/zh-cn/filters/default.html b/zh-cn/filters/default.html index fbf73cd49..d5168ade6 100644 --- a/zh-cn/filters/default.html +++ b/zh-cn/filters/default.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    default

    -
    +
    @@ -95,29 +95,29 @@

    在值不存在时给一个默认值,如果左侧是 falsy 或空(stringArray)就会使用这个默认值。下面的例子中 product_price 没有定义,因此使用了默认值。

    输入

    -
    {{ product_price | default: 2.99 }}
    +
    {{ product_price | default: 2.99 }}

    输出

    -
    2.99
    +
    2.99

    下面的例子中定义了 product_price 所以没有使用默认值。

    输入

    -
    {% assign product_price = 4.99 %}
    {{ product_price | default: 2.99 }}
    +
    {% assign product_price = 4.99 %}
    {{ product_price | default: 2.99 }}

    输出

    -
    4.99
    +
    4.99

    下面例子中 product_price 为空,所以使用了默认值。

    输入

    -
    {% assign product_price = "" %}
    {{ product_price | default: 2.99 }}
    +
    {% assign product_price = "" %}
    {{ product_price | default: 2.99 }}

    输出

    -
    2.99
    +
    2.99
    diff --git a/zh-cn/filters/divided_by.html b/zh-cn/filters/divided_by.html index ff96cec69..8f3f0afde 100644 --- a/zh-cn/filters/divided_by.html +++ b/zh-cn/filters/divided_by.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    divided_by

    -
    +
    @@ -95,16 +95,16 @@

    两数相除返回商,返回结果数字在 JavaScript 中 .toString() 得到的字符串。

    输入

    -
    {{ 16 | divided_by: 4 }}
    +
    {{ 16 | divided_by: 4 }}

    输出

    -
    4
    +
    4

    输入

    -
    {{ 5 | divided_by: 3 }}
    +
    {{ 5 | divided_by: 3 }}

    输出

    -
    1.6666666666666667
    +
    1.6666666666666667
    Integer Arithmetic

    Since JavaScript doesn’t differentiate integers and floats, LiquidJS is not capable of integer arithmetic and the return type is always number, the string representation of which depends on its value.

    @@ -112,7 +112,7 @@
    diff --git a/zh-cn/filters/downcase.html b/zh-cn/filters/downcase.html index 0dbd1e35a..346201c70 100644 --- a/zh-cn/filters/downcase.html +++ b/zh-cn/filters/downcase.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    downcase

    -
    +
    @@ -95,20 +95,20 @@

    字符串中每个字符都转为小写,对已经是小写的字符没有影响。

    输入

    -
    {{ "Parker Moore" | downcase }}
    +
    {{ "Parker Moore" | downcase }}

    输出

    -
    parker moore
    +
    parker moore

    输入

    -
    {{ "apple" | downcase }}
    +
    {{ "apple" | downcase }}

    输出

    -
    apple
    +
    apple
    diff --git a/zh-cn/filters/escape.html b/zh-cn/filters/escape.html index c909a93cc..42e94d9a5 100644 --- a/zh-cn/filters/escape.html +++ b/zh-cn/filters/escape.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    escape

    -
    +
    @@ -95,7 +95,7 @@

    把字符串中的 HTML 特殊字符转义,对不需要转义的字符串不会产生影响。

    输入

    -
    {{ "Have you read 'James & the Giant Peach'?" | escape }}
    +
    {{ "Have you read 'James & the Giant Peach'?" | escape }}

    输出

    @@ -103,14 +103,14 @@ Have you read &#39;James &amp; the Giant Peach&#39;?
     

    输入

    -
    {{ "Tetsuro Takara" | escape }}
    +
    {{ "Tetsuro Takara" | escape }}

    输出

    -
    Tetsuro Takara
    +
    Tetsuro Takara
    diff --git a/zh-cn/filters/escape_once.html b/zh-cn/filters/escape_once.html index 3c346e263..5b147e83e 100644 --- a/zh-cn/filters/escape_once.html +++ b/zh-cn/filters/escape_once.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    escape_once

    -
    +
    @@ -95,7 +95,7 @@

    把字符串中的特殊字符转义得到可用在 URL 里的字符串,对已经转义过的字符串和不需要转义的字符串不会产生影响。

    输入

    -
    {{ "1 < 2 & 3" | escape_once }}
    +
    {{ "1 < 2 & 3" | escape_once }}

    输出

    @@ -114,7 +114,7 @@
     
                   
    diff --git a/zh-cn/filters/first.html b/zh-cn/filters/first.html index d9efc4791..9c643c6c8 100644 --- a/zh-cn/filters/first.html +++ b/zh-cn/filters/first.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    first

    -
    +
    @@ -95,23 +95,23 @@

    返回数组的第一个元素。

    输入

    -
    {{ "Ground control to Major Tom." | split: " " | first }}
    +
    {{ "Ground control to Major Tom." | split: " " | first }}

    输出

    -
    Ground
    +
    Ground

    输入

    -
    {% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
    {{ my_array.first }}
    +
    {% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
    {{ my_array.first }}

    输出

    -

    zebra
    +

    zebra

    需要在标签中使用的时候,可以用点来计算 first

    -
    {% if my_array.first == "zebra" %}
    Here comes a zebra!
    {% endif %}
    +
    {% if my_array.first == "zebra" %}
    Here comes a zebra!
    {% endif %}
    diff --git a/zh-cn/filters/floor.html b/zh-cn/filters/floor.html index 80f7b8ad9..97d712b83 100644 --- a/zh-cn/filters/floor.html +++ b/zh-cn/filters/floor.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    floor

    -
    +
    @@ -95,33 +95,33 @@

    数字下取整,LiquidJS 会尝试把输入转换为数字再做下取整操作。

    输入

    -
    {{ 1.2 | floor }}
    +
    {{ 1.2 | floor }}

    输出

    -
    1
    +
    1

    输入

    -
    {{ 2.0 | floor }}
    +
    {{ 2.0 | floor }}

    输出

    -
    2
    +
    2

    输入

    -
    {{ 183.357 | floor }}
    +
    {{ 183.357 | floor }}

    输出

    -
    183
    +
    183

    下面的例子中输入是个数字:

    输入

    -
    {{ "3.5" | floor }}
    +
    {{ "3.5" | floor }}

    输出

    -
    3
    +
    3
    diff --git a/zh-cn/filters/join.html b/zh-cn/filters/join.html index fdba3bd18..e21896ddc 100644 --- a/zh-cn/filters/join.html +++ b/zh-cn/filters/join.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    join

    -
    +
    @@ -95,14 +95,14 @@

    把数组中的元素连接成为一个字符串,以传入的参数作为分隔符。

    输入

    -
    {% assign beatles = "John, Paul, George, Ringo" | split: ", " %}
    {{ beatles | join: " and " }}
    +
    {% assign beatles = "John, Paul, George, Ringo" | split: ", " %}
    {{ beatles | join: " and " }}

    输出

    -

    John and Paul and George and Ringo
    +

    John and Paul and George and Ringo
    diff --git a/zh-cn/filters/json.html b/zh-cn/filters/json.html index 0b7caf02e..466777ef9 100644 --- a/zh-cn/filters/json.html +++ b/zh-cn/filters/json.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    json

    -
    +
    @@ -95,14 +95,14 @@

    通过 JSON.stringify() 把值转换为字符串,多用于调试用途。

    输入

    -
    {% assign arr = "foo bar coo" | split: " " %}
    {{ arr | json }}
    +
    {% assign arr = "foo bar coo" | split: " " %}
    {{ arr | json }}

    输出

    -
    ["foo","bar","coo"]
    +
    ["foo","bar","coo"]
    diff --git a/zh-cn/filters/last.html b/zh-cn/filters/last.html index 6e873949e..0829fbfad 100644 --- a/zh-cn/filters/last.html +++ b/zh-cn/filters/last.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    last

    -
    +
    @@ -95,23 +95,23 @@

    返回数组的最后一个元素。

    输入

    -
    {{ "Ground control to Major Tom." | split: " " | last }}
    +
    {{ "Ground control to Major Tom." | split: " " | last }}

    输出

    -
    Tom.
    +
    Tom.

    输入

    -
    {% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
    {{ my_array.last }}
    +
    {% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
    {{ my_array.last }}

    输出

    -

    tiger
    +

    tiger

    需要在标签中使用的时候,可以用点来计算 last

    -
    {% if my_array.last == "tiger" %}
    There goes a tiger!
    {% endif %}
    +
    {% if my_array.last == "tiger" %}
    There goes a tiger!
    {% endif %}
    diff --git a/zh-cn/filters/lstrip.html b/zh-cn/filters/lstrip.html index 3984e599b..fb5b751bd 100644 --- a/zh-cn/filters/lstrip.html +++ b/zh-cn/filters/lstrip.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    lstrip

    -
    +
    @@ -95,14 +95,14 @@

    移除字符串左侧的空白字符(制表符、空格、换行),不影响词之间的空格。

    输入

    -
    BEGIN{{ "          So much room for activities!          " | lstrip }}END
    +
    BEGIN{{ "          So much room for activities!          " | lstrip }}END

    输出

    -
    BEGINSo much room for activities!          END
    +
    BEGINSo much room for activities!          END
    diff --git a/zh-cn/filters/map.html b/zh-cn/filters/map.html index d892f17cb..2fd7ca9d9 100644 --- a/zh-cn/filters/map.html +++ b/zh-cn/filters/map.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    map

    -
    +
    @@ -96,14 +96,14 @@

    按照属性名提取对象的属性形成另一个数组并返回。

    下面的例子中假设 site.pages 包含了站点的所有网页元信息。使用 assignmap 过滤器创建了一个 site.pages 中所有对象的 category 属性的值构成的数组。

    输入

    -
    {% assign all_categories = site.pages | map: "category" %}

    {% for item in all_categories %}
    - {{ item }}
    {% endfor %}
    +
    {% assign all_categories = site.pages | map: "category" %}

    {% for item in all_categories %}
    - {{ item }}
    {% endfor %}

    输出

    -
    - business
    - celebrities
    - lifestyle
    - sports
    - technology
    +
    - business
    - celebrities
    - lifestyle
    - sports
    - technology
    diff --git a/zh-cn/filters/minus.html b/zh-cn/filters/minus.html index d9624cedb..01a72b93e 100644 --- a/zh-cn/filters/minus.html +++ b/zh-cn/filters/minus.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    minus

    -
    +
    @@ -95,26 +95,26 @@

    两数相减。

    输入

    -
    {{ 4 | minus: 2 }}
    +
    {{ 4 | minus: 2 }}

    输出

    -
    2
    +
    2

    输入

    -
    {{ 16 | minus: 4 }}
    +
    {{ 16 | minus: 4 }}

    输出

    -
    12
    +
    12

    输入

    -
    {{ 183.357 | minus: 12 }}
    +
    {{ 183.357 | minus: 12 }}

    输出

    -
    171.357
    +
    171.357
    diff --git a/zh-cn/filters/modulo.html b/zh-cn/filters/modulo.html index fb9dfec91..e7bb565f8 100644 --- a/zh-cn/filters/modulo.html +++ b/zh-cn/filters/modulo.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    modulo

    -
    +
    @@ -95,26 +95,26 @@

    返回两数相除的余数。

    输入

    -
    {{ 3 | modulo: 2 }}
    +
    {{ 3 | modulo: 2 }}

    输出

    -
    1
    +
    1

    输入

    -
    {{ 24 | modulo: 7 }}
    +
    {{ 24 | modulo: 7 }}

    输出

    -
    3
    +
    3

    输入

    -
    {{ 183.357 | modulo: 12 }}
    +
    {{ 183.357 | modulo: 12 }}

    输出

    -
    3.3569999999999993
    +
    3.3569999999999993
    diff --git a/zh-cn/filters/newline_to_br.html b/zh-cn/filters/newline_to_br.html index 7cbce8083..05d997b8d 100644 --- a/zh-cn/filters/newline_to_br.html +++ b/zh-cn/filters/newline_to_br.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    newline_to_br

    -
    +
    @@ -95,14 +95,14 @@

    把字符串里的所有换行符(\n)替换为 HTML 换行(<br />)。

    输入

    -
    {% capture string_with_newlines %}
    Hello
    there
    {% endcapture %}

    {{ string_with_newlines | newline_to_br }}
    +
    {% capture string_with_newlines %}
    Hello
    there
    {% endcapture %}

    {{ string_with_newlines | newline_to_br }}

    输出


    <br/>Hello<br/>there<br/>
    diff --git a/zh-cn/filters/overview.html b/zh-cn/filters/overview.html index e2cd51e17..310828a04 100644 --- a/zh-cn/filters/overview.html +++ b/zh-cn/filters/overview.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,11 +87,11 @@

    过滤器

    -
    +
    -

    LiquidJS 支持 Liquid 语法中具体业务无关的过滤器,基本上 shopify/liquid 核心 支持的 LiquidJS 都支持。这部分包含了所有 LiquidJS 支持的过滤器的文档和使用示例。

    +

    LiquidJS 支持 Liquid 语法中具体业务无关的过滤器,基本上 shopify/liquid 核心 支持的 LiquidJS 都支持。这部分包含了所有 LiquidJS 支持的过滤器的文档和使用示例。

    LiquidJS 共支持 40+ 个过滤器,可以分为如下几类:

    @@ -124,7 +124,7 @@
    - +
    diff --git a/zh-cn/filters/plus.html b/zh-cn/filters/plus.html index 4d0b75997..dca65a7cb 100644 --- a/zh-cn/filters/plus.html +++ b/zh-cn/filters/plus.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    plus

    -
    +
    @@ -95,26 +95,26 @@

    两数相加。

    输入

    -
    {{ 4 | plus: 2 }}
    +
    {{ 4 | plus: 2 }}

    输出

    -
    6
    +
    6

    输入

    -
    {{ 16 | plus: 4 }}
    +
    {{ 16 | plus: 4 }}

    输出

    -
    20
    +
    20

    输入

    -
    {{ 183.357 | plus: 12 }}
    +
    {{ 183.357 | plus: 12 }}

    输出

    -
    195.357
    +
    195.357
    diff --git a/zh-cn/filters/prepend.html b/zh-cn/filters/prepend.html index ae8fac150..38f8d9cd8 100644 --- a/zh-cn/filters/prepend.html +++ b/zh-cn/filters/prepend.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    prepend

    -
    +
    @@ -95,21 +95,21 @@

    在字符串开头添加另一个字符串。

    输入

    -
    {{ "apples, oranges, and bananas" | prepend: "Some fruit: " }}
    +
    {{ "apples, oranges, and bananas" | prepend: "Some fruit: " }}

    输出

    -
    Some fruit: apples, oranges, and bananas
    +
    Some fruit: apples, oranges, and bananas

    prepend 也可以用于变量。

    输入

    -
    {% assign url = "example.com" %}
    {{ "/index.html" | prepend: url }}
    +
    {% assign url = "example.com" %}
    {{ "/index.html" | prepend: url }}

    输出

    -

    example.com/index.html
    +

    example.com/index.html
    diff --git a/zh-cn/filters/remove.html b/zh-cn/filters/remove.html index 2ea3c9508..18ea321c8 100644 --- a/zh-cn/filters/remove.html +++ b/zh-cn/filters/remove.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    remove

    -
    +
    @@ -95,14 +95,14 @@

    移除字符串中出现的所有指定子字符串。

    输入

    -
    {{ "I strained to see the train through the rain" | remove: "rain" }}
    +
    {{ "I strained to see the train through the rain" | remove: "rain" }}

    输出

    -
    I strained to see the t through the
    +
    I strained to see the t through the 
    diff --git a/zh-cn/filters/remove_first.html b/zh-cn/filters/remove_first.html index a4cf5f1d0..3364f1b8e 100644 --- a/zh-cn/filters/remove_first.html +++ b/zh-cn/filters/remove_first.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    remove_first

    -
    +
    @@ -95,14 +95,14 @@

    移除字符串中出现的第一个指定子字符串。

    输入

    -
    {{ "I strained to see the train through the rain" | remove_first: "rain" }}
    +
    {{ "I strained to see the train through the rain" | remove_first: "rain" }}

    输出

    -
    I strained to see the t through the rain
    +
    I strained to see the t through the rain
    diff --git a/zh-cn/filters/replace.html b/zh-cn/filters/replace.html index 81c505b85..dc49074f6 100644 --- a/zh-cn/filters/replace.html +++ b/zh-cn/filters/replace.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    replace

    -
    +
    @@ -95,14 +95,14 @@

    把字符串中出现的每一个指定子字符串替换为另一个字符串。

    输入

    -
    {{ "Take my protein pills and put my helmet on" | replace: "my", "your" }}
    +
    {{ "Take my protein pills and put my helmet on" | replace: "my", "your" }}

    输出

    -
    Take your protein pills and put your helmet on
    +
    Take your protein pills and put your helmet on
    diff --git a/zh-cn/filters/replace_first.html b/zh-cn/filters/replace_first.html index d91113f07..5db274ded 100644 --- a/zh-cn/filters/replace_first.html +++ b/zh-cn/filters/replace_first.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    replace_first

    -
    +
    @@ -95,14 +95,14 @@

    把字符串中出现的第一个指定子字符串替换为另一个字符串。

    输入

    -
    {{ "Take my protein pills and put my helmet on" | replace_first: "my", "your" }}
    +
    {{ "Take my protein pills and put my helmet on" | replace_first: "my", "your" }}

    输出

    -
    Take your protein pills and put my helmet on
    +
    Take your protein pills and put my helmet on
    diff --git a/zh-cn/filters/reverse.html b/zh-cn/filters/reverse.html index d5e76402f..918f5b5bc 100644 --- a/zh-cn/filters/reverse.html +++ b/zh-cn/filters/reverse.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    reverse

    -
    +
    @@ -95,21 +95,21 @@

    反转数组的所有元素,不可用于字符串。

    输入

    -
    {% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}

    {{ my_array | reverse | join: ", " }}
    +
    {% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}

    {{ my_array | reverse | join: ", " }}

    输出

    -


    plums, peaches, oranges, apples
    +


    plums, peaches, oranges, apples

    尽管 reverse 不能直接用于字符串,可以把字符串分割成数组,反转后再连接成字符串:

    输入

    -
    {{ "Ground control to Major Tom." | split: "" | reverse | join: "" }}
    +
    {{ "Ground control to Major Tom." | split: "" | reverse | join: "" }}

    输出

    -
    .moT rojaM ot lortnoc dnuorG
    +
    .moT rojaM ot lortnoc dnuorG
    diff --git a/zh-cn/filters/round.html b/zh-cn/filters/round.html index 136b95d68..7d2d604c5 100644 --- a/zh-cn/filters/round.html +++ b/zh-cn/filters/round.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    round

    -
    +
    @@ -95,26 +95,26 @@

    数字四舍五入取整,如果传入小数位数作为参数。

    输入

    -
    {{ 1.2 | round }}
    +
    {{ 1.2 | round }}

    输出

    -
    1
    +
    1

    输入

    -
    {{ 2.7 | round }}
    +
    {{ 2.7 | round }}

    输出

    -
    3
    +
    3

    输入

    -
    {{ 183.357 | round: 2 }}
    +
    {{ 183.357 | round: 2 }}

    输出

    -
    183.36
    +
    183.36
    diff --git a/zh-cn/filters/rstrip.html b/zh-cn/filters/rstrip.html index 90f920c01..9e33da9c1 100644 --- a/zh-cn/filters/rstrip.html +++ b/zh-cn/filters/rstrip.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    rstrip

    -
    +
    @@ -95,14 +95,14 @@

    移除字符串右侧的空白字符(制表符、空格、换行),不影响词之间的空格。

    输入

    -
    BEGIN{{ "          So much room for activities!          " | rstrip }}END
    +
    BEGIN{{ "          So much room for activities!          " | rstrip }}END

    输出

    -
    BEGIN          So much room for activities!END
    +
    BEGIN          So much room for activities!END
    diff --git a/zh-cn/filters/size.html b/zh-cn/filters/size.html index e537346e3..404d0ffea 100644 --- a/zh-cn/filters/size.html +++ b/zh-cn/filters/size.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    size

    -
    +
    @@ -95,23 +95,23 @@

    返回字符串的字符个数或者数组的元素个数。

    输入

    -
    {{ "Ground control to Major Tom." | size }}
    +
    {{ "Ground control to Major Tom." | size }}

    输出

    -
    28
    +
    28

    输入

    -
    {% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}

    {{ my_array.size }}
    +
    {% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}

    {{ my_array.size }}

    输出

    -


    4
    +


    4

    在标签里可以用点来计算 size

    -
    {% if site.pages.size > 10 %}
    This is a big website!
    {% endif %}
    +
    {% if site.pages.size > 10 %}
    This is a big website!
    {% endif %}
    diff --git a/zh-cn/filters/slice.html b/zh-cn/filters/slice.html index 17d158a37..db37db489 100644 --- a/zh-cn/filters/slice.html +++ b/zh-cn/filters/slice.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    slice

    -
    +
    @@ -95,33 +95,33 @@

    返回第一个参数为下标位置的一个字符,如果指定了第二个参数会被解释为子字符串的长度。字符串下标从零开始。

    输入

    -
    {{ "Liquid" | slice: 0 }}
    +
    {{ "Liquid" | slice: 0 }}

    输出

    -
    L
    +
    L

    输入

    -
    {{ "Liquid" | slice: 2 }}
    +
    {{ "Liquid" | slice: 2 }}

    输出

    -
    q
    +
    q

    输入

    -
    {{ "Liquid" | slice: 2, 5 }}
    +
    {{ "Liquid" | slice: 2, 5 }}

    输出

    -
    quid
    +
    quid

    If the first argument is a negative number, the indices are counted from the end of the string:

    输入

    -
    {{ "Liquid" | slice: -3, 2 }}
    +
    {{ "Liquid" | slice: -3, 2 }}

    输出

    -
    ui
    +
    ui
    diff --git a/zh-cn/filters/sort.html b/zh-cn/filters/sort.html index 4e77335c8..614941d89 100644 --- a/zh-cn/filters/sort.html +++ b/zh-cn/filters/sort.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    sort

    -
    +
    @@ -95,17 +95,17 @@

    对数组中的元素排序,排序方式为 JavaScript Array.prototype.sort()

    输入

    -
    {% assign my_array = "zebra, octopus, giraffe, Sally Snake" | split: ", " %}

    {{ my_array | sort | join: ", " }}
    +
    {% assign my_array = "zebra, octopus, giraffe, Sally Snake" | split: ", " %}

    {{ my_array | sort | join: ", " }}

    输出

    -


    Sally Snake, giraffe, octopus, zebra
    +


    Sally Snake, giraffe, octopus, zebra

    有一个参数来指定用元素的哪个属性排序。

    -
    {% assign products_by_price = collection.products | sort: "price" %}
    {% for product in products_by_price %}
    <h4>{{ product.title }}</h4>
    {% endfor %}
    +
    {% assign products_by_price = collection.products | sort: "price" %}
    {% for product in products_by_price %}
    <h4>{{ product.title }}</h4>
    {% endfor %}
    diff --git a/zh-cn/filters/sort_natural.html b/zh-cn/filters/sort_natural.html index 21f56233c..cbd8b0a22 100644 --- a/zh-cn/filters/sort_natural.html +++ b/zh-cn/filters/sort_natural.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    sort_natural

    -
    +
    @@ -95,17 +95,17 @@

    大小写不敏感地对数组元素排序。

    输入

    -
    {% assign my_array = "zebra, octopus, giraffe, Sally Snake" | split: ", " %}

    {{ my_array | sort_natural | join: ", " }}
    +
    {% assign my_array = "zebra, octopus, giraffe, Sally Snake" | split: ", " %}

    {{ my_array | sort_natural | join: ", " }}

    输出

    -


    giraffe, octopus, Sally Snake, zebra
    +


    giraffe, octopus, Sally Snake, zebra

    有一个参数来指定用元素的哪个属性排序。

    -
    {% assign products_by_company = collection.products | sort_natural: "company" %}
    {% for product in products_by_company %}
    <h4>{{ product.title }}</h4>
    {% endfor %}
    +
    {% assign products_by_company = collection.products | sort_natural: "company" %}
    {% for product in products_by_company %}
    <h4>{{ product.title }}</h4>
    {% endfor %}
    diff --git a/zh-cn/filters/split.html b/zh-cn/filters/split.html index b29f7052a..5787fb876 100644 --- a/zh-cn/filters/split.html +++ b/zh-cn/filters/split.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    split

    -
    +
    @@ -95,14 +95,14 @@

    把字符串按照指定的分隔符进行分割,split 通常用于把逗号分隔的字符串转换为数组。

    输入

    -
    {% assign beatles = "John, Paul, George, Ringo" | split: ", " %}

    {% for member in beatles %}
    {{ member }}
    {% endfor %}
    +
    {% assign beatles = "John, Paul, George, Ringo" | split: ", " %}

    {% for member in beatles %}
    {{ member }}
    {% endfor %}

    输出

    -




    John

    Paul

    George

    Ringo
    +




    John

    Paul

    George

    Ringo
    diff --git a/zh-cn/filters/strip.html b/zh-cn/filters/strip.html index fbf443fa7..8d624aad1 100644 --- a/zh-cn/filters/strip.html +++ b/zh-cn/filters/strip.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    strip

    -
    +
    @@ -95,14 +95,14 @@

    移除字符串两侧的空白字符(制表符、空格、换行),不影响词之间的空格。

    输入

    -
    BEGIN{{ "          So much room for activities!          " | strip }}END
    +
    BEGIN{{ "          So much room for activities!          " | strip }}END

    输出

    -
    BEGINSo much room for activities!END
    +
    BEGINSo much room for activities!END
    diff --git a/zh-cn/filters/strip_html.html b/zh-cn/filters/strip_html.html index f384e6fe0..96493ec32 100644 --- a/zh-cn/filters/strip_html.html +++ b/zh-cn/filters/strip_html.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    strip_html

    -
    +
    @@ -95,14 +95,14 @@

    移除字符串中的 HTML 标签。

    输入

    -
    {{ "Have <em>you</em> read <strong>Ulysses</strong>?" | strip_html }}
    +
    {{ "Have <em>you</em> read <strong>Ulysses</strong>?" | strip_html }}

    输出

    -
    Have you read Ulysses?
    +
    Have you read Ulysses?
    diff --git a/zh-cn/filters/strip_newlines.html b/zh-cn/filters/strip_newlines.html index 0cc5fdbda..c0da8163b 100644 --- a/zh-cn/filters/strip_newlines.html +++ b/zh-cn/filters/strip_newlines.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    strip_newlines

    -
    +
    @@ -95,14 +95,14 @@

    移除字符串中的换行符。

    输入

    -
    {% capture string_with_newlines %}
    Hello
    there
    {% endcapture %}

    {{ string_with_newlines | strip_newlines }}
    +
    {% capture string_with_newlines %}
    Hello
    there
    {% endcapture %}

    {{ string_with_newlines | strip_newlines }}

    输出


    Hellothere
    diff --git a/zh-cn/filters/times.html b/zh-cn/filters/times.html index 9e5b0b89f..07c005fae 100644 --- a/zh-cn/filters/times.html +++ b/zh-cn/filters/times.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    times

    -
    +
    @@ -95,26 +95,26 @@

    两数相乘。

    输入

    -
    {{ 3 | times: 2 }}
    +
    {{ 3 | times: 2 }}

    输出

    -
    6
    +
    6

    输入

    -
    {{ 24 | times: 7 }}
    +
    {{ 24 | times: 7 }}

    输出

    -
    168
    +
    168

    输入

    -
    {{ 183.357 | times: 12 }}
    +
    {{ 183.357 | times: 12 }}

    输出

    -
    2200.284
    +
    2200.284
    diff --git a/zh-cn/filters/truncate.html b/zh-cn/filters/truncate.html index 9c6975337..1f62c848c 100644 --- a/zh-cn/filters/truncate.html +++ b/zh-cn/filters/truncate.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    truncate

    -
    +
    @@ -95,28 +95,28 @@

    把字符串截断为指定长度,可以指定一个数字表示截断到多少长度。最后会添加一个省略号(…)且记在长度里。

    基本使用

    输入

    -
    {{ "Ground control to Major Tom." | truncate: 20 }}
    +
    {{ "Ground control to Major Tom." | truncate: 20 }}

    输出

    -
    Ground control to...
    +
    Ground control to...

    自定义省略号

    truncate 的第二个可选参数用来指定后面追加的字符串,默认为省略号(…)。这个参数的长度会计算在第一个参数的长度里。例如,如果要把字符串截断到 10 个字符,并使用了一个 3 字符长度的省略号,那么第一个参数的值要设置到 13

    输入

    -
    {{ "Ground control to Major Tom." | truncate: 25, ", and so on" }}
    +
    {{ "Ground control to Major Tom." | truncate: 25, ", and so on" }}

    输出

    -
    Ground control, and so on
    +
    Ground control, and so on

    不要省略号

    如果需要把字符串截断到特定长度且不要添加省略号,则把第二个参数设置为空字符串:

    输入

    -
    {{ "Ground control to Major Tom." | truncate: 20, "" }}
    +
    {{ "Ground control to Major Tom." | truncate: 20, "" }}

    输出

    -
    Ground control to Ma
    +
    Ground control to Ma
    @@ -125,7 +125,7 @@
    目录 -
    1. 基本使用
    2. 自定义省略号
    3. 不要省略号
    +
    1. 基本使用
    2. 自定义省略号
    3. 不要省略号
    回到顶部
    diff --git a/zh-cn/filters/truncatewords.html b/zh-cn/filters/truncatewords.html index ed7032afb..aa438e3e3 100644 --- a/zh-cn/filters/truncatewords.html +++ b/zh-cn/filters/truncatewords.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    truncatewords

    -
    +
    @@ -95,28 +95,28 @@

    把字符串截断为指定个数的单词,可以指定一个数字表示截断到多少个单词。最后会添加一个省略号(…)。

    基本使用

    输入

    -
    {{ "Ground control to Major Tom." | truncatewords: 3 }}
    +
    {{ "Ground control to Major Tom." | truncatewords: 3 }}

    输出

    -
    Ground control to...
    +
    Ground control to...

    自定义省略号

    truncate 的第二个可选参数用来指定后面追加的字符串,默认为省略号(…)。

    输入

    -
    {{ "Ground control to Major Tom." | truncatewords: 3, "--" }}
    +
    {{ "Ground control to Major Tom." | truncatewords: 3, "--" }}

    输出

    -
    Ground control to--
    +
    Ground control to--

    不要省略号

    如果不希望添加省略号,把第二个参数设置为空字符串即可:

    输入

    -
    {{ "Ground control to Major Tom." | truncatewords: 3, "" }}
    +
    {{ "Ground control to Major Tom." | truncatewords: 3, "" }}

    输出

    -
    Ground control to
    +
    Ground control to
    @@ -125,7 +125,7 @@
    目录 -
    1. 基本使用
    2. 自定义省略号
    3. 不要省略号
    +
    1. 基本使用
    2. 自定义省略号
    3. 不要省略号
    回到顶部
    diff --git a/zh-cn/filters/uniq.html b/zh-cn/filters/uniq.html index 552af2bb3..244b31ec4 100644 --- a/zh-cn/filters/uniq.html +++ b/zh-cn/filters/uniq.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    uniq

    -
    +
    @@ -95,14 +95,15 @@

    移除数组中的重复元素。

    输入

    -
    {% assign my_array = "ants, bugs, bees, bugs, ants" | split: ", " %}
    {{ my_array | uniq | join: ", " }}
    +
    {% assign my_array = "ants, bugs, bees, bugs, ants" | split: ", " %}
    {{ my_array | uniq | join: ", " }}

    输出

    -

    ants, bugs, bees
    +
    
    +ants, bugs, bees```
    diff --git a/zh-cn/filters/upcase.html b/zh-cn/filters/upcase.html index 3998614b6..3369e680c 100644 --- a/zh-cn/filters/upcase.html +++ b/zh-cn/filters/upcase.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,28 +87,28 @@

    upcase

    -
    +

    Added in: v1.9.1

    -

    字符串中每个字符都转为大写,对已经是小写的字符没有影响。

    +

    字符串中每个字符都转为大写,对已经是大写的字符没有影响。

    输入

    -
    {{ "Parker Moore" | upcase }}
    +
    {{ "Parker Moore" | upcase }}

    输出

    -
    PARKER MOORE
    +
    PARKER MOORE

    输入

    -
    {{ "APPLE" | upcase }}
    +
    {{ "APPLE" | upcase }}

    输出

    -
    APPLE
    +
    APPLE
    diff --git a/zh-cn/filters/url_decode.html b/zh-cn/filters/url_decode.html index e0ef40885..ac42ee6f4 100644 --- a/zh-cn/filters/url_decode.html +++ b/zh-cn/filters/url_decode.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    url_decode

    -
    +
    @@ -95,14 +95,14 @@

    把 URL 编码的字符串解码。

    输入

    -
    {{ "%27Stop%21%27+said+Fred" | url_decode }}
    +
    {{ "%27Stop%21%27+said+Fred" | url_decode }}

    输出

    -
    'Stop!' said Fred
    +
    'Stop!' said Fred
    diff --git a/zh-cn/filters/url_encode.html b/zh-cn/filters/url_encode.html index 25c62c1b7..08fe07721 100644 --- a/zh-cn/filters/url_encode.html +++ b/zh-cn/filters/url_encode.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    url_encode

    -
    +
    @@ -95,20 +95,20 @@

    把字符串中 URL 不安全的字符转义为百分号编码。

    输入

    -
    {{ "john@liquid.com" | url_encode }}
    +
    {{ "john@liquid.com" | url_encode }}

    输出

    -
    john%40liquid.com
    +
    john%40liquid.com

    输入

    -
    {{ "Tetsuro Takara" | url_encode }}
    +
    {{ "Tetsuro Takara" | url_encode }}

    输出

    -
    Tetsuro+Takara
    +
    Tetsuro+Takara
    diff --git a/zh-cn/filters/where.html b/zh-cn/filters/where.html index d62baa668..c64b3affa 100644 --- a/zh-cn/filters/where.html +++ b/zh-cn/filters/where.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    where

    -
    +
    @@ -96,29 +96,29 @@

    按照数组中对象的属性值来过滤得到新数组,如果未指定第二个参数(属性值)则过滤得到所有属性值为 truthy 的对象。

    下面的例子中,假设你有一个 products 列表并且希望展示其中的厨房产品。使用 where 过滤器可以得到一个只包含 "type" 属性值为 "kitchen" 的元素的数组。

    输入

    -
    All products:
    {% for product in products %}
    - {{ product.title }}
    {% endfor %}

    {% assign kitchen_products = products | where: "type", "kitchen" %}

    Kitchen products:
    {% for product in kitchen_products %}
    - {{ product.title }}
    {% endfor %}
    +
    All products:
    {% for product in products %}
    - {{ product.title }}
    {% endfor %}

    {% assign kitchen_products = products | where: "type", "kitchen" %}

    Kitchen products:
    {% for product in kitchen_products %}
    - {{ product.title }}
    {% endfor %}

    输出

    -
    All products:
    - Vacuum
    - Spatula
    - Television
    - Garlic press

    Kitchen products:
    - Spatula
    - Garlic press
    +
    All products:
    - Vacuum
    - Spatula
    - Television
    - Garlic press

    Kitchen products:
    - Spatula
    - Garlic press

    如果你有一个产品列表且希望只显示可用的产品,可以用 where 过滤器但不指定目标值,LiquidJS 会过滤得到 "available" 值为 truthy 的产品列表。

    输入

    -
    All products:
    {% for product in products %}
    - {{ product.title }}
    {% endfor %}

    {% assign available_products = products | where: "available" %}

    Available products:
    {% for product in available_products %}
    - {{ product.title }}
    {% endfor %}
    +
    All products:
    {% for product in products %}
    - {{ product.title }}
    {% endfor %}

    {% assign available_products = products | where: "available" %}

    Available products:
    {% for product in available_products %}
    - {{ product.title }}
    {% endfor %}

    输出

    -
    All products:
    - Coffee mug
    - Limited edition sneakers
    - Boring sneakers

    Available products:
    - Coffee mug
    - Boring sneakers
    +
    All products:
    - Coffee mug
    - Limited edition sneakers
    - Boring sneakers

    Available products:
    - Coffee mug
    - Boring sneakers

    where 后面再加一个 first 可以用来得到单个元素。例如,你要展示秋季系列里的单个 T-shirt。

    输入

    -
    {% assign new_shirt = products | where: "type", "shirt" | first %}

    Featured product: {{ new_shirt.title }}
    +
    {% assign new_shirt = products | where: "type", "shirt" | first %}

    Featured product: {{ new_shirt.title }}

    输出

    -
    Featured product: Hawaiian print sweater vest
    +
    Featured product: Hawaiian print sweater vest
    diff --git a/zh-cn/index.html b/zh-cn/index.html index c54ca1386..570d543f8 100644 --- a/zh-cn/index.html +++ b/zh-cn/index.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -94,26 +94,26 @@
    @@ -121,7 +121,7 @@
    -
    • 安全渲染

      Liquid 模板有很强的可读性和容错性,适用于开放给设计师和客户。运算符和表达式都先解析到 AST 再去渲染,避免了 evalnew Function

    • 零依赖

      零 NPM 依赖且没有 Native 绑定的 Liquid 实现,Node.js 和浏览器通用。同时提供了 CDN 可用的 CMD, ESM 和 CJS 打包。

    • Shopify 兼容

      支持 shopify/liquid 的所有标签和过滤器,Jekyll 站点, Github PagesShopify 模板 都可以轻松迁移到 Node.js。

    • TypeScript

      整个项目在 TypeScript strict 模式下重写,让这个库拥有顺滑的使用体验,同时确保了一致的 API 和实时的、精确的文档。

    +
    • 安全渲染

      Liquid 模板有很强的可读性和容错性,适用于开放给设计师和客户。运算符和表达式都先解析到 AST 再去渲染,避免了 evalnew Function

    • 零依赖

      零 NPM 依赖且没有 Native 绑定的 Liquid 实现,Node.js 和浏览器通用。同时提供了 CDN 可用的 CMD, ESM 和 CJS 打包。

    • Shopify 兼容

      支持 shopify/liquid 的所有标签和过滤器,Jekyll 站点, Github PagesShopify 模板 都可以轻松迁移到 Node.js。

    • TypeScript

      整个项目在 TypeScript strict 模式下重写,让这个库拥有顺滑的使用体验,同时确保了一致的 API 和实时的、精确的文档。

    diff --git a/zh-cn/tags/capture.html b/zh-cn/tags/capture.html index 877261951..42f101350 100644 --- a/zh-cn/tags/capture.html +++ b/zh-cn/tags/capture.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    capture

    -
    +
    @@ -95,21 +95,21 @@

    capture 开闭标签之间的内容渲染后赋值给一个变量,这个变量的类型总是字符串。

    输入

    -
    {% capture my_variable %}I am being captured.{% endcapture %}
    {{ my_variable }}
    +
    {% capture my_variable %}I am being captured.{% endcapture %}
    {{ my_variable }}

    输出

    -
    I am being captured.
    +
    I am being captured.

    capture 里可以使用 assign 创建的其他变量来构建复杂字符串:

    输入

    -
    {% assign favorite_food = "pizza" %}
    {% assign age = 35 %}

    {% capture about_me %}
    I am {{ age }} and my favorite food is {{ favorite_food }}.
    {% endcapture %}

    {{ about_me }}
    +
    {% assign favorite_food = "pizza" %}
    {% assign age = 35 %}

    {% capture about_me %}
    I am {{ age }} and my favorite food is {{ favorite_food }}.
    {% endcapture %}

    {{ about_me }}

    输出

    -
    I am 35 and my favourite food is pizza.
    +
    I am 35 and my favourite food is pizza.
    diff --git a/zh-cn/tags/case.html b/zh-cn/tags/case.html index d7db4056d..de5a77def 100644 --- a/zh-cn/tags/case.html +++ b/zh-cn/tags/case.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    case

    -
    +
    @@ -95,14 +95,14 @@

    创建一个 switch 语句,把变量跟不同的值比较。case 创建 switch 语句,when 比较它的值。

    输入

    -
    {% assign handle = "cake" %}
    {% case handle %}
    {% when "cake" %}
    This is a cake
    {% when "cookie", "biscuit" %}
    This is a cookie
    {% else %}
    This is not a cake nor a cookie
    {% endcase %}
    +
    {% assign handle = "cake" %}
    {% case handle %}
    {% when "cake" %}
    This is a cake
    {% when "cookie", "biscuit" %}
    This is a cookie
    {% else %}
    This is not a cake nor a cookie
    {% endcase %}

    输出

    -
    This is a cake
    +
    This is a cake
    diff --git a/zh-cn/tags/comment.html b/zh-cn/tags/comment.html index 19f58590c..3f36c40a3 100644 --- a/zh-cn/tags/comment.html +++ b/zh-cn/tags/comment.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Comment

    -
    +
    @@ -95,14 +95,14 @@

    让 Liquid 模板里一段代码不渲染。处于 comment 开闭标签之间的文本都不会输出,Liquid 代码都不会执行。

    输入

    -
    Anything you put between {% comment %} and {% endcomment %} tags
    is turned into a comment.
    +
    Anything you put between {% comment %} and {% endcomment %} tags
    is turned into a comment.

    输出

    -
    Anything you put between  tags
    is turned into a comment.
    +
    Anything you put between  tags
    is turned into a comment.
    diff --git a/zh-cn/tags/cycle.html b/zh-cn/tags/cycle.html index 984519249..a5f886497 100644 --- a/zh-cn/tags/cycle.html +++ b/zh-cn/tags/cycle.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    cycle

    -
    +
    @@ -95,10 +95,10 @@

    循环一组字符串按照它们传入的顺序打印出来。每次调用 cycle 打印下一个参数。

    基本使用

    输入

    -
    {% cycle "one", "two", "three" %}
    {% cycle "one", "two", "three" %}
    {% cycle "one", "two", "three" %}
    {% cycle "one", "two", "three" %}
    +
    {% cycle "one", "two", "three" %}
    {% cycle "one", "two", "three" %}
    {% cycle "one", "two", "three" %}
    {% cycle "one", "two", "three" %}

    输出

    -
    one
    two
    three
    one
    +
    one
    two
    three
    one

    cycle 可以用于:

    参数

    一个模板中需要多个 cycle 时可以使用 “cycle 组” 参数。如果没有提供组名,使用同样参数调用的 cycle 会被认为处于同一组。

    输入

    -
    {% cycle "first": "one", "two", "three" %}
    {% cycle "second": "one", "two", "three" %}
    {% cycle "second": "one", "two", "three" %}
    {% cycle "first": "one", "two", "three" %}
    +
    {% cycle "first": "one", "two", "three" %}
    {% cycle "second": "one", "two", "three" %}
    {% cycle "second": "one", "two", "three" %}
    {% cycle "first": "one", "two", "three" %}

    输出

    -
    one
    one
    two
    two
    +
    one
    one
    two
    two
    @@ -123,7 +123,7 @@
    目录 -
    1. 基本使用
    2. 参数
    +
    1. 基本使用
    2. 参数
    回到顶部
    diff --git a/zh-cn/tags/decrement.html b/zh-cn/tags/decrement.html index 23acdaa7b..90bffa6cb 100644 --- a/zh-cn/tags/decrement.html +++ b/zh-cn/tags/decrement.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Decrement

    -
    +
    @@ -95,16 +95,16 @@

    创建一个新的数字类型的变量,每次调用都把它的值减一。第一次是 -1

    输入

    -
    {% decrement variable %}
    {% decrement variable %}
    {% decrement variable %}
    +
    {% decrement variable %}
    {% decrement variable %}
    {% decrement variable %}

    输出

    -
    -1
    -2
    -3
    +
    -1
    -2
    -3

    increment 一样,在 decrement 里声明的变量独立于 assigncapture 创建的变量。

    diff --git a/zh-cn/tags/for.html b/zh-cn/tags/for.html index 3e0168e76..3995d99c7 100644 --- a/zh-cn/tags/for.html +++ b/zh-cn/tags/for.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    For

    -
    +
    @@ -96,78 +96,78 @@

    重复执行代码块的迭代标签。

    基本使用

    for…in

    重复执行一段代码。

    输入

    -
    {% for product in collection.products %}
    {{ product.title }}
    {% endfor %}
    +
    {% for product in collection.products %}
    {{ product.title }}
    {% endfor %}

    输出

    -
    hat shirt pants
    +
    hat shirt pants

    else

    指定 for 循环的集合长度为零时执行的代码块。

    输入

    -
    {% for product in collection.products %}
    {{ product.title }}
    {% else %}
    The collection is empty.
    {% endfor %}
    +
    {% for product in collection.products %}
    {{ product.title }}
    {% else %}
    The collection is empty.
    {% endfor %}

    输出

    -
    The collection is empty.
    +
    The collection is empty.

    break

    遇到 break 标签时 for 循环停止执行。

    输入

    -
    {% for i in (1..5) %}
    {% if i == 4 %}
    {% break %}
    {% else %}
    {{ i }}
    {% endif %}
    {% endfor %}
    +
    {% for i in (1..5) %}
    {% if i == 4 %}
    {% break %}
    {% else %}
    {{ i }}
    {% endif %}
    {% endfor %}

    输出

    -
    1 2 3
    +
    1 2 3

    continue

    遇到 continue 标签时跳过当前这次迭代。

    输入

    -
    {% for i in (1..5) %}
    {% if i == 4 %}
    {% continue %}
    {% else %}
    {{ i }}
    {% endif %}
    {% endfor %}
    +
    {% for i in (1..5) %}
    {% if i == 4 %}
    {% continue %}
    {% else %}
    {{ i }}
    {% endif %}
    {% endfor %}

    输出

    -
    1 2 3   5
    +
    1 2 3   5

    forloop

    for 循环里有一个 forloop 变量可用,用来表示迭代的当前状态。

    forloop.first, forloop.lastforloop.length 属性:

    输入

    -
    {% for i in (1..5) %}
    {%- if forloop.first == true -%} First
    {%- elsif forloop.last == true -%} Last
    {%- else -%} {{ forloop.length }}
    {%- endif %}
    {% endfor -%}
    +
    {% for i in (1..5) %}
    {%- if forloop.first == true -%} First
    {%- elsif forloop.last == true -%} Last
    {%- else -%} {{ forloop.length }}
    {%- endif %}
    {% endfor -%}

    输出

    -
    First
    5
    5
    5
    Last
    +
    First
    5
    5
    5
    Last

    forloop.index, forloop.index0, forloop.rindexforloop.rindex0 属性:

    输入

    -
    index index0 rindex rindex0
    {% for i in (1..5) %}
    {{- forloop.index }} {{ forloop.index0 }} {{ forloop.rindex }} {{ forloop.rindex0 }}
    {% endfor -%}
    +
    index index0 rindex rindex0
    {% for i in (1..5) %}
    {{- forloop.index }} {{ forloop.index0 }} {{ forloop.rindex }} {{ forloop.rindex0 }}
    {% endfor -%}

    输出

    -
    index index0 rindex rindex0
    1 0 5 4
    2 1 4 3
    3 2 3 2
    4 3 2 1
    5 4 1 0
    +
    index index0 rindex rindex0
    1 0 5 4
    2 1 4 3
    3 2 3 2
    4 3 2 1
    5 4 1 0

    参数

    limit

    限制循环执行的次数。

    输入

    -
    <!-- if array = [1,2,3,4,5,6] -->
    {% for item in array limit:2 %}
    {{ item }}
    {% endfor %}
    +
    <!-- if array = [1,2,3,4,5,6] -->
    {% for item in array limit:2 %}
    {{ item }}
    {% endfor %}

    输出

    -
    1 2
    +
    1 2

    offset

    从指定的下标处开始循环。

    输入

    -
    <!-- if array = [1,2,3,4,5,6] -->
    {% for item in array offset:2 %}
    {{ item }}
    {% endfor %}
    +
    <!-- if array = [1,2,3,4,5,6] -->
    {% for item in array offset:2 %}
    {{ item }}
    {% endfor %}

    输出

    -
    3 4 5 6
    +
    3 4 5 6

    range

    定义一个用于循环的数字范围。可以用字面量定义范围,也可以用变量定义范围。

    输入

    -
    {% for i in (3..5) %}
    {{ i }}
    {% endfor %}

    {% assign num = 4 %}
    {% for i in (1..num) %}
    {{ i }}
    {% endfor %}
    +
    {% for i in (3..5) %}
    {{ i }}
    {% endfor %}

    {% assign num = 4 %}
    {% for i in (1..num) %}
    {{ i }}
    {% endfor %}

    输出

    -
    3 4 5
    1 2 3 4
    +
    3 4 5
    1 2 3 4

    reversed

    反转循环的顺序。注意这个参数的拼写和过滤器 reverse 不同。

    输入

    -
    <!-- if array = [1,2,3,4,5,6] -->
    {% for item in array reversed %}
    {{ item }}
    {% endfor %}
    +
    <!-- if array = [1,2,3,4,5,6] -->
    {% for item in array reversed %}
    {{ item }}
    {% endfor %}

    输出

    -
    6 5 4 3 2 1
    +
    6 5 4 3 2 1
    @@ -176,7 +176,7 @@
    目录 -
    1. 基本使用
      1. for…in
      2. else
      3. break
      4. continue
      5. forloop
    2. 参数
      1. limit
      2. offset
      3. range
      4. reversed
    +
    1. 基本使用
      1. for…in
      2. else
      3. break
      4. continue
      5. forloop
    2. 参数
      1. limit
      2. offset
      3. range
      4. reversed
    回到顶部
    diff --git a/zh-cn/tags/if.html b/zh-cn/tags/if.html index 0d88015f1..e0c2b7626 100644 --- a/zh-cn/tags/if.html +++ b/zh-cn/tags/if.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    If

    -
    +
    @@ -95,22 +95,22 @@

    条件为 true 时执行某个代码块。

    if

    输入

    -
    {% if product.title == "Awesome Shoes" %}
    These shoes are awesome!
    {% endif %}
    +
    {% if product.title == "Awesome Shoes" %}
    These shoes are awesome!
    {% endif %}

    输出

    -
    These shoes are awesome!
    +
    These shoes are awesome!

    elsif / else

    ifunless 块中添加更多的条件。

    输入

    -
    <!-- If customer.name = "anonymous" -->
    {% if customer.name == "kevin" %}
    Hey Kevin!
    {% elsif customer.name == "anonymous" %}
    Hey Anonymous!
    {% else %}
    Hi Stranger!
    {% endif %}
    +
    <!-- If customer.name = "anonymous" -->
    {% if customer.name == "kevin" %}
    Hey Kevin!
    {% elsif customer.name == "anonymous" %}
    Hey Anonymous!
    {% else %}
    Hi Stranger!
    {% endif %}

    输出

    -
    Hey Anonymous!
    +
    Hey Anonymous!
    diff --git a/zh-cn/tags/include.html b/zh-cn/tags/include.html index 11fe13578..b827c9bd4 100644 --- a/zh-cn/tags/include.html +++ b/zh-cn/tags/include.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Include

    -
    +
    @@ -97,23 +97,23 @@

    引入一个模板

    从模板 根路径 引入一个模板:

    -
    {% include 'footer.liquid' %}
    +
    {% include 'footer.liquid' %}

    设置 extname 选项为 ".liquid" 后上面的 .liquid 后缀就可以省略了,等价于:

    -
    {% include 'footer' %}
    +
    {% include 'footer' %}

    通过 include 渲染一个子模板时,它内部的代码可以访问父模板的变量,但父模板中不能访问它里面定义的变量。

    变量传递

    父模板里定义的变量可以通过 include 标签的参数列表传递给子模板:

    -
    {% assign my_variable = 'apples' %}
    {% include 'name', my_variable: my_variable, my_other_variable: 'oranges' %}
    +
    {% assign my_variable = 'apples' %}
    {% include 'name', my_variable: my_variable, my_other_variable: 'oranges' %}

    with 参数

    使用 with...as 语法可以给子模板传递一个变量:

    -
    {% assign featured_product = all_products['product_handle'] %}
    {% include 'product' with featured_product as product %}
    +
    {% assign featured_product = all_products['product_handle'] %}
    {% include 'product' with featured_product as product %}

    上面的例子中,子模板中 product 会保有父模板中的 featured_product 变量的值。

    @@ -122,7 +122,7 @@
    目录 -
    1. 引入一个模板
    2. 变量传递
    3. with 参数
    +
    1. 引入一个模板
    2. 变量传递
    3. with 参数
    回到顶部
    diff --git a/zh-cn/tags/increment.html b/zh-cn/tags/increment.html index f4f6f18c2..01919cd03 100644 --- a/zh-cn/tags/increment.html +++ b/zh-cn/tags/increment.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Increment

    -
    +
    @@ -95,23 +95,23 @@

    创建一个新的数字类型的变量,每次调用都把它的值加一。第一次为 0

    输入

    -
    {% increment my_counter %}
    {% increment my_counter %}
    {% increment my_counter %}
    +
    {% increment my_counter %}
    {% increment my_counter %}
    {% increment my_counter %}

    输出

    -
    0
    1
    2
    +
    0
    1
    2

    increment 里声明的变量独立于 assigncapture 创建的变量。

    下面的例子中通过 assign 创建了变量 var。然后用 increment 标签在同名变量上多次递增。注意 increment 标签不会影响 assign 创建的 var 的值。

    输入

    -
    {% assign var = 10 %}
    {% increment var %}
    {% increment var %}
    {% increment var %}
    {{ var }}
    +
    {% assign var = 10 %}
    {% increment var %}
    {% increment var %}
    {% increment var %}
    {{ var }}

    输出

    -
    0
    1
    2
    10
    +
    0
    1
    2
    10
    diff --git a/zh-cn/tags/layout.html b/zh-cn/tags/layout.html index bd9e2ce02..4d65ea091 100644 --- a/zh-cn/tags/layout.html +++ b/zh-cn/tags/layout.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,30 +87,30 @@

    Layout

    -
    +

    Added in: v1.9.1

    使用布局模板

    套用模板 根路径 下的某个布局模板中。

    -
    {% layout 'footer.liquid' %}
    +
    {% layout 'footer.liquid' %}

    设置 extname 选项为 ".liquid" 后上面的 .liquid 后缀就可以省略了,等价于:

    -
    {% layout 'footer' %}
    +
    {% layout 'footer' %}

    通过 layout 渲染一个子模板时,它内部的代码可以访问父模板的变量,但父模板中不能访问它里面定义的变量。

    变量传递

    当前模板里定义的变量可以通过 layout 标签的参数列表传递给布局模板:

    -
    {% assign my_variable = 'apples' %}
    {% layout 'name', my_variable: my_variable, my_other_variable: 'oranges' %}
    +
    {% assign my_variable = 'apples' %}
    {% layout 'name', my_variable: my_variable, my_other_variable: 'oranges' %}

    布局模板中可以包含若干 block 标签,这些 block 渲染时会按照子模板提供的内容进行填充。例如我们有布局模板 default-layout.liquid

    -
    Header
    {% block content %}My default content{% endblock %}
    Footer
    +
    Header
    {% block content %}My default content{% endblock %}
    Footer

    它被子模板 page.liquid 通过 layout 标签引用:

    -
    {% layout "default-layout" %}
    {% block content %}My page content{% endblock %}
    +
    {% layout "default-layout" %}
    {% block content %}My page content{% endblock %}

    page.liquid 的渲染结果将会是:

    -
    Header
    My page content
    Footer
    +
    Header
    My page content
    Footer
    • 一个布局模板中可以定义多个块;
    • @@ -121,7 +121,7 @@
    @@ -130,7 +130,7 @@
    目录 -
    1. 使用布局模板
    2. 变量传递
    +
    1. 使用布局模板
    2. 变量传递
    回到顶部
    diff --git a/zh-cn/tags/overview.html b/zh-cn/tags/overview.html index 40780e358..0fa33a816 100644 --- a/zh-cn/tags/overview.html +++ b/zh-cn/tags/overview.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,11 +87,11 @@

    标签

    -
    +
    -

    LiquidJS 支持 Liquid 语法中具体业务无关的标签,包含 shopify/liquid 核心 里的所有标签。这部分包含了所有 LiquidJS 支持的标签的文档和使用示例。

    +

    LiquidJS 支持 Liquid 语法中具体业务无关的标签,包含 shopify/liquid 核心 里的所有标签。这部分包含了所有 LiquidJS 支持的标签的文档和使用示例。

    LiquidJS 支持十几个过滤器,可以分为如下几类:

    @@ -130,7 +130,7 @@
    - +
    diff --git a/zh-cn/tags/raw.html b/zh-cn/tags/raw.html index ccf21256b..85aaf8830 100644 --- a/zh-cn/tags/raw.html +++ b/zh-cn/tags/raw.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Raw

    -
    +
    @@ -95,14 +95,14 @@

    raw 标签可以暂时禁用 LiquidJS 的语法。生成和 Liquid 冲突的语言(比如 Nunjucks、Handlebars)时很有用。

    输入

    -
    {% raw %}
    In Handlebars, {{ this }} will be HTML-escaped, but
    {{{ that }}} will not.
    {% endraw %}
    +
    {% raw %}
    In Handlebars, {{ this }} will be HTML-escaped, but
    {{{ that }}} will not.
    {% endraw %}

    输出

    -
    In Handlebars, {{ this }} will be HTML-escaped, but {{{ that }}} will not.
    +
    In Handlebars, {{ this }} will be HTML-escaped, but {{{ that }}} will not.
    diff --git a/zh-cn/tags/render.html b/zh-cn/tags/render.html index c90f7a77d..e545fd6a4 100644 --- a/zh-cn/tags/render.html +++ b/zh-cn/tags/render.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,31 +87,31 @@

    Render

    -
    +

    Added in: v9.2.0

    基本使用

    渲染一个模板

    从模板 根路径 引入一个模板:

    -
    {% render 'footer.liquid' %}
    +
    {% render 'footer.liquid' %}

    设置 extname 选项为 ".liquid" 后上面的 .liquid 后缀就可以省略了,等价于:

    -
    {% render 'footer' %}
    +
    {% render 'footer' %}
    变量作用域

    通过 render 渲染一个子模板时,它内部的代码不能访问父模板的变量,父模板中也不能访问它里面定义的变量。这个封装会让模板代码更容易理解和维护。

    变量传递

    父模板里定义的变量可以通过 render 标签的参数列表传递给子模板:

    -
    {% assign my_variable = 'apples' %}
    {% render 'name', my_variable: my_variable, my_other_variable: 'oranges' %}
    +
    {% assign my_variable = 'apples' %}
    {% render 'name', my_variable: my_variable, my_other_variable: 'oranges' %}

    全局变量 不需要传递,所有文件都可以访问它们。

    参数

    with 参数

    使用 with...as 语法可以给子模板传递一个变量:

    -
    {% assign featured_product = all_products['product_handle'] %}
    {% render 'product' with featured_product as product %}
    +
    {% assign featured_product = all_products['product_handle'] %}
    {% render 'product' with featured_product as product %}

    上面的例子中,子模板中 product 会保有父模板中的 featured_product 变量的值。

    for 参数

    for...as 语法可以对可枚举对象的每一个值渲染一次子模板:

    -
    {% assign variants = product.variants %}
    {% render 'variant' for variants as variant %}
    +
    {% assign variants = product.variants %}
    {% render 'variant' for variants as variant %}

    上面的例子中,对 product 的每个 variants 是指都会渲染一次子模板。子模板中 variant 变量会保有父模板中的 product.variants 中对应元素的值。

    forloop 对象

    使用 for 参数时,在子模板中可以访问 forloop 对象。

    @@ -120,7 +120,7 @@
    @@ -129,7 +129,7 @@
    目录 -
    1. 基本使用
      1. 渲染一个模板
      2. 变量传递
    2. 参数
      1. with 参数
      2. for 参数
    +
    1. 基本使用
      1. 渲染一个模板
      2. 变量传递
    2. 参数
      1. with 参数
      2. for 参数
    回到顶部
    diff --git a/zh-cn/tags/tablerow.html b/zh-cn/tags/tablerow.html index 90e70b390..d80447578 100644 --- a/zh-cn/tags/tablerow.html +++ b/zh-cn/tags/tablerow.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Table Row

    -
    +
    @@ -95,30 +95,30 @@

    生成一个 HTML 表示,上下必须用 <table></table> HTML 标签包裹起来。

    基本使用

    输入

    -
    <table>
    {% tablerow product in collection.products %}
    {{ product.title }}
    {% endtablerow %}
    </table>
    +
    <table>
    {% tablerow product in collection.products %}
    {{ product.title }}
    {% endtablerow %}
    </table>

    输出

    -
    <table>
    <tr class="row1">
    <td class="col1">
    Cool Shirt
    </td>
    <td class="col2">
    Alien Poster
    </td>
    <td class="col3">
    Batman Poster
    </td>
    <td class="col4">
    Bullseye Shirt
    </td>
    <td class="col5">
    Another Classic Vinyl
    </td>
    <td class="col6">
    Awesome Jeans
    </td>
    </tr>
    </table>
    +
    <table>
    <tr class="row1">
    <td class="col1">
    Cool Shirt
    </td>
    <td class="col2">
    Alien Poster
    </td>
    <td class="col3">
    Batman Poster
    </td>
    <td class="col4">
    Bullseye Shirt
    </td>
    <td class="col5">
    Another Classic Vinyl
    </td>
    <td class="col6">
    Awesome Jeans
    </td>
    </tr>
    </table>

    参数

    cols

    定义表格的列数。

    输入

    -
    {% tablerow product in collection.products cols:2 %}
    {{ product.title }}
    {% endtablerow %}
    +
    {% tablerow product in collection.products cols:2 %}
    {{ product.title }}
    {% endtablerow %}

    输出

    -
    <table>
    <tr class="row1">
    <td class="col1">
    Cool Shirt
    </td>
    <td class="col2">
    Alien Poster
    </td>
    </tr>
    <tr class="row2">
    <td class="col1">
    Batman Poster
    </td>
    <td class="col2">
    Bullseye Shirt
    </td>
    </tr>
    <tr class="row3">
    <td class="col1">
    Another Classic Vinyl
    </td>
    <td class="col2">
    Awesome Jeans
    </td>
    </tr>
    </table>
    +
    <table>
    <tr class="row1">
    <td class="col1">
    Cool Shirt
    </td>
    <td class="col2">
    Alien Poster
    </td>
    </tr>
    <tr class="row2">
    <td class="col1">
    Batman Poster
    </td>
    <td class="col2">
    Bullseye Shirt
    </td>
    </tr>
    <tr class="row3">
    <td class="col1">
    Another Classic Vinyl
    </td>
    <td class="col2">
    Awesome Jeans
    </td>
    </tr>
    </table>

    limit

    限制迭代次数。

    -
    {% tablerow product in collection.products cols:2 limit:3 %}
    {{ product.title }}
    {% endtablerow %}
    +
    {% tablerow product in collection.products cols:2 limit:3 %}
    {{ product.title }}
    {% endtablerow %}

    offset

    从指定的下标处开始循环。

    -
    {% tablerow product in collection.products cols:2 offset:3 %}
    {{ product.title }}
    {% endtablerow %}
    +
    {% tablerow product in collection.products cols:2 offset:3 %}
    {{ product.title }}
    {% endtablerow %}

    range

    定义一个用于循环的数字范围。可以用字面量定义范围,也可以用变量定义范围。

    -
    <!--variable number example-->

    {% assign num = 4 %}
    <table>
    {% tablerow i in (1..num) %}
    {{ i }}
    {% endtablerow %}
    </table>

    <!--literal number example-->

    <table>
    {% tablerow i in (3..5) %}
    {{ i }}
    {% endtablerow %}
    </table>
    +
    <!--variable number example-->

    {% assign num = 4 %}
    <table>
    {% tablerow i in (1..num) %}
    {{ i }}
    {% endtablerow %}
    </table>

    <!--literal number example-->

    <table>
    {% tablerow i in (3..5) %}
    {{ i }}
    {% endtablerow %}
    </table>
    @@ -127,7 +127,7 @@
    目录 -
    1. 基本使用
    2. 参数
      1. cols
      2. limit
      3. offset
      4. range
    +
    1. 基本使用
    2. 参数
      1. cols
      2. limit
      3. offset
      4. range
    回到顶部
    diff --git a/zh-cn/tags/unless.html b/zh-cn/tags/unless.html index a5281b7b9..792a3caac 100644 --- a/zh-cn/tags/unless.html +++ b/zh-cn/tags/unless.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    Unless

    -
    +
    @@ -95,17 +95,17 @@

    if 相反 —— 条件 不满足 时执行代码块。

    输入

    -
    {% unless product.title == "Awesome Shoes" %}
    These shoes are not awesome.
    {% endunless %}
    +
    {% unless product.title == "Awesome Shoes" %}
    These shoes are not awesome.
    {% endunless %}

    输出

    -
    These shoes are not awesome.
    +
    These shoes are not awesome.

    等价于执行下面的代码:

    -
    {% if product.title != "Awesome Shoes" %}
    These shoes are not awesome.
    {% endif %}
    +
    {% if product.title != "Awesome Shoes" %}
    These shoes are not awesome.
    {% endif %}
    diff --git a/zh-cn/tutorials/caching.html b/zh-cn/tutorials/caching.html index 0f3a22f05..e071794e7 100644 --- a/zh-cn/tutorials/caching.html +++ b/zh-cn/tutorials/caching.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    缓存

    -
    +
    @@ -95,19 +95,19 @@

    LiquidJS 在这一方面比较灵活,提供了多种不同的方式来达到提升性能的目的。

    手动缓存

    .parse(), .parseFile(), .parseFileSync() API 可以用来把字符串或文件解析成模板。得到的模板可以用不同的数据去重复地渲染得到不同的 HTML。

    从字符串解析:

    -
    var tpl = engine.parse('{{name | capitalize}}');

    engine.renderSync(tpl, {name: 'alice'}) // 'Alice'
    engine.renderSync(tpl, {name: 'bob'}) // 'Bob'
    +
    var tpl = engine.parse('{{name | capitalize}}');

    engine.renderSync(tpl, {name: 'alice'}) // 'Alice'
    engine.renderSync(tpl, {name: 'bob'}) // 'Bob'

    从文件解析:

    -
    var tpl = engine.parseFileSync('hello');    // contents of `hello.liquid`: {{name}}

    engine.renderSync(tpl, {name: 'alice'}) // 'Alice'
    engine.renderSync(tpl, {name: 'bob'}) // 'Bob'
    +
    var tpl = engine.parseFileSync('hello');    // contents of `hello.liquid`: {{name}}

    engine.renderSync(tpl, {name: 'alice'}) // 'Alice'
    engine.renderSync(tpl, {name: 'bob'}) // 'Bob'

    上述代码中字符串或文件只被解析了一次,可以反复利用去渲染不同的数据。有很多模板文件时可以把 tpl 变量存在 Map 中,后续再 .render() 时直接从 Map 中拿出解析好的模板去渲染。

    cache 选项

    如果你只用 .renderFile().renderFileSync() 也可以直接设置 [cache][cache] 选项,LiquidJS 会帮你缓存。

    -
    var { Liquid } = require('liquidjs');
    var engine = new Liquid({
    cache: true
    });

    // LiquidJS 将会解析 hello.liquid 然后用 {name: 'alice'} 渲染它
    engine.renderFileSync('hello', {name: 'alice'})

    // LiquidJS 会找到上次 hello.liquid 解析的结果模板,再用 {name: 'bob'} 渲染它
    engine.renderFileSync('hello', {name: 'bob'})
    +
    var { Liquid } = require('liquidjs');
    var engine = new Liquid({
    cache: true
    });

    // LiquidJS 将会解析 hello.liquid 然后用 {name: 'alice'} 渲染它
    engine.renderFileSync('hello', {name: 'alice'})

    // LiquidJS 会找到上次 hello.liquid 解析的结果模板,再用 {name: 'bob'} 渲染它
    engine.renderFileSync('hello', {name: 'bob'})
    @@ -116,7 +116,7 @@
    目录 -
    1. 手动缓存
    2. cache 选项
    +
    1. 手动缓存
    2. cache 选项
    回到顶部
    diff --git a/zh-cn/tutorials/contribution-guidelines.html b/zh-cn/tutorials/contribution-guidelines.html index 42d2f9b7f..bf119537e 100644 --- a/zh-cn/tutorials/contribution-guidelines.html +++ b/zh-cn/tutorials/contribution-guidelines.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,25 +87,26 @@

    贡献指南

    -
    +
    -

    Star on Github 👉 harttle/liquidjs

    Star 是支持 LiquidJS 最重要的方式,也是最简单的方式:通过提升排名来让更多人了解 LiquidJS,让它得到更好的改进。

    -

    发起 Pull Request

    代码风格:LiquidJS 采用 standard@typescript-eslint/recommended 规则,提交前确保可以通过风格检查:

    +

    Star on Github 👉 harttle/liquidjs

    Star 是支持 LiquidJS 最重要的方式,也是最简单的方式:通过提升排名来让更多人了解 LiquidJS,让它得到更好的改进。

    +

    发起 Pull Request

    代码风格:LiquidJS 采用 standard@typescript-eslint/recommended 规则,提交前确保可以通过风格检查:

    npm run lint

    测试:确保你改动之后测试仍然可以通过:

    npm test
    -

    提交消息:请遵守 Angular 提交消息规范,尤其注意 type 标识,semantic-release 机器人依赖这个标识自动发布。

    -

    成为赞助者!

    LiquidJS 是开源的、免费的,并且 没有 商业支持,也 没有 任何广告。如果你喜欢 LiquidJS 或你的公司在使用 LiquidJS,请考虑通过 Open CollectivePatreon 赞助,作为感谢你的名字和头像(或 Logo)会展示在这里和 Github README

    +

    提交消息:请遵守 Angular 提交消息规范,尤其注意 type 标识,semantic-release 机器人依赖这个标识自动发布。

    +

    向后兼容:请考虑向后(之前的旧的版本)兼容。LiquidJS 被用于很多层的软件,包括底层库、编译器、站点生成器、 Web 服务器。对多数最终用户来说,驱动或请求整个系统做一次主版本升级是很难办到的。

    +

    成为赞助者!

    LiquidJS 是开源的、免费的,并且 没有 商业支持,也 没有 任何广告。如果你喜欢 LiquidJS 或你的公司在使用 LiquidJS,请考虑通过 Open CollectivePatreon 赞助,作为感谢你的名字和头像(或 Logo)会展示在这里和 Github README

    -

    Become a Patron!

    +

    Become a Patron!

    @@ -114,7 +115,7 @@
    目录 -
    1. Star on Github 👉
    2. 发起 Pull Request
    3. 成为赞助者!
    +
    1. Star on Github 👉
    2. 发起 Pull Request
    3. 成为赞助者!
    回到顶部
    diff --git a/zh-cn/tutorials/differences.html b/zh-cn/tutorials/differences.html index 86b7f0986..3da2ef84b 100644 --- a/zh-cn/tutorials/differences.html +++ b/zh-cn/tutorials/differences.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,24 +87,24 @@

    和 Shopify/liquid 的区别

    -
    +
    -

    Shopify/liquid 中的所有标签和过滤器 LiquidJS 都支持,但不包括 Shopify 主题中业务逻辑相关的标签和过滤器(如果你在找这些标签可以参考 插件列表,也欢迎把你的插件添加到列表中)。尽管原则上我们尽力兼容于 Shopify/liquid,但仍然存在一些区别:

    +

    Shopify/liquid 中的所有标签和过滤器 LiquidJS 都支持,但不包括 Shopify 主题中业务逻辑相关的标签和过滤器(如果你在找这些标签可以参考 插件列表,也欢迎把你的插件添加到列表中)。尽管原则上我们尽力兼容于 Shopify/liquid,但仍然存在一些区别:

    diff --git a/zh-cn/tutorials/intro-to-liquid.html b/zh-cn/tutorials/intro-to-liquid.html index 64787f5aa..2f08141c8 100644 --- a/zh-cn/tutorials/intro-to-liquid.html +++ b/zh-cn/tutorials/intro-to-liquid.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,37 +87,37 @@

    Liquid 模板语言简介

    -
    +

    LiquidJS 是一个简单的、安全的、兼容 Shopify 的、纯 JavaScript 编写的模板引擎。这个项目的目的是为 JavaScript 社区提供一个 Liquid 模板引擎的实现。Liquid 最初用 Ruby 实现并用于 Github Pages, Jekyll 和 Shopify,参考 和 Shopify/liquid 的区别

    LiquidJS 语法相对简单。LiquidJS 中有两种标记:

    输出

    输出 用于转换和输出变量到 HTMl。下面的模板将会把 username 的值插入到 input 的 value

    -
    <input type="text" name="user" value="{{username}}">
    +
    <input type="text" name="user" value="{{username}}">

    输出 里的值可以在输出之前经过若干个 过滤器 的转换。比如在变量后面追加一个字符串:

    -
    {{ username | append: ", welcome to LiquidJS!" }}
    +
    {{ username | append: ", welcome to LiquidJS!" }}

    过滤器可以级联,用起来像管道一样:

    -
    {{ username | append: ", welcome to LiquidJS!" | capitalize }}
    +
    {{ username | append: ", welcome to LiquidJS!" | capitalize }}

    这里 是 LiquidJS 支持的完整的过滤器列表。

    标签

    标签 用于控制模板渲染过程,操作模板变量,和其他模板交互等。例如 assign 可以用来定义一个模板中可以使用的变量:

    -
    {% assign foo = "FOO" %}
    +
    {% assign foo = "FOO" %}

    一般标签成对地出现,一个开始标签和一个对应的结束标签,比如:

    -
    {% if foo == "FOO" %}
    Variable `foo` equals "FOO"
    {% else %}
    Variable `foo` not equals "FOO"
    {% endif %}
    +
    {% if foo == "FOO" %}
    Variable `foo` equals "FOO"
    {% else %}
    Variable `foo` not equals "FOO"
    {% endif %}

    这里 是 LiquidJS 支持的完整的标签列表。

    @@ -126,7 +126,7 @@
    目录 -
    1. 输出
    2. 标签
    +
    1. 输出
    2. 标签
    回到顶部
    diff --git a/zh-cn/tutorials/migrate-to-9.html b/zh-cn/tutorials/migrate-to-9.html index d8abc905e..e5630fcbe 100644 --- a/zh-cn/tutorials/migrate-to-9.html +++ b/zh-cn/tutorials/migrate-to-9.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    迁移到 LiquidJS 9

    -
    +
    @@ -97,25 +97,25 @@
  • 新的工具:Expression 和 Tokenizer
  • 修复

    性能

    不兼容的变更

    @@ -124,7 +124,7 @@
    目录 -
    1. 新特性
    2. 修复
    3. 性能
    4. 不兼容的变更
    +
    1. 新特性
    2. 修复
    3. 性能
    4. 不兼容的变更
    回到顶部
    diff --git a/zh-cn/tutorials/operators.html b/zh-cn/tutorials/operators.html index be02eb445..b0d968ee6 100644 --- a/zh-cn/tutorials/operators.html +++ b/zh-cn/tutorials/operators.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    运算符

    -
    +
    @@ -101,11 +101,11 @@
  • 比较运算符。所有比较运算符具有同样的优先级,且高于逻辑运算符。
  • 逻辑运算符。所有逻辑运算符具有同样的有衔接。
  • -

    结合性

    逻辑运算符是又结合的,所以连续的逻辑运算时计算顺序是从右向左,参考 Shopify 的文档。

    +

    结合性

    逻辑运算符是又结合的,所以连续的逻辑运算时计算顺序是从右向左,参考 Shopify 的文档。

    @@ -114,7 +114,7 @@
    目录 -
    1. 优先级
    2. 结合性
    +
    1. 优先级
    2. 结合性
    回到顶部
    diff --git a/zh-cn/tutorials/options.html b/zh-cn/tutorials/options.html index 7c04e7d80..6d737631b 100644 --- a/zh-cn/tutorials/options.html +++ b/zh-cn/tutorials/options.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,51 +87,54 @@

    选项

    -
    +

    Liquid 构造函数接受一个参数对象,用来定义各种模板引擎行为。这些参数都是可选的,比如我可以指定其中一个参数 cache

    -
    const { Liquid } = require('liquidjs')
    const engine = new Liquid({
    cache: true
    })
    +
    const { Liquid } = require('liquidjs')
    const engine = new Liquid({
    cache: true
    })
    API 文档

    下面的所有选项的概述,希望了解具体的类型和签名,请前往 LiquidOptions | API.

    cache

    cache 用来指定是否缓存曾经读取和处理过的模板来提升性能。在生产环境模板会重复渲染的情况会很有用。

    默认是 false,当设置为 true 时会启用一个大小为 1024 的 LRU 缓存。当然也可以传一个数字来指定缓存大小。此外还可以是一个自定义的缓存实现,LiquidJS 会通过它来查找和读写文件。详情请参考 Caching

    -

    dynamicPartials

    dynamicPartials 表示是否把传给 include, render, layout 标签的文件名当做变量处理。默认为 true。例如用上下文 { file: 'foo.html' } 渲染下面的模板将会引入文件 foo.html

    -
    {% include file %}
    +

    dynamicPartials

    dynamicPartials 表示是否把传给 include, render, layout 标签的文件名当做变量处理。默认为 true。例如用上下文 { file: 'foo.html' } 渲染下面的模板将会引入文件 foo.html

    +
    {% include file %}

    设置 dynamicPartials: false 后 LiquidJS 将会尝试去读取 file。当你的模板之间都是静态引入关系时会很有用:

    -
    {% liquid foo.html %}
    +
    {% liquid foo.html %}
    Common Pitfall

    LiquidJS 把这个选项默认值设为 true 以兼容于 shopify/liquid,但如果你在使用 eleventy 它会设置默认值 false (参考 Quoted Include Paths)以兼容于 Jekyll。

    extname

    extname 定义了默认的文件后缀,当传入文件名不包含后缀时自动追加。默认值是 '' 也就是说默认是禁用的。如果设置为 .liquid

    -
    {% render "foo" %}  没有后缀,添加 ".liquid" 并加载 foo.liquid
    {% render "foo.html" %} 已经有后缀了,直接加载 foo.html
    +
    {% render "foo" %}  没有后缀,添加 ".liquid" 并加载 foo.liquid
    {% render "foo.html" %} 已经有后缀了,直接加载 foo.html
    旧版行为

    在 2.0.1 之前,extname 默认值为 .liquid。要禁用它需要明确设置为 extname: ''。详情参考 #41

    root

    root 用来指定 LiquidJS 查找和读取模板的根目录。可以是单个字符串,也可以是一个数组 LiquidJS 会顺序查找。详情请参考 Render Files

    fs

    fs 用来自定义文件系统实现,详情请参考 Abstract File System

    -

    globals

    globals 用来定义对所有模板可见的全局变量。包括 render tag 引入的子模板,见 3185

    +

    globals

    globals 用来定义对所有模板可见的全局变量。包括 render tag 引入的子模板,见 3185

    jsTruthy

    jsTruthy 用来使用 Javascript 的真值判断,默认为 false 使用 Shopify 方式。

    例如,空字符串在 JavaScript 中为假(jsTruthytrue 时),在 Shopify 真值表中为真。

    +

    时间日期和时区

    timezoneOffset 用来指定一个和你当地时区不同的时区,所有日期和时间输出时都转换到这个指定的时区。例如设置 timezoneOffset: 0 将会把所有日期按照 UTC/GMT 00:00 来输出。

    +

    preserveTimezones 是一个布尔值,只影响时间戳字面量。当设置为 true 时,所有字面量的时间戳字符串会在输出时保持原状,即不论输入时采取怎样的时区,输出时仍然采用那一时区(和 Shopify Liquid 的行为一致)。注意这是一个解析器参数,渲染时传入的数据中的日期的输出不会受此参数影响。

    换行和缩进

    greedy, trimOutputLeft, trimOutputRight, trimTagLeft, trimTagRight 选项用来移除 Liquid 语法周围的换行和缩进,详情请参考 Whitespace Control

    自定义分隔符

    outputDelimiterLeft, outputDelimiterRight, tagDelimiterLeft, tagDelimiterRight 用来自定义 LiquidJS 中 标签和过滤器 的分隔符。例如设置了 outputDelimiterLeft: <%=, outputDelimiterRight: %> 后我们可以避免跟其他模板引擎冲突:

    -
    <%= username | append: ", welcome to LiquidJS!" %>
    +
    <%= username | append: ", welcome to LiquidJS!" %>

    严格模式

    strictFilters 用来启用过滤器的严格模式,如果设置为 true 过滤器不存在时解析会抛出异常。默认为 false,这时会跳过不存在的过滤器。

    strictVariables 用来启用变量严格模式。如果设置为 true 变量不存在时渲染会抛出异常,默认为 false 这时不存在的变量会被渲染为空字符串。

    不存在的标签

    不存在的标签总是会抛出一个解析异常,这一行为无法自定义。

    +

    参数顺序

    默认会忽略参数出现的顺序,例如 {% for i in (1..8) reversed limit:3 %} 里总是会先执行 limit 再执行 reversed,虽然 reversed 先出现。为了让 LiquidJS 按顺序执行参数,需要设置 orderedFilterParameterstrue。它的默认值为 false

    @@ -140,7 +143,7 @@
    目录 -
    1. cache
    2. dynamicPartials
    3. extname
    4. root
    5. fs
    6. globals
    7. jsTruthy
    8. 换行和缩进
    9. 自定义分隔符
    10. 严格模式
    +
    1. cache
    2. dynamicPartials
    3. extname
    4. root
    5. fs
    6. globals
    7. jsTruthy
    8. 时间日期和时区
    9. 换行和缩进
    10. 自定义分隔符
    11. 严格模式
    12. 参数顺序
    回到顶部
    diff --git a/zh-cn/tutorials/partials-and-layouts.html b/zh-cn/tutorials/partials-and-layouts.html index 0b9cefa58..1b85f3870 100644 --- a/zh-cn/tutorials/partials-and-layouts.html +++ b/zh-cn/tutorials/partials-and-layouts.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,24 +87,24 @@

    引用和继承

    -
    +

    引用模板片段

    对于如下两个模板文件:

    -
    // 文件:color.liquid
    color: '{{ color }}' shape: '{{ shape }}'

    // 文件:theme.liquid
    {% assign shape = 'circle' %}
    {% include 'color' %}
    {% include 'color' with 'red' %}
    {% include 'color', color: 'yellow', shape: 'square' %}
    +
    // 文件:color.liquid
    color: '{{ color }}' shape: '{{ shape }}'

    // 文件:theme.liquid
    {% assign shape = 'circle' %}
    {% include 'color' %}
    {% include 'color' with 'red' %}
    {% include 'color', color: 'yellow', shape: 'square' %}

    输出为:

    -
    color: '' shape: 'circle'
    color: 'red' shape: 'circle'
    color: 'yellow' shape: 'square'
    +
    color: '' shape: 'circle'
    color: 'red' shape: 'circle'
    color: 'yellow' shape: 'square'
    ".liquid" 文件扩展名

    如果设置了 extname: ".liquid" 选项,就可以省略 layout, renderinclude 里面文件名的 “.liquid” 后缀。详情请参考 extname 选项

    布局模板(模板继承)

    对于如下两个模板文件:

    -
    // 文件:default-layout.liquid
    Header
    {% block content %}My default content{% endblock %}
    Footer

    // 文件:page.liquid
    {% layout "default-layout" %}
    {% block content %}My page content{% endblock %}
    +
    // 文件:default-layout.liquid
    Header
    {% block content %}My default content{% endblock %}
    Footer

    // 文件:page.liquid
    {% layout "default-layout" %}
    {% block content %}My page content{% endblock %}

    渲染 page.liquid 将会输出:

    -
    Header
    My page content
    Footer
    +
    Header
    My page content
    Footer
    Block
    • 布局文件(父模板)中可以定义多个 block;
    • @@ -113,7 +113,7 @@
    @@ -122,7 +122,7 @@
    目录 -
    1. 引用模板片段
    2. 布局模板(模板继承)
    +
    1. 引用模板片段
    2. 布局模板(模板继承)
    回到顶部
    diff --git a/zh-cn/tutorials/plugins.html b/zh-cn/tutorials/plugins.html index e0a9f051f..e7a09438d 100644 --- a/zh-cn/tutorials/plugins.html +++ b/zh-cn/tutorials/plugins.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,30 +87,30 @@

    插件

    -
    +

    一组标签和过滤器可以封装为一个 插件,通常发包到 NPM 来方便使用。本文介绍如何创建和使用插件。

    编写插件

    LiquidJS 插件就是一个简单的函数,它的第一个参数是 Liquid 类,其中的 this 是它被注册到的 Liquid 实例。可以通过 this 来调用 Liquid API,比如 注册标签和过滤器

    现在我们来写一个插件并在其中注册一个过滤器,来把输入字符串转换为大写:

    -
    /**
    * Inside the plugin function, `this` refers to the Liquid instance.
    *
    * @param Liquid: provides facilities to implement tags and filters.
    */
    module.exports = function (Liquid) {
    this.registerFilter('upup', x => x.toUpperCase());
    }
    +
    /**
    * Inside the plugin function, `this` refers to the Liquid instance.
    *
    * @param Liquid: provides facilities to implement tags and filters.
    */
    module.exports = function (Liquid) {
    this.registerFilter('upup', x => x.toUpperCase());
    }

    把上述代码保存为 upup.js

    使用插件

    把插件传递给 .plugin() 方法即可注册插件,例如:

    -
    const engine = new Liquid()

    engine.plugin(require('./upup.js'));
    engine.parseAndRender('{{ "foo" | upup }}').then(console.log)
    +
    const engine = new Liquid()

    engine.plugin(require('./upup.js'));
    engine.parseAndRender('{{ "foo" | upup }}').then(console.log)

    上述代码将会输出 "FOO"

    -

    插件列表

    由于本仓库只包含 Shopify/liquid 核心仓库的标签和插件(参考 https://github.com/harttle/liquidjs#differences-and-limitations),Shopify 平台上特有的插件只能通过插件来使用。

    +

    插件列表

    由于本仓库只包含 Shopify/liquid 核心仓库的标签和插件(参考 https://github.com/harttle/liquidjs#differences-and-limitations),Shopify 平台上特有的插件只能通过插件来使用。

    这里是一个插件列表,欢迎添加你的插件(点击右上角编辑按钮):

    @@ -119,7 +119,7 @@
    目录 -
    1. 编写插件
    2. 使用插件
    3. 插件列表
    +
    1. 编写插件
    2. 使用插件
    3. 插件列表
    回到顶部
    diff --git a/zh-cn/tutorials/register-filters-tags.html b/zh-cn/tutorials/register-filters-tags.html index 328257b08..895e551e7 100644 --- a/zh-cn/tutorials/register-filters-tags.html +++ b/zh-cn/tutorials/register-filters-tags.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,29 +87,29 @@

    注册标签和过滤器

    -
    +
    -

    注册标签

    // 使用方式: {% upper name %}
    engine.registerTag('upper', {
    parse: function(tagToken, remainTokens) {
    this.str = tagToken.args; // name
    },
    render: async function(scope, hash) {
    var str = await this.liquid.evalValue(this.str, scope); // 'alice'
    return str.toUpperCase() // 'Alice'
    }
    });
    +

    注册标签

    // 使用方式: {% upper name %}
    engine.registerTag('upper', {
    parse: function(tagToken, remainTokens) {
    this.str = tagToken.args; // name
    },
    render: async function(scope, hash) {
    var str = await this.liquid.evalValue(this.str, scope); // 'alice'
    return str.toUpperCase() // 'Alice'
    }
    });
    -

    查看已有的标签实现:https://github.com/harttle/liquidjs/tree/master/src/builtin/tags

    -

    注册过滤器

    // 使用方式: {{ name | upper }}
    engine.registerFilter('upper', v => v.toUpperCase())
    +

    查看已有的标签实现:https://github.com/harttle/liquidjs/tree/master/src/builtin/tags

    +

    注册过滤器

    // 使用方式: {{ name | upper }}
    engine.registerFilter('upper', v => v.toUpperCase())

    过滤器的参数将会传递给上面注册的过滤器函数,从第二个参数开始(第一个参数是过滤器左侧的输入),例如:

    -
    // Usage: {{ 1 | add: 2, 3 }}
    engine.registerFilter('add', (initial, arg1, arg2) => initial + arg1 + arg2)
    +
    // Usage: {{ 1 | add: 2, 3 }}
    engine.registerFilter('add', (initial, arg1, arg2) => initial + arg1 + arg2)
    -

    查看已有的过滤器实现:https://github.com/harttle/liquidjs/tree/master/src/builtin/filters

    -

    反注册标签/过滤器

    有时可能需要禁用一些标签/过滤器(比如 #324),注册一个假的标签/过滤器并在里面抛出相应的错误即可。

    -
    // 禁用标签
    const disabledTag = {
    parse: function(token) {
    throw new Error(`tag "${token.name}" disabled`);
    }
    }
    engine.registerTag('include', disabledTag);

    // 禁用过滤器
    function disabledFilter(name) {
    return function () {
    throw new Error(`filter "${name}" disabled`);
    }
    }
    engine.registerFilter('plus', disabledFilter('plus'));
    +

    查看已有的过滤器实现:https://github.com/harttle/liquidjs/tree/master/src/builtin/filters

    +

    反注册标签/过滤器

    有时可能需要禁用一些标签/过滤器(比如 #324),注册一个假的标签/过滤器并在里面抛出相应的错误即可。

    +
    // 禁用标签
    const disabledTag = {
    parse: function(token) {
    throw new Error(`tag "${token.name}" disabled`);
    }
    }
    engine.registerTag('include', disabledTag);

    // 禁用过滤器
    function disabledFilter(name) {
    return function () {
    throw new Error(`filter "${name}" disabled`);
    }
    }
    engine.registerFilter('plus', disabledFilter('plus'));
    @@ -118,7 +118,7 @@
    目录 -
    1. 注册标签
    2. 注册过滤器
    3. 反注册标签/过滤器
    +
    1. 注册标签
    2. 注册过滤器
    3. 反注册标签/过滤器
    回到顶部
    diff --git a/zh-cn/tutorials/render-file.html b/zh-cn/tutorials/render-file.html index 457aaef19..6ff14533a 100644 --- a/zh-cn/tutorials/render-file.html +++ b/zh-cn/tutorials/render-file.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,55 +87,54 @@

    渲染文件

    -
    +

    一个典型的项目会有一个目录下都是模板,最方便的方式就是设置 LiquidJS 的 root 然后调用 .renderFile().renderFileSync() 来渲染其中的一个模板文件。

    渲染一个文件

    例如你有如下的目录结构:

    -
    .
    ├── index.js
    └── views/
    ├── hello.liquid
    └── world.liquid
    +
    .
    ├── index.js
    └── views/
    ├── hello.liquid
    └── world.liquid

    其中 hello.liquid 内容为:

    -
    name: {{name}}
    +
    name: {{name}}

    index.js 中可以这样渲染 hello.liquid:

    -
    var engine = new Liquid({
    root: path.resolve(__dirname, 'views/'), // 设置模板查找目录
    extname: '.liquid' // 添加后缀,默认为 "" 表示不添加后缀
    });
    // 将会读取并渲染 `views/hello.liquid`
    engine.renderFile("hello", {name: 'alice'}).then(console.log)
    +
    var engine = new Liquid({
    root: path.resolve(__dirname, 'views/'), // 设置模板查找目录
    extname: '.liquid' // 添加后缀,默认为 "" 表示不添加后缀
    });
    // 将会读取并渲染 `views/hello.liquid`
    engine.renderFile("hello", {name: 'alice'}).then(console.log)

    执行 node index.js 你将会得到类似这样的输出:

    -
    name: alice
    +
    name: alice
    -

    模板查找

    传递给 .renderFile(), .parseFile() .renderFileSync(), .parseFileSync() 这些 API 的模板名,
    以及传递给 include, layout 这些标签的模板名,将会根据 root 选项来查找。

    +

    模板查找

    传递给 .renderFile(), .parseFile() .renderFileSync(), .parseFileSync() 这些 API 的模板名,
    以及传递给 include, layout 这些标签的模板名,将会根据 root 选项来查找。

    root 可以设置为 string 类型的路径(见上面的例子), 也可以设置为一个字符串数组表示路径列表,这时 LiquidJS 将会按顺序去查找。例如:

    -
    var engine = new Liquid({
    root: ['views/', 'views/partials/'],
    extname: '.liquid'
    });
    +
    var engine = new Liquid({
    root: ['views/', 'views/partials/'],
    extname: '.liquid'
    });
    相对路径

    root 中使用相对路径将会被解释为相对于 cwd()(当前工作目录)。

    -当模板中引入子模板时(`{% render "foo" %}`),或者调用 `.renderFile('foo')` 时,LiquidJS 会依次查看如下几个文件,并渲染第一个存在的文件: - -- `cwd()`/views/foo.liquid -- `cwd()`/views/partials/foo.liquid - -如果上述文件都不存在,将会抛出一个 `ENOENT` 错误。 - +

    当模板中引入子模板时({% render "foo" %}),或者调用 .renderFile('foo') 时,LiquidJS 会依次查看如下几个文件,并渲染第一个存在的文件:

    + +

    如果上述文件都不存在,将会抛出一个 ENOENT 错误。

    示例

    在 Node.js 示例中展示了怎么渲染一个文件 liquidjs/demo/nodejs/

    -

    在浏览器中使用 LiquidJS 时,比如当前路径为 https://example.com/bar/index.html,只会去 root 数组中的第一个路径下获取,也就是这个文件:

    +

    在浏览器中使用 LiquidJS 时,比如当前路径为 https://example.com/bar/index.html,只会去 root 数组中的第一个路径下获取,也就是这个文件:

    如果获取失败(比如得到一个 404/500 错误)或网络错误,将会抛出一个 ENOENT 错误。

    示例

    在这个示例中展示了如何从网络获取并渲染一个模板文件 liquidjs/demo/browser/

    -

    文件系统接口

    LiquidJS 定义了一个文件系统接口(src/fs/ifs.ts),在 Node.js 下的默认实现是 src/fs/node.ts,在浏览器打包文件中的默认实现是 src/fs/browser.ts
    你可以通过创建 Liquid 时的 fs 参数来指定一个自定义实现来指定如何读取模板文件。比如从数据库里读取:

    -
    const engine = new Liquid({
    fs: {
    readFileSync (file) {
    return db.model('Template').findByIdSync(file).text
    },
    await readFile (file) {
    const template = await db.model('Template').findById(file)
    return template.text
    },
    existsSync () {
    return true
    },
    await exists () {
    return true
    },
    resolve(root, file, ext) {
    return file
    }
    }
    });
    +

    文件系统接口

    LiquidJS 定义了一个文件系统接口(src/fs/ifs.ts),在 Node.js 下的默认实现是 src/fs/node.ts,在浏览器打包文件中的默认实现是 src/fs/browser.ts
    你可以通过创建 Liquid 时的 fs 参数来指定一个自定义实现来指定如何读取模板文件。比如从数据库里读取:

    +
    const engine = new Liquid({
    fs: {
    readFileSync (file) {
    return db.model('Template').findByIdSync(file).text
    },
    await readFile (file) {
    const template = await db.model('Template').findById(file)
    return template.text
    },
    existsSync () {
    return true
    },
    await exists () {
    return true
    },
    resolve(root, file, ext) {
    return file
    }
    }
    });
    @@ -144,7 +143,7 @@
    目录 -
    1. 渲染一个文件
    2. 模板查找
    3. 文件系统接口
    +
    1. 渲染一个文件
    2. 模板查找
    3. 文件系统接口
    回到顶部
    diff --git a/zh-cn/tutorials/setup.html b/zh-cn/tutorials/setup.html index 27842ea05..47fc6d6ab 100644 --- a/zh-cn/tutorials/setup.html +++ b/zh-cn/tutorials/setup.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,7 +87,7 @@

    安装和使用

    -
    +
    @@ -95,20 +95,19 @@

    在 Node.js 里使用

    通过 NPM 安装:

    npm install --save liquidjs
    -
    var { Liquid } = require('liquidjs');
    var engine = new Liquid();

    engine
    .parseAndRender('{{name | capitalize}}', {name: 'alice'})
    .then(console.log); // 输出 'Alice'
    +
    var { Liquid } = require('liquidjs');
    var engine = new Liquid();

    engine
    .parseAndRender('{{name | capitalize}}', {name: 'alice'})
    .then(console.log); // 输出 'Alice'
    示例

    这里有一个 LiquidJS 在 Node.js 里使用的例子:liquidjs/demo/nodejs/.

    -LiquidJS 的类型定义也导出并发布到了 NPM 包里,写 TypeScript 的项目可以直接这样使用: - -
    import { Liquid } from 'liquidjs';
    const engine = new Liquid();

    engine
    .parseAndRender('{{name | capitalize}}', {name: 'alice'})
    .then(console.log); // 输出 'Alice'
    +

    LiquidJS 的类型定义也导出并发布到了 NPM 包里,写 TypeScript 的项目可以直接这样使用:

    +
    import { Liquid } from 'liquidjs';
    const engine = new Liquid();

    engine
    .parseAndRender('{{name | capitalize}}', {name: 'alice'})
    .then(console.log); // 输出 'Alice'
    示例

    这里有一个 LiquidJS 在 TypeScript 下的例子:liquidjs/demo/typescript/.

    在浏览器里使用

    LiquidJS 预先构建了 UMD Bundle,可以通过 jsDelivr CDN 来引用:

    -
    <script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.min.js"></script>     <!--生产环境-->
    <script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.umd.js"></script> <!--开发环境-->
    +
    <script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.min.js"></script>     <!--生产环境-->
    <script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.umd.js"></script> <!--开发环境-->
    示例

    这里有一个 jsFiddle 上的在线例子:jsfiddle.net/x43eb0z6,其源码也可以在 liquidjs/demo/browser/ 找到。

    @@ -117,16 +116,16 @@ LiquidJS 的类型定义也导出并发布到了 NPM 包里,写 TypeScript 的

    在命令行里使用

    你还可以在命令行里使用 LiquidJS:

    -
    echo '{{"hello" | capitalize}}' | npx liquidjs
    +
    echo '{{"hello" | capitalize}}' | npx liquidjs

    模板来自标准输入,数据则来自参数,这个参数可以是一个 JSON 文件的路径,也可以是一个 JSON 字符串:

    -
    echo 'Hello, {{ name }}.' | npx liquidjs '{"name": "Snake"}'
    +
    echo 'Hello, {{ name }}.' | npx liquidjs '{"name": "Snake"}'
    -

    其他

    @stevenanthonyrevo 还提供了一个 ReactJS demo,请参考 liquidjs/demo/reactjs/

    +

    其他

    @stevenanthonyrevo 还提供了一个 ReactJS demo,请参考 liquidjs/demo/reactjs/

    @@ -135,7 +134,7 @@ LiquidJS 的类型定义也导出并发布到了 NPM 包里,写 TypeScript 的
    目录 -
    1. 在 Node.js 里使用
    2. 在浏览器里使用
    3. 在命令行里使用
    4. 其他
    +
    1. 在 Node.js 里使用
    2. 在浏览器里使用
    3. 在命令行里使用
    4. 其他
    回到顶部
    diff --git a/zh-cn/tutorials/truthy-and-falsy.html b/zh-cn/tutorials/truthy-and-falsy.html index 6eb1a373e..d19dcefb5 100644 --- a/zh-cn/tutorials/truthy-and-falsy.html +++ b/zh-cn/tutorials/truthy-and-falsy.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,12 +87,12 @@

    真和假

    -
    +
    -

    虽然我们希望 Liquid 是平台无关的,但 JavaScript 版本和 Ruby 版本 仍然有很多区别,真值就是其中之一。

    -

    真值表

    根据 Shopify 的文档,Ruby 版本除了 falsenil 之外的所有值都是真,但 JavaScript 有完全不同的类型系统,比如我们有 undefined 类型,以及不区分 integerfloat,因此有些不同:

    +

    虽然我们希望 Liquid 是平台无关的,但 JavaScript 版本和 Ruby 版本 仍然有很多区别,真值就是其中之一。

    +

    真值表

    根据 Shopify 的文档,Ruby 版本除了 falsenil 之外的所有值都是真,但 JavaScript 有完全不同的类型系统,比如我们有 undefined 类型,以及不区分 integerfloat,因此有些不同:

    @@ -225,7 +225,7 @@ @@ -234,7 +234,7 @@
    目录 -
    1. 真值表
    2. 使用 JavaScript 真值
    +
    1. 真值表
    2. 使用 JavaScript 真值
    回到顶部
    diff --git a/zh-cn/tutorials/use-in-expressjs.html b/zh-cn/tutorials/use-in-expressjs.html index 09aab7154..79822fadd 100644 --- a/zh-cn/tutorials/use-in-expressjs.html +++ b/zh-cn/tutorials/use-in-expressjs.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,33 +87,33 @@

    在 Express.js 里使用

    -
    +
    -

    LiquidJS 可以用来作为 Express 的模板引擎。可以把 Liquid 设置到 view engine 选项上即可:

    -
    var { Liquid } = require('liquidjs');
    var engine = new Liquid();

    // 注册为 liquid 文件的模板引擎
    app.engine('liquid', engine.express());
    app.set('views', './views'); // 指定模板目录
    app.set('view engine', 'liquid'); // 把 liquid 文件设为默认模板
    +

    LiquidJS 可以用来作为 Express 的模板引擎。可以把 Liquid 设置到 view engine 选项上即可:

    +
    var { Liquid } = require('liquidjs');
    var engine = new Liquid();

    // 注册为 liquid 文件的模板引擎
    app.engine('liquid', engine.express());
    app.set('views', './views'); // 指定模板目录
    app.set('view engine', 'liquid'); // 把 liquid 文件设为默认模板
    示例

    这是一个在 Express.js 中使用 LiquidJS 的例子:liquidjs/demo/express/.

    -

    模板查找

    LiquidJS 仍然会去 root 指定的目录查找(参考 Render A Template File),也会去 Express.js 的 views 选项指定的目录里(上述例子中是 ./views)去查找。例如你有这样的目录结构:

    -
    .
    ├── views1/
    │ └── hello.liquid
    └── views2/
    └── world.liquid
    +

    模板查找

    LiquidJS 仍然会去 root 指定的目录查找(参考 Render A Template File),也会去 Express.js 的 views 选项指定的目录里(上述例子中是 ./views)去查找。例如你有这样的目录结构:

    +
    .
    ├── views1/
    │ └── hello.liquid
    └── views2/
    └── world.liquid

    LiquidJS 的模板 root 设置到了 views1,Express.js 的 views 设置到了 views2

    -
    var { Liquid } = require('liquidjs');
    var engine = new Liquid({
    root: './views1/'
    });

    app.engine('liquid', engine.express());
    app.set('views', './views2');
    app.set('view engine', 'liquid');
    +
    var { Liquid } = require('liquidjs');
    var engine = new Liquid({
    root: './views1/'
    });

    app.engine('liquid', engine.express());
    app.set('views', './views2');
    app.set('view engine', 'liquid');

    hello.liquidworld.liquid 两个文件都可以找到并且成功渲染:

    -
    res.render('hello')
    res.render('world')
    +
    res.render('hello')
    res.render('world')

    缓存

    直接把 cache 选项 设为 true 即可开启模板缓存,参考 缓存 一文。推荐在生产环境中开启缓存,可以用如下代码:

    -
    var { Liquid } = require('liquidjs');
    var engine = new Liquid({
    cache: process.env.NODE_ENV === 'production'
    });
    +
    var { Liquid } = require('liquidjs');
    var engine = new Liquid({
    cache: process.env.NODE_ENV === 'production'
    });

    cache 还可以是一个数字表示最大缓存的模板数量,也可以是一个自定义的缓存实现,详情请参考 cache 选项

    @@ -122,7 +122,7 @@
    目录 -
    1. 模板查找
    2. 缓存
    +
    1. 模板查找
    2. 缓存
    回到顶部
    diff --git a/zh-cn/tutorials/whitespace-control.html b/zh-cn/tutorials/whitespace-control.html index cacfaee38..84050d66e 100644 --- a/zh-cn/tutorials/whitespace-control.html +++ b/zh-cn/tutorials/whitespace-control.html @@ -36,8 +36,8 @@ - - + +
    @@ -63,7 +63,7 @@
    - Github + Github @@ -87,24 +87,24 @@

    空白字符控制

    -
    +

    为了让源代码缩进好看,我们会加很多空白字符比如把不会产生输出的标签也单独一行。LiquidJS 提供了空白字符控制机制,可以避免这些多余的空白字符输出到 HTML 中。

    通过标记的方式

    默认所有标签和输出的行,都会在行尾产生一个换行(\n),如果有缩进的话还会产生很多前导空格。例如:

    -
    {%  author = "harttle" %}
    {{ author }}
    +
    {%  author = "harttle" %}
    {{ author }}

    将会输出(注意前面的空行):

    -

    harttle
    +

    harttle
    -

    可以在标签和输出的标记里面加横线({{-, -}}, {%-, -%})来移除左侧/右侧的空白。例如:

    -
    {% assign author = "harttle" -%}
    {{ author }}
    +

    可以在标签和输出的标记里面加横线({{-`, `-}}`, `{%-, -%})来移除左侧/右侧的空白。例如:

    +
    {% assign author = "harttle" -%}
    {{ author }}

    将会输出:

    -
    harttle
    +
    harttle
    -

    这个例子中 -%} 移除了 assign 标签右侧的空白。

    +

    这个例子中 -%} 移除了 assign 标签右侧的空白。

    通过选项

    此外 LiquidJS 还提供了一系列选项来帮助扫代码式地移除空白:

    -

    LiquidJS 默认 不会 移除任何空白字符,也就是说上面几个选项的默认值都为 false。这几个选项的详情请参考 LiquidJS 选项

    -

    贪婪模式

    上述几个设置默认情况下会跨越换行(\n),如果你希望保留上下空行可以把 greedy 选项 关掉,这样遇到 \n 就会停止。为了和 shopify/liquid 一致该选项默认是打开的。

    +

    LiquidJS 默认 不会 移除任何空白字符,也就是说上面几个选项的默认值都为 false。这几个选项的详情请参考 LiquidJS 选项

    +

    贪婪模式

    上述几个设置默认情况下会跨越换行(\n),如果你希望保留上下空行可以把 greedy 选项 关掉,这样遇到 \n 就会停止。为了和 shopify/liquid 一致该选项默认是打开的。

    @@ -126,7 +126,7 @@
    目录 -
    1. 通过标记的方式
    2. 通过选项
    3. 贪婪模式
    +
    1. 通过标记的方式
    2. 通过选项
    3. 贪婪模式
    回到顶部