String.prototype.codePoints
Less than 1 minute
String.prototype.codePoints
Module
Types
interface String {
codePoints(): Iterator<{ codePoint: number; position: number }>;
}
Entry points
core-js/proposals/string-code-points
core-js(-pure)/full/string/code-points
Example
for (let { codePoint, position } of "qwe".codePoints()) {
console.log(codePoint); // => 113, 119, 101
console.log(position); // => 0, 1, 2
}