Trường · Mustache

Trường · Mustache · helpers.mustache. Phương thức tạo · Ví dụ

helpers.mustache

Cài đặt trình tạo

Tạo dữ liệu để xem kết quả ở đây.

Tham số & Ví dụ

Replaces the {{placeholder}} patterns in the given string mustache style.

helpers.mustache(text: string | undefined, data: Record<string, string | Parameters<string['replace']>[1]>)
text
The template string to parse.
data
The data used to populate the placeholders. This is a record where the key is the template placeholder, whereas the value is either a string or a function suitable for String.replace().

Ví dụ

"Hello Avery"

Dùng dữ liệu tổng hợp trong môi trường kiểm thử.

Trình tạo liên quan

Khám phá kịch bản