默认@Dev (@defaultkavy_dev) profile picture

A place to share my dev notes.

Joined July 2023
Photo by 默认@Dev (@defaultkavy_dev)Photo by 默认@Dev (@defaultkavy_dev)Photo by 默认@Dev (@defaultkavy_dev)Photo by 默认@Dev (@defaultkavy_dev)Photo by 默认@Dev (@defaultkavy_dev)Photo by 默认@Dev (@defaultkavy_dev)Photo by 默认@Dev (@defaultkavy_dev)Photo by 默认@Dev (@defaultkavy_dev)Photo by 默认@Dev (@defaultkavy_dev)Photo by 默认@Dev (@defaultkavy_dev)
最近在写 Discord 机器人,顺手写了个 Discord API 工具库。 虽然 discord.js 确实对新人很友好,我自己第一个写的 JS 程序就是基于 discord.js 的机器人。 但它就像是把简单的 Discord API 交互硬生生套了一层华丽昂贵的外壳 代价就是你的内存占用以及代码维护成本 github.com/defaultkavy/drocs…
1
190
Amateras v0.10.0 我重写了整个框架 这是个为 JS 爱好者而生的 UI 框架 没有 JSX,没有编译器,没有 VDOM 和 Diffs 使用 Signal 响应式数据 支持 For、If、Match 控制流 可以直接在服务端运行,支持 SSR 上手试试:jsfiddle.net/a3epvbgL/34/ github.com/defaultkavy/amate… npmjs.com/amateras
1
1,670
默认@Dev retweeted
突然发现这个新出来的 css 的 text-box 属性就是强迫症和设计师的救赎啊。 css-tricks.com/almanac/prope… 传统 CSS 中,line-height 会产生“半行距”(half-leading):每行文本的上方和下方都会有额外的空白空间。这些空格很难精确控制,常导致文本对齐不准、按钮内文本垂直居中困难。 text-box 属性允许你精确修剪文本块容器的顶部和底部边缘的多余空格,实现光学平衡的对齐(如标题与图标完美对齐、按钮文本无额外空白等)。 css tricks 上的例子都很棒,大家可以去看看,不过对中文没有什么影响,基本上都是等高的。
2
22
1
130
12,598
[I18n] Create the shortcut to dictionary path:
1
1
743
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
929
我玩了下这个屎山代码检测器 扫描了 Amateras 库的代码 结果看起来还行w 检测器:github.com/Done-0/fuck-u-cod…
1
701
[New Module] Markdown Converter A simple and small library to handle your markdown text. 1.89 kB (gzip 0.67 kB)
391
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
481
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).
265
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
300
默认@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
227
25,674
Bun v1.2.20 ships tomorrow. One of the last before Bun v1.3
10
4
2
300
25,215
超期待
this week we’re making bun use up to 10x less memory in long-running servers
1
1
181
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…
185
关于 Router 的使用方式示例: github.com/defaultkavy/amate…
67
Amateras v0.2.0 更新 新增 Router 模块 - 模块体积仅有 2.92 kB(gzip 1.27 kB) - Nesting Routes - 支持页面代码逻辑分离 - Asyc Route,使用 import() 语法 - 支持路径变量和查询 NPM: npmjs.com/amateras
1
2
3
172
更多 amateras/css 详情:github.com/defaultkavy/amate…
50
使用 keyframes 函数可定义多个 css keyframes,能直接被调用在 css animation-name 当中。
1
113
使用 variables 函数可直接定义多个 css var,并且能被调用在任何 css 属性值。
1
46