ext

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package ext contains some useful extension operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOpRange

func AddOpRange(jl *jsonlogic.JSONLogic)

AddOpRange adds "range" operation to the JSONLogic instance. The op accept 1 to 3 numeric params and generate a range of numbers, examples:

  • {"range":null} -> []
  • {"range":0} -> []
  • {"range":2} -> [0,1]
  • {"range":-2} -> [0,-1]
  • {"range":[3,6]} -> [3,4,5]
  • {"range":[6,3]} -> [6,5,4]
  • {"range":[3,6,2]} -> [3,5]
  • {"range":[6,3,-2]} -> [6,4]

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL