Skip to main content


We use the abbreviation te to refer to the tagged template literal function, and all the helpers are available as properties on this function, so it's typically the only thing you need to import.

For ESM, import te:

import { te } from "tamedevil";

Or for CommonJS, require it:

const { te } = require("tamedevil");


// Here's a string we want to embed into the function:
const spec = "some string here";

// And here's a complex variable we want to use within the function's scope:
const source = new Source(/* ... */);

const toEval = te`\
const source = ${te.ref(source)};
return function plan($record) {
const $records = source.find(${te.lit(spec)});
return connection($records);

const plan =;

`function plan($record) {
const $records = source.find("some string here");
return connection($records);