aboutsummaryrefslogtreecommitdiffstats
path: root/lib/debug.moon
blob: 4a22e100bf1cf1fa8ccef75f31511a0d9869284a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import Op, Input, 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 Input.value name
      value: Input.value value

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

{
  :out
}