Skip to content

Bars Specification 0.1.1 — 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

▶ Try it in the playground

{{ n | modulo: 1 }}

0.5

▶ Try it in the playground

Full fixture: transforms/transform-modulo.json