string.fromcodepoint
Version:
A robust & optimized `String.fromCodePoint` polyfill, based on the ECMAScript 6 specification.
18 lines (11 loc) • 352 B
JavaScript
/*! https://mths.be/fromcodepoint v1.0.0 by @mathias */
;
var define = require('define-properties');
var getPolyfill = require('./polyfill');
module.exports = function shimFromCodePoint() {
var polyfill = getPolyfill();
if (String.fromCodePoint !== polyfill) {
define(String, { fromCodePoint: polyfill });
}
return polyfill;
};