A place to share my dev notes.

Joined July 2023
最近在写 Discord 机器人,顺手写了个 Discord API 工具库。 虽然 discord.js 确实对新人很友好,我自己第一个写的 JS 程序就是基于 discord.js 的机器人。 但它就像是把简单的 Discord API 交互硬生生套了一层华丽昂贵的外壳 代价就是你的内存占用以及代码维护成本 github.com/defaultkavy/drocs…
1
164
默认@Dev retweeted
突然发现这个新出来的 css 的 text-box 属性就是强迫症和设计师的救赎啊。 css-tricks.com/almanac/prope… 传统 CSS 中,line-height 会产生“半行距”(half-leading):每行文本的上方和下方都会有额外的空白空间。这些空格很难精确控制,常导致文本对齐不准、按钮内文本垂直居中困难。 text-box 属性允许你精确修剪文本块容器的顶部和底部边缘的多余空格,实现光学平衡的对齐(如标题与图标完美对齐、按钮文本无额外空白等)。 css tricks 上的例子都很棒,大家可以去看看,不过对中文没有什么影响,基本上都是等高的。
2
22
1
130
12,595
Amateras v0.6.0 Release [New Module] Signal 1.26 kB (gzip 0.49 kB) Make reactive data so easy in JS. [Core] Reduce the size to 4.79 kB (gzip 2.20 kB) NPM: npmjs.com/amateras Release Note: github.com/defaultkavy/amate…
1
1
2
918
[I18n] Create the shortcut to dictionary path:
1
1
733
我玩了下这个屎山代码检测器 扫描了 Amateras 库的代码 结果看起来还行w 检测器:github.com/Done-0/fuck-u-cod…
1
694
Amateras v0.5.0 Release [New Module] IndexedDB Utility Library Build IDB in automatic and type safety, use modern APIs to make your coding experience better. 5.35 kB (gzip 2.03 kB) NPM: npmjs.com/amateras Release Note: github.com/defaultkavy/amate…
1
474
[New Module] Markdown Converter A simple and small library to handle your markdown text. 1.89 kB (gzip 0.67 kB)
385
Amateras v0.4.0 Release "amateras/i18n" provides a solution to manage text translations, you can write translations object in JS file, dynamic import them when the locale is set. NPM: npmjs.com/amateras Full Release Note: github.com/defaultkavy/amate…
1
1
1
295
What's new in v0.4.0? New I18n module with only 1.49 kB (gzip 0.57 kB). In this example code, all new features supported by amateras/core with only 5.64 kB (gzip 2.48 kB).
262
默认@Dev retweeted
We want to add a "used by" section on Elysia doc If you use Elysia at work, please let us know! Direct link in reply ↓
15
14
1
228
25,673
Bun v1.2.20 ships tomorrow. One of the last before Bun v1.3
10
4
2
301
25,215
超期待
this week we’re making bun use up to 10x less memory in long-running servers
1
1
179
Amateras v0.3.0 Release New Features - Nested array arguments are supported in content() method. - CSS preset colors - Multiple element builder - Element auto rebuild with Signal value changes. NPM: npmjs.com/amateras Full Release Note: github.com/defaultkavy/amate…
183
Amateras v0.2.0 更新 新增 Router 模块 - 模块体积仅有 2.92 kB(gzip 1.27 kB) - Nesting Routes - 支持页面代码逻辑分离 - Asyc Route,使用 import() 语法 - 支持路径变量和查询 NPM: npmjs.com/amateras
1
2
3
171
关于 Router 的使用方式示例: github.com/defaultkavy/amate…
67
Amateras v0.1.1 更新 完善 CSS 模块,实现在 JS 文件中编写样式,无需额外编译器。 - 模块体积仅有 3.74 kB(gzip 1.40 kB) - 自动生成 class name - 支持 Nesting,自动转化成传统 CSS selectors 以兼容旧浏览器 - CSS var 定义模块 - CSS keyframes 定义模块 NPM: npmjs.com/amateras
1
1
136
使用 keyframes 函数可定义多个 css keyframes,能直接被调用在 css animation-name 当中。
1
113
更多 amateras/css 详情:github.com/defaultkavy/amate…
50