martpet
martpet
DDeno
Created by martpet on 6/24/2024 in #help
Plain javascript in .js files in vscode
How can I have DOM suggestions in .js files, while having Deno suggestions in .ts files?
3 replies
DDeno
Created by martpet on 5/14/2024 in #help
Why cannot use emoji in variable name?
The module's source code could not be parsed: Unexpected character '💿' at file:///Users/
2 replies
DDeno
Created by martpet on 1/16/2024 in #help
How to use `f-partial` from Fresh?
Show me an example of using f-partial in a Deno Fresh project.
29 replies
DDeno
Created by martpet on 7/13/2023 in #help
Prefix Kv keys with a base part
Currently I add base() to all keys:
kv.set([base(), "foo"], value)
kv.set([base(), "foo"], value)
Instead of manually adding base() to every key, could there be a way to have it added by default, for all Kv methods?
6 replies
DDeno
Created by martpet on 6/29/2023 in #help
Deno KV: subtract with `sum` operation?
If I do .sum([key], 1n) the value is increased by 1. How can I decrease it? I tried .sum([key], -1n) but it doesn't work.
4 replies
DDeno
Created by martpet on 6/17/2023 in #help
Fresh: global state
Is it possible to have a global state that can be accessed from anywhere? Currently I'm passing the Request object to many deeply nested server-rendered components, because I need to read the request hostname from it. I wish there was a way I could skip passing it through props.
7 replies
DDeno
Created by martpet on 5/24/2023 in #help
Clear local KV store
How do I delete/clear the local database?
2 replies
DDeno
Created by martpet on 5/21/2023 in #help
How to auto import on save?
This doesn't work: { "deno.enable": true, "deno.lint": true, "deno.unstable": true, "editor.defaultFormatter": "denoland.vscode-deno", "deno.import_intellisense_origins": { "https://deno.land": true }, "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.addMissingImports": true, "source.organizeImports": true, "source.fixAll": true } }
2 replies