Skip to content

Several filters missing from filters/overview.html page #482

@pdehaan

Description

@pdehaan

Re: https://liquidjs.com/filters/overview.html

I noticed that the json filter wasn't listed in the table, so I wrote a quick little scraper that verified the sidebar links vs the table values.

TLDR: The at_least, at_most, compact, default, json, and size filters aren't listed in the table.

// From the DevTools console

// $$("table > tbody td+td").flatMap(td => td.innerText.split(", ")).sort()
const table43 = ['abs', 'append', 'capitalize', 'ceil', 'concat', 'date', 'divided_by', 'downcase', 'escape', 'escape_once', 'first', 'floor', 'join', 'last', 'lstrip', 'map', 'minus', 'modulo', 'newline_to_br', 'plus', 'prepend', 'remove', 'remove_first', 'replace', 'replace_first', 'reverse', 'round', 'rstrip', 'slice', 'sort', 'sort_natural', 'split', 'strip', 'strip_html', 'strip_newlines', 'times', 'truncate', 'truncatewords', 'uniq', 'upcase', 'url_decode', 'url_encode', 'where']

// $$(".sidebar-link+.sidebar-link").map(a => a.innerText)
const sidebar49 = ['abs', 'append', 'at_least', 'at_most', 'capitalize', 'ceil', 'compact', 'concat', 'date', 'default', 'divided_by', 'downcase', 'escape', 'escape_once', 'first', 'floor', 'join', 'json', 'last', 'lstrip', 'map', 'minus', 'modulo', 'newline_to_br', 'plus', 'prepend', 'remove', 'remove_first', 'replace', 'replace_first', 'reverse', 'round', 'rstrip', 'size', 'slice', 'sort', 'sort_natural', 'split', 'strip', 'strip_html', 'strip_newlines', 'times', 'truncate', 'truncatewords', 'uniq', 'upcase', 'url_decode', 'url_encode', 'where']

const missing = sidebar49.filter(filter => !table43.includes(filter));
console.log({missing}); // ['at_least', 'at_most', 'compact', 'default', 'json', 'size']

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions