Rscripts
Farmesdiol
Views: 310Executions: 41

Farmesdiol

Copy it, then tell others if it worked.
  • Keyless
  • Mobile untested

Advertisement

About this script

@{

var a = 1;

var b = 2;

}

Basic Calc

a + b = @(a + b){{ products

|> groupBy => it.Category

|> map => { Category: it.Key, MostExpensivePrice: it.max(p => p.UnitPrice) }

|> htmlDump }}{{#if test.isEven() }}

{{test}} is even

{{else}}

{{test}} is odd

{{/if}}```code

#if test.isEven()

`${test} is even`

else

`${test} is odd`

/if

```var context = new ScriptContext {

Args = { ... }, // Global Arguments available to all Scripts, Pages, Partials, etc

ScriptMethods = { ... }, // Additional Methods

ScriptBlocks = { ... }, // Additional Script Blocks

FilterTransformers = { .. }, // Additional Stream Transformers

PageFormats = { ... }, // Additional Text Document Formats

Plugins = { ... }, // Encapsulated Features e.g. Markdown, Protected or ServiceStack Features

ScanTypes = { ... }, // Auto register Methods, Blocks and Code Page Types

ScanAssemblies = { ... }, // Auto register all Methods, Blocks and Code Page Types in Assembly

}.Init();// render code statements

var output = context.RenderCode("now |> dateFormat('HH:mm:ss')");

// async

var output = await context.RenderCodeAsync

Advertisement