Compare commits

..

1 Commits
v1.5.0 ... main

Author SHA1 Message Date
AI Engineer
ebd14f7c62 feat: align JS exports to PascalCase (by AI) 2026-06-08 20:59:51 +08:00
2 changed files with 11 additions and 8 deletions

View File

@ -1,5 +1,8 @@
# CHANGELOG
## [Unreleased]
## v1.5.1 (2026-06-08)
- **JS 对齐**: 将所有注册到 `jsmod` 的导出方法名统一为 PascalCase`Int`, `FastInt`, `Byte`),以消除 JS 与 Go 调用体感上的摩擦。
## v1.5.0 (2026-05-10)
- 优化 `Bytes` 函数,提升随机生成健壮性。
- 完善 `TEST.md` 性能基准报告与功能测试覆盖。

View File

@ -6,20 +6,20 @@ import (
func init() {
jsmod.Register("rand", map[string]any{
"int": func(min, max int64) int64 {
"Int": func(min, max int64) int64 {
return Int(min, max)
},
"fastInt": func(min, max int64) int64 {
"FastInt": func(min, max int64) int64 {
return FastInt(min, max)
},
"float": func(min, max float64) float64 {
"Float": func(min, max float64) float64 {
return Float(min, max)
},
"fastFloat": func(min, max float64) float64 {
"FastFloat": func(min, max float64) float64 {
return FastFloat(min, max)
},
"byte": Byte,
"bytes": Bytes,
"perm": Perm,
"Byte": Byte,
"Bytes": Bytes,
"Perm": Perm,
})
}