Splits astral symbol into surrogate pairs
MadLittleMods opened this issue Β· comments
The polyfill splits each unicode character(astral symbol) into their surrogate pairs while the native implementation keeps them intact.
var arrayFrom = require('array.from');
// ["π", "πΏ"]
const nativeResult = Array.from('ππΏ');
// ["οΏ½", "οΏ½", "οΏ½", "οΏ½"]
const polyfillResult = arrayFrom('ππΏ');
console.log(nativeResult, polyfillResult);
https://runkit.com/madlittlemods/58aaa693808777001350cf41
Relevant issues,
This works with the latest from the repo.
I suspect #33 fixed things up. Thanks @falsandtru π
@ljharb Friendly ping for timeline/todos on next npm release?
There's a bit of work to do before the master branch is ready for release. It likely won't be super soon.
v1.1.0 is now released which should contain all the latest fixes, and will iterate properly in every version of every engine.