Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/next_php/src/deps.ts>ejs.render

NextPHP is a web framework enabling you to write PHP in JavaScript.
Latest
function ejs.render
import { ejs } from "https://deno.land/x/next_php@1.1.2/src/deps.ts";
const { render } = ejs;

Render the given template of ejs.

If you would like to include options but not data, you need to explicitly call this function with data being an empty object or null.

Parameters

template: string
optional
data: Data
optional
opts: Options & { async: false; }

Returns

string

Parameters

template: string
data: Data | undefined
opts: Options & { async: true; }

Returns

Promise<string>

Parameters

template: string
data: Data | undefined
opts: Options & { async?: never | undefined; }

Returns

string

Parameters

template: string
optional
data: Data
optional
opts: Options

Returns

string | Promise<string>