string.fromcodepoint
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -1,4 +0,13 @@ | ||
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */ | ||
/*! http://mths.be/fromcodepoint v0.2.0 by @mathias */ | ||
if (!String.fromCodePoint) { | ||
(function() { | ||
var defineProperty = (function() { | ||
// IE 8 only supports `Object.defineProperty` on DOM elements | ||
try { | ||
var object = {}; | ||
var $defineProperty = Object.defineProperty; | ||
var result = $defineProperty(object, object, object) && $defineProperty; | ||
} catch(error) {} | ||
return result; | ||
}()); | ||
var stringFromCharCode = String.fromCharCode; | ||
@@ -43,4 +52,4 @@ var floor = Math.floor; | ||
}; | ||
if (Object.defineProperty) { | ||
Object.defineProperty(String, 'fromCodePoint', { | ||
if (defineProperty) { | ||
defineProperty(String, 'fromCodePoint', { | ||
'value': fromCodePoint, | ||
@@ -47,0 +56,0 @@ 'configurable': true, |
{ | ||
"name": "string.fromcodepoint", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "A robust & optimized `String.fromCodePoint` polyfill, based on the ECMAScript 6 specification.", | ||
@@ -5,0 +5,0 @@ "homepage": "http://mths.be/fromcodepoint", |
@@ -1,2 +0,2 @@ | ||
# ES6 `String.fromCodePoint` polyfill [![Build status](https://travis-ci.org/mathiasbynens/String.fromCodePoint.png?branch=master)](https://travis-ci.org/mathiasbynens/String.fromCodePoint) | ||
# ES6 `String.fromCodePoint` polyfill [![Build status](https://travis-ci.org/mathiasbynens/String.fromCodePoint.svg?branch=master)](https://travis-ci.org/mathiasbynens/String.fromCodePoint) | ||
@@ -39,5 +39,7 @@ An robust & optimized ES3-compatible polyfill for [the `String.fromCodePoint` method in ECMAScript 6](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.fromcodepoint). | ||
The tests for this repository [are now used by Mozilla](http://hg.mozilla.org/integration/mozilla-inbound/rev/2411714cd058), to help ensure their native `String.fromCodePoint` implementation is correct. | ||
## Author | ||
| [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](http://twitter.com/mathias "Follow @mathias on Twitter") | | ||
| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | | ||
|---| | ||
@@ -44,0 +46,0 @@ | [Mathias Bynens](http://mathiasbynens.be/) | |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5790
62
50