Dynamic module dustjs-linkedin

Index

Variables

Interfaces

Functions

Variables

filters: { [key: string]: (value: string) => string; }

(): (value: string) => string

Returns

(value: string) => string

helpers: { [key: string]: (chk: "dustjs-linkedin".Chunk, ctx: "dustjs-linkedin".Context, bodies?: any, params?: any) => any; }

(): (chk: "dustjs-linkedin".Chunk, ctx: "dustjs-linkedin".Context, bodies?: any, params?: any) => any

Returns

(chk: "dustjs-linkedin".Chunk, ctx: "dustjs-linkedin".Context, bodies?: any, params?: any) => any

Functions

compile(source: string, name: string, strip?: boolean): string

compile a template body into a string of JavaScript source code

strip

strip whitespaces from the output. Defaults to false.

Parameters

  • source: string

    the template string

  • name: string

    the name used to register the compiled template into the internal cache. See render().

  • strip?: boolean optional

Returns

string

compileFn(source: string, name?: string): Template

Compiles source directly into a JavaScript function that takes a context and an optional callback (see dust.renderSource). Registers the template under [name] if this argument is supplied.

Parameters

  • source: string

    the template string

  • name?: string optional

    the template name (optional).

Returns

Template

escapeHtml(html: string): string

Parameters

  • html: string

Returns

string

escapeJs(js: string): string

Parameters

  • js: string

Returns

string

loadSource(compiled: string): Template

Evaluates a compiled source string.

Parameters

  • compiled: string

Returns

Template

makeBase(global: any): Context

Manufactures a dust.Context instance with its global object set to object.

Parameters

  • global: any

    a plain object or an instance of dust.Context.

Returns

Context

makeBase(global: Context): Context

Parameters

Returns

Context

register(name: string, tmpl: Template)

register a template into the cache.

Parameters

  • name: string

    the unique template name.

  • tmpl: Template

    the template function.

render(name: string, context: any, callback: (err: any, out: string) => any): any

Renders the named template and calls callback on completion.context may be a plain object or an instance of dust.Context.

Parameters

  • name: string

    the template name.

  • context: any

    a plain object or an instance of dust.Context.

  • callback: (err: any, out: string) => any

Returns

any

render(name: string, context: Context, callback: (err: any, out: string) => any): any

Parameters

  • name: string
  • context: Context
  • callback: (err: any, out: string) => any

Returns

any

renderSource(source: string, context: any): Stream

Compiles and renders source, invoking callback on completion. If no callback is supplied this function returns a Stream object. Use this function when precompilation is not required.

Parameters

  • source: string

    the template string.

  • context: any

    a plain object or an instance of dust.Context.

Returns

Stream

renderSource(source: string, context: Context): Stream

Parameters

Returns

Stream

renderSource(source: string, context: any, callback: (err: any, out: string) => any)

Parameters

  • source: string
  • context: any
  • callback: (err: any, out: string) => any

renderSource(source: string, context: Context, callback: (err: any, out: string) => any)

Parameters

  • source: string
  • context: Context
  • callback: (err: any, out: string) => any

stream(name: string, context: any): Stream

Streams the named template. context may be a plain object or an instance of dust.Context. Returns an instance of dust.Stream.

Parameters

  • name: string

    the template name.

  • context: any

    a plain object or an instance of dust.Context.

Returns

Stream

stream(name: string, context: Context): Stream

Parameters

Returns

Stream