mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
* ✂️
* Add the slow version
* draw the rest of the owl
* Fix crash when allocating lots of memory
* [Bun.Transipiler] Support passing objects
* [JS Parser] Support passing objects to macros via Bun.Transpiler
* Update JSSQLStatement.cpp
* Embed SQLite
* Add SQLite to Dockerfile
* [sqlite] Add quick one-off queries without creating a whole object
* [sqlite] Add `columnsCount`, rename raw() to `values()`, remove `rebind`
* Implement `bun:sqlite`
* return null
* Fix updating query
* Update bun.d.ts
* more tests
* Support variadic arguments, write tests and add types
* Update sqlite.d.ts
* Update sqlite.d.ts
* latest
* Implement `Database.loadExtension` and `Database.setCustomSQLite`
* Support `require.resolve`
* [napi] Improve string performance
* [bun.js] Support some of `node:module`
* another test
* [sqlite] Support serialize & deserialize
* [`bun:ffi`] Implement `CFunction` and `linkSymbols`
* [bun.js] Fix crash in `Buffer.from`
* Update sqlite.test.js
* Document linkSymbols
* docs
* Update README.md
12 lines
566 B
JavaScript
12 lines
566 B
JavaScript
import { getProducts } from "macro:./getProducts.js";
|
|
import { isRoute } from "macro:./isRoute.js";
|
|
|
|
if (isRoute("/rickroll")) {
|
|
document.body.innerHTML = `<iframe src="https://www.youtube.com/embed/dQw4w9WgXcQ?autoplay=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>`;
|
|
} else if (isRoute("/products")) {
|
|
const products = getProducts({ ProductName: "name", Id: "id" });
|
|
document.body.innerHTML = `<ul>${products
|
|
.map(({ name, id }) => `<li>${name}</li>`)
|
|
.join("")}</ul>`;
|
|
}
|