Page MenuHomeSealhub

README.md
No OneTemporary

README.md

# Tempstream
Better templating in js:
- renders to a stream instead of a string, so for example an HTML response can start being sent before all of it is rendered
- takes promises as values and awaits them automatically
- takes arrays as values and joins them with `\n` automatically
## Usage:
```
lang=ts
import {tempstream} from "tempstream";
const name = Promise.resolve("John");
const result = tempstream/* HTML */`Hello, ${name}`; // returns a stream with "Hello, John"
```
## TODO
* remove Slots, as they don't have an actual use-case. Might be a good
reason to refactor the stream generation logic from scratch
* add a wrapper for `tempstream` called `html`, which escapes all
parameters within it

File Metadata

Mime Type
text/x-java
Expires
Fri, Nov 28, 14:49 (49 m, 18 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1077390
Default Alt Text
README.md (722 B)

Event Timeline