【发布时间】:2016-01-01 19:00:20
【问题描述】:
基本上是在寻找与最新 Babel 一起使用的 "jdklajsdf".indexOf('d') !== -1 的替代品。也适用于数组。
【问题讨论】:
标签: node.js babeljs ecmascript-6
基本上是在寻找与最新 Babel 一起使用的 "jdklajsdf".indexOf('d') !== -1 的替代品。也适用于数组。
【问题讨论】:
标签: node.js babeljs ecmascript-6
是的。 String.prototype.includes 当然是 core-js(又名 babel-polyfill)。
【讨论】:
String.prototype.contains。我认为这很明显。
String.prototype.includes,你直接链接到它:)
.contains 是 nodejs 版本。你是对的。