aboutsummaryrefslogtreecommitdiffstats
path: root/lib/debug.moon
blob: 1ce56cce917ed6b9f382df2433d1e322af6a3d84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import Op, ValueInput, EventInput, match from require 'core.base'

class out extends Op
  @doc: "(out [name-str?] value) - log value to the console"

  setup: (inputs) =>
    { name, value } = match 'str? any', inputs
    super
      name: name and ValueInput name
      value: ValueInput value

  tick: =>
    { :name, :value } = @unwrap_all!
    L\print if name then name, value else value

{
  :out
}