Compare commits
No commits in common. "main" and "v1.5.0" have entirely different histories.
@ -1,8 +1,5 @@
|
||||
# CHANGELOG
|
||||
|
||||
## v1.5.1 (2026-06-08)
|
||||
- **JS 对齐**: 将所有注册到 `jsmod` 的导出方法名统一为 PascalCase(如 `ToJSON`, `FromJSON`, `Now`),以消除 JS 与 Go 调用体感上的摩擦。
|
||||
|
||||
## [v1.2.9] - 2026-05-09
|
||||
### Changed
|
||||
- **移除第三方依赖**: 移除了对 `jsontag` 模块的依赖,统一使用标准库及自有基础设施对齐,增强了模块的独立性与长期稳定性。
|
||||
|
||||
24
js_export.go
24
js_export.go
@ -7,25 +7,25 @@ import (
|
||||
func init() {
|
||||
jsmod.Register("cast", map[string]any{
|
||||
// JSON
|
||||
"ToJSON": ToJSON,
|
||||
"PrettyToJSON": PrettyToJSON,
|
||||
"FromJSON": func(data any) (any, error) {
|
||||
"toJSON": ToJSON,
|
||||
"prettyJSON": PrettyToJSON,
|
||||
"fromJSON": func(data any) (any, error) {
|
||||
var res any
|
||||
err := UnmarshalJSON(data, &res)
|
||||
return res, err
|
||||
},
|
||||
|
||||
// Time
|
||||
"Now": Now,
|
||||
"ParseTime": ParseTime,
|
||||
"FormatTime": FormatTime,
|
||||
"AddTime": AddTime,
|
||||
"Duration": Duration,
|
||||
"DescribeDuration": DescribeDuration,
|
||||
"now": Now,
|
||||
"parseTime": ParseTime,
|
||||
"formatTime": FormatTime,
|
||||
"addTime": AddTime,
|
||||
"duration": Duration,
|
||||
"describeDuration": DescribeDuration,
|
||||
|
||||
// Logic
|
||||
"Split": Split,
|
||||
"SplitArgs": SplitArgs,
|
||||
"JoinArgs": JoinArgs,
|
||||
"split": Split,
|
||||
"splitArgs": SplitArgs,
|
||||
"joinArgs": JoinArgs,
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user