mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-25 10:08:29 +02:00
Decouple core Yaak logic from Tauri (#354)
This commit is contained in:
15
crates/yaak-templates/index.ts
Normal file
15
crates/yaak-templates/index.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export * from './bindings/parser';
|
||||
import { Tokens } from './bindings/parser';
|
||||
import { escape_template, parse_template, unescape_template } from './pkg';
|
||||
|
||||
export function parseTemplate(template: string) {
|
||||
return parse_template(template) as Tokens;
|
||||
}
|
||||
|
||||
export function escapeTemplate(template: string) {
|
||||
return escape_template(template) as string;
|
||||
}
|
||||
|
||||
export function unescapeTemplate(template: string) {
|
||||
return unescape_template(template) as string;
|
||||
}
|
||||
Reference in New Issue
Block a user