getlang-dev / get

✨ A query language for the web 🌐
https://getlang.dev
Apache License 2.0
22 stars 0 forks source link

propagate context through module calls #10

Open mattfysh opened 2 months ago

mattfysh commented 2 months ago

related to #4

allows reusable logic to be embedded within a module and called from any contextual expression

Signal.get

inputs { text }

extract
  -> xpath:.//div[contains(@class, 'flex-row')][div[contains(text(), '$text')]]
  -> .signal-value > script
  -> @js
  -> Literal

Signals.get

import Signal

extract {
  from: $Signal({ text: "From" })
  buy_at: $Signal({ text: "Buy at" })
}
mattfysh commented 2 months ago

should also allow complex values to be passed between modules