Skip to content

Bars Specification 0.1.0 — Transform: modulo

Category: math · Since: 0.1.0

Remainder of dividing the input by an operand.

Returns the remainder of dividing the numeric input by operand. A zero divisor is a soft failure yielding null.

Input coercion: number

Arguments

Name Type Optional Default
operand number no

Arity: 1–1

Worked examples

{{ n | modulo: 3 }}

1
{{ n | modulo: 1 }}

0.5

Full fixture: transforms/transform-modulo.json