tune-basic-toolset
Version:
Basic toolset for tune
20 lines (17 loc) • 369 B
JavaScript
module.exports = async function init(node, args, ctx) {
if (node) {
return node;
}
const content = (args || "").trim();
// include file
if (content.indexOf("@") === 0) {
return {
type: "text",
read: async () => this.read(content.replace(/^@{1,2}/, ""))
}
}
return {
type: "text",
read: async () => content
}
}