0x10FFFF need to be encoded as surrogate pairs. This encoding is known as UTF-16.
The purpose of this library is to treat surrogate pairs as one character when extracting substrings from a string. This might be preferable if indices are returned from an Unicode-compatible environment.
var unicodeSubstring = require('unicode-substring') // unicodeSubstring(string, start, end) unicodeSubstring("💥Emoji Rule💥", 0, 6) // => "💥Emoji"
end parameters behave similarly as String.prototype.substring.