Skip to content

Commit 16c38e3

Browse files
author
Adam Hollett
authored
Merge pull request TheAlgorithms#957 from Shopify/min-max-filter-docs
Add docs for at_least and at_most filters
2 parents aba4932 + 0589cf4 commit 16c38e3

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

filters/at_least.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: at_least
3+
description: Liquid filter that limits a number to a minimum value
4+
---
5+
6+
Limits a number to a minimum value.
7+
8+
<p class="code-label">Input</p>
9+
{% raw %}
10+
```liquid
11+
{{ 4 | at_least: 5 }}
12+
```
13+
{% endraw %}
14+
15+
<p class="code-label">Output</p>
16+
```
17+
5
18+
```
19+
20+
<p class="code-label">Input</p>
21+
{% raw %}
22+
```liquid
23+
{{ 4 | at_least: 3 }}
24+
```
25+
{% endraw %}
26+
27+
<p class="code-label">Output</p>
28+
```
29+
4
30+
```

filters/at_most.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: at_most
3+
description: Liquid filter that limits a number to a maximum value
4+
---
5+
6+
Limits a number to a maximum value.
7+
8+
<p class="code-label">Input</p>
9+
{% raw %}
10+
```liquid
11+
{{ 4 | at_most: 5 }}
12+
```
13+
{% endraw %}
14+
15+
<p class="code-label">Output</p>
16+
```
17+
4
18+
```
19+
20+
<p class="code-label">Input</p>
21+
{% raw %}
22+
```liquid
23+
{{ 4 | at_most: 3 }}
24+
```
25+
{% endraw %}
26+
27+
<p class="code-label">Output</p>
28+
```
29+
3
30+
```

0 commit comments

Comments
 (0)