Tag: vue
-
Debounce inside a Vue composable
In the Queerlit frontend, I keep a query object in vuex state, and there’s a helper function for modifying the query object and then immediately performing a search request. This helper lives in a composable, useSearch() in search.composable.js. The search function is debounced, because it may be issued multiple times, quickly in succession. This happens…
-
Streams in Vite
I’m trying to use N3 to parse and query Turtle files in a Vite/Vue 3 project. The N3 readme says “N3.js seamlessly works in browsers via webpack or browserify” and I had trouble interpreting what that would mean in a Vite context. I made an attempt at properly learning all about bundling, but I did…
-
Comma, comma & and
I recently had to concatenate author names with commas and an ampersand in the following manner: commaAnd([‘Emir Jong’]); // becomes: “Emir Jong” commaAnd([‘Kristian Josefsen’, ‘Tetyana Bohuňková’]); // becomes: “Kristian Josefsen & Tetyana Bohuňková” commaAnd([‘Luana Ferreira Carvalho’, ‘Jian Tu’, ‘Ambessa Afwerki’]); // becomes: “Luana Ferreira Carvalho, Jian Tu & Ambessa Afwerki” Here are a few implementations…
-
Push to deploy Vue app
With this workflow, my web space contains a git remote which, whenever pushed to, builds the Vue project and puts it on a public path.