golang/javascript word count tool. Idealy support all modern languages
js, go开发语言版本的字数统计小工具,理论上支持中文,英文,日文等流行语言
node wordcount.go
# [ 'This', 'is', 'Tom', 'Zhu', '这', '是', '汤', '姆', '猪' ]
# 9
go run wordcount.go
# [This is Tom Zhu 这 是 汤 姆 猪] 9
JS code is taken from Tinymce v4
Golang code is simply a translation from JS code