Function
| Static Public Summary | ||
| public |
coerceArray(arr: *): {"type": *, "data": *} |
|
| public |
coercedArrayType(arr: *): string |
|
| public |
async collectArgs(func: *, call: *, hooks: *): {"args": *, "namedArgs": *} A helper method interpreting a given function definition following the function spec from TODO:link-to-func-specification |
|
| public |
compileFunction(name: *, decl: *, code: *, commentBlocks: *): * |
|
| public |
compileJavascript(code: *, options: {}): * |
|
| public |
extractDetailsFromError(error: *): {"type": string, "message": *, "line": *, "column": *} |
|
| public |
extractFunctionSpecFromDoc(doc: *): {"name": *, "title": *, "description": *, "summary": *, "examples": *, "params": *, "_return": *} |
|
| public |
findGlobals(ast: *, options: {}): * |
|
| public |
pack(value: *, opts: {}): {"type": *, "data": *} |
|
| public |
parseValue(text: *): * |
|
| public |
Get the type code for a value |
|
| public |
unpack(pkg: *): * |
|
Static Public
public coerceArray(arr: *): {"type": *, "data": *} source
import {coerceArray} from 'stencila-js/src/types.js'Params:
| Name | Type | Attribute | Description |
| arr | * |
Return:
| {"type": *, "data": *} |
public coercedArrayType(arr: *): string source
import {coercedArrayType} from 'stencila-js/src/types.js'Params:
| Name | Type | Attribute | Description |
| arr | * |
public async collectArgs(func: *, call: *, hooks: *): {"args": *, "namedArgs": *} source
import collectArgs from 'stencila-js/src/collectArgs.js'A helper method interpreting a given function definition following the function spec from TODO:link-to-func-specification
Params:
| Name | Type | Attribute | Description |
| func | * | ||
| call | * | ||
| hooks | * |
Return:
| {"args": *, "namedArgs": *} |
public compileFunction(name: *, decl: *, code: *, commentBlocks: *): * source
import compileFunction from 'stencila-js/src/compileFunction.js'Params:
| Name | Type | Attribute | Description |
| name | * | ||
| decl | * | ||
| code | * | ||
| commentBlocks | * |
Return:
| * |
public compileJavascript(code: *, options: {}): * source
import compileJavascript from 'stencila-js/src/compileJavascript.js'Params:
| Name | Type | Attribute | Description |
| code | * | ||
| options | {} |
|
Return:
| * |
public extractDetailsFromError(error: *): {"type": string, "message": *, "line": *, "column": *} source
import extractDetailsFromError from 'stencila-js/src/packError.js'Params:
| Name | Type | Attribute | Description |
| error | * |
public extractFunctionSpecFromDoc(doc: *): {"name": *, "title": *, "description": *, "summary": *, "examples": *, "params": *, "_return": *} source
import extractFunctionSpecFromDoc from 'stencila-js/src/extractFunctionSpecFromDoc.js'Params:
| Name | Type | Attribute | Description |
| doc | * |
Return:
| {"name": *, "title": *, "description": *, "summary": *, "examples": *, "params": *, "_return": *} |
public findGlobals(ast: *, options: {}): * source
import findGlobals from 'stencila-js/src/findGlobals.js'Params:
| Name | Type | Attribute | Description |
| ast | * | ||
| options | {} |
|
Return:
| * |
public pack(value: *, opts: {}): {"type": *, "data": *} source
import {pack} from 'stencila-js/src/types.js'Params:
| Name | Type | Attribute | Description |
| value | * | ||
| opts | {} |
|
Return:
| {"type": *, "data": *} |
public parseValue(text: *): * source
import parseValue from 'stencila-js/src/parseValue.js'Params:
| Name | Type | Attribute | Description |
| text | * |
Return:
| * |
public type(value: *): string source
import {type} from 'stencila-js/src/types.js'Get the type code for a value
Params:
| Name | Type | Attribute | Description |
| value | * | A JavaScript value |
public unpack(pkg: *): * source
import {unpack} from 'stencila-js/src/types.js'Params:
| Name | Type | Attribute | Description |
| pkg | * |
Return:
| * |
