Extract and set form values through the DOM—no frameworks required! https://github.com/TheoryOfNekomata/formxtra
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

9 righe
315 B

  1. import fs from 'fs'
  2. import path from 'path'
  3. export const loadTemplate = async (templateName: string): Promise<string> => {
  4. const templatePath = path.join('test', 'fixtures', 'templates', `${templateName}.html`)
  5. const templateRaw = await fs.promises.readFile(templatePath)
  6. return templateRaw.toString('utf-8')
  7. }