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

str 模块中的 str.include() 需要改名为 str.includes() #9

Closed
3 tasks done
cssmagic opened this issue Oct 30, 2015 · 0 comments
Closed
3 tasks done

str 模块中的 str.include() 需要改名为 str.includes() #9

cssmagic opened this issue Oct 30, 2015 · 0 comments
Milestone

Comments

@cssmagic
Copy link
Member

cssmagic commented Oct 30, 2015

背景

  • 在 ES6 的最终版当中,String#contains() 已经更名为 String#includes()
  • 本库启用独立的命名空间,不再需要兼容 Underscore.string 的 API。
  • Underscore 中有 _.includes(),是 _.contains() 的别名。

最终打算

  • 废除 str.include(),把 str.includes() 作为标准 API,并把 str.contains() 作为其别名。
  • 对本库的源码以及依赖本库的项目(CMUI、Haojing)做一下清查,最终只保留上述两个 API。
  • 更新文档。
@cssmagic cssmagic changed the title str-alt.js 中的 str.include() 需要增加别名 str.includes() str-alt.js 中的 str.include() 需要改名为 str.includes() May 4, 2016
@cssmagic cssmagic changed the title str-alt.js 中的 str.include() 需要改名为 str.includes() str 模块中的 str.include() 需要改名为 str.includes() May 4, 2016
@cssmagic cssmagic modified the milestone: 0.6 May 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant