Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为了兼容4字节unicode字符,charCodeAt改为codePointAt #72

Merged
merged 1 commit into from Jul 18, 2019

Conversation

abeet
Copy link
Contributor

@abeet abeet commented May 24, 2019

str.split('') 会将4字节unicode字符拆成两个字符,改为Array.from(str)
text.charCodeAt(0) 只会识别4字节unicode字符的前两个字节,改为text.codePointAt(0)

str.split('') 会将4字节unicode字符拆成两个字符,改为Array.from(str)
text.charCodeAt(0) 只会识别4字节unicode字符的前两个字节,改为text.codePointAt(0)
@junmer
Copy link
Contributor

junmer commented Jul 18, 2019

@abeet

TypeError: Object function Array() { [native code] } has no method 'from'

这个低版本 不支持哦,可以看下 如何兼容么?thx

@junmer
Copy link
Contributor

junmer commented Jul 18, 2019

@junmer junmer merged commit 3cfad1d into ecomfe:master Jul 18, 2019
junmer added a commit that referenced this pull request Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants