mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Add modulo filter
This commit is contained in:
@@ -218,6 +218,10 @@ module Liquid
|
||||
to_number(input) / to_number(operand)
|
||||
end
|
||||
|
||||
def modulo(input, operand)
|
||||
to_number(input) % to_number(operand)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def to_number(obj)
|
||||
|
||||
Reference in New Issue
Block a user