Compare commits

...

2 Commits
v1.3.2 ... main

Author SHA1 Message Date
AI Engineer
ebd14f7c62 feat: align JS exports to PascalCase (by AI) 2026-06-08 20:59:51 +08:00
AI Engineer
81cac28e12 对齐 Tag v1.5.0 (By AI) 2026-06-03 20:10:03 +08:00
4 changed files with 12 additions and 11 deletions

View File

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

2
go.mod
View File

@ -2,4 +2,4 @@ module apigo.cc/go/rand
go 1.25.0 go 1.25.0
require apigo.cc/go/jsmod v1.0.0 require apigo.cc/go/jsmod v1.5.0

2
go.sum
View File

@ -1,2 +0,0 @@
apigo.cc/go/jsmod v1.0.0 h1:lVQMq0tCno4kbHlQ3j5wzsm+v24J+bznIoHxpton0pE=
apigo.cc/go/jsmod v1.0.0/go.mod h1:bmyeZtOAP/j5am+YRnaiM89smysK24K7ebk0koFtsSw=

View File

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