rk.JS.method: Simple JavaScript method generator

View source: R/rk.JS.method.R

rk.JS.methodR Documentation

Simple JavaScript method generator

Description

Combines argument values into a JS method to append to an object call.

Usage

rk.JS.method(name, values = NULL, suffix = NULL, object = NULL, var = NULL)

Arguments

name

Character string, name of the mthod to call on the JS object.

values

Character vector, argument values for the method.

suffix

Character string, will be appended to the foll call as-is.

object

Either a character string (name of the JS object), a XiMpLe node (whose ID will be used), or an object of class rk.JS.var (whose JS name will be used).

var

Character string, name of a JS variable to define. This will also append ";" at the end of the generated string.

Value

A character string.

Examples

rk.JS.method("split", values="[[", suffix="[0]")

rkward-community/rkwarddev documentation built on May 9, 2022, 3:02 p.m.