first commit

This commit is contained in:
armansansd
2023-07-12 16:31:19 +01:00
commit 3424b1927b
23306 changed files with 2217776 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
/*!
{
"name": "ES6 Array",
"property": "es6array",
"notes": [{
"name": "unofficial ECMAScript 6 draft specification",
"href": "https://web.archive.org/web/20180825202128/https://tc39.github.io/ecma262/"
}],
"polyfills": ["es6shim"],
"authors": ["Ron Waldon (@jokeyrhyme)"],
"warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
"tags": ["es6"]
}
!*/
/* DOC
Check if browser implements ECMAScript 6 Array per specification.
*/
define(['Modernizr'], function(Modernizr) {
Modernizr.addTest('es6array', !!(Array.prototype &&
Array.prototype.copyWithin &&
Array.prototype.fill &&
Array.prototype.find &&
Array.prototype.findIndex &&
Array.prototype.keys &&
Array.prototype.entries &&
Array.prototype.values &&
Array.from &&
Array.of));
});
+22
View File
@@ -0,0 +1,22 @@
/*!
{
"name": "ES6 Arrow Functions",
"property": "arrow",
"authors": ["Vincent Riemer"],
"tags": ["es6"]
}
!*/
/* DOC
Check if browser implements ECMAScript 6 Arrow Functions per specification.
*/
define(['Modernizr'], function(Modernizr) {
Modernizr.addTest('arrow', function() {
try {
// eslint-disable-next-line
eval('()=>{}');
} catch (e) {
return false;
}
return true;
});
});
+22
View File
@@ -0,0 +1,22 @@
/*!
{
"name": "ES6 Collections",
"property": "es6collections",
"notes": [{
"name": "unofficial ECMAScript 6 draft specification",
"href": "https://web.archive.org/web/20180825202128/https://tc39.github.io/ecma262/"
}],
"polyfills": ["es6shim", "weakmap"],
"authors": ["Ron Waldon (@jokeyrhyme)"],
"warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
"tags": ["es6"]
}
!*/
/* DOC
Check if browser implements ECMAScript 6 Map, Set, WeakMap and WeakSet
*/
define(['Modernizr'], function(Modernizr) {
Modernizr.addTest('es6collections', !!(
window.Map && window.Set && window.WeakMap && window.WeakSet
));
});
+14
View File
@@ -0,0 +1,14 @@
/*!
{
"name": "ES5 String.prototype.contains",
"property": "contains",
"authors": ["Robert Kowalski"],
"tags": ["es6"]
}
!*/
/* DOC
Check if browser implements ECMAScript 6 `String.prototype.contains` per specification.
*/
define(['Modernizr', 'is'], function(Modernizr, is) {
Modernizr.addTest('contains', is(String.prototype.contains, 'function'));
});
+21
View File
@@ -0,0 +1,21 @@
/*!
{
"name": "ES6 Generators",
"property": "generators",
"authors": ["Michael Kachanovskyi"],
"tags": ["es6"]
}
!*/
/* DOC
Check if browser implements ECMAScript 6 Generators per specification.
*/
define(['Modernizr'], function(Modernizr) {
Modernizr.addTest('generators', function() {
try {
new Function('function* test() {}')();
} catch (e) {
return false;
}
return true;
});
});
+37
View File
@@ -0,0 +1,37 @@
/*!
{
"name": "ES6 Math",
"property": "es6math",
"notes": [{
"name": "unofficial ECMAScript 6 draft specification",
"href": "https://web.archive.org/web/20180825202128/https://tc39.github.io/ecma262/"
}],
"polyfills": ["es6shim"],
"authors": ["Ron Waldon (@jokeyrhyme)"],
"warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
"tags": ["es6"]
}
!*/
/* DOC
Check if browser implements ECMAScript 6 Math per specification.
*/
define(['Modernizr'], function(Modernizr) {
Modernizr.addTest('es6math', !!(Math &&
Math.clz32 &&
Math.cbrt &&
Math.imul &&
Math.sign &&
Math.log10 &&
Math.log2 &&
Math.log1p &&
Math.expm1 &&
Math.cosh &&
Math.sinh &&
Math.tanh &&
Math.acosh &&
Math.asinh &&
Math.atanh &&
Math.hypot &&
Math.trunc &&
Math.fround));
});
+28
View File
@@ -0,0 +1,28 @@
/*!
{
"name": "ES6 Number",
"property": "es6number",
"notes": [{
"name": "unofficial ECMAScript 6 draft specification",
"href": "https://web.archive.org/web/20180825202128/https://tc39.github.io/ecma262/"
}],
"polyfills": ["es6shim"],
"authors": ["Ron Waldon (@jokeyrhyme)"],
"warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
"tags": ["es6"]
}
!*/
/* DOC
Check if browser implements ECMAScript 6 Number per specification.
*/
define(['Modernizr'], function(Modernizr) {
Modernizr.addTest('es6number', !!(Number.isFinite &&
Number.isInteger &&
Number.isSafeInteger &&
Number.isNaN &&
Number.parseInt &&
Number.parseFloat &&
Number.isInteger(Number.MAX_SAFE_INTEGER) &&
Number.isInteger(Number.MIN_SAFE_INTEGER) &&
Number.isFinite(Number.EPSILON)));
});
+22
View File
@@ -0,0 +1,22 @@
/*!
{
"name": "ES6 Object",
"property": "es6object",
"notes": [{
"name": "unofficial ECMAScript 6 draft specification",
"href": "https://web.archive.org/web/20180825202128/https://tc39.github.io/ecma262/"
}],
"polyfills": ["es6shim"],
"authors": ["Ron Waldon (@jokeyrhyme)"],
"warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
"tags": ["es6"]
}
!*/
/* DOC
Check if browser implements ECMAScript 6 Object per specification.
*/
define(['Modernizr'], function(Modernizr) {
Modernizr.addTest('es6object', !!(Object.assign &&
Object.is &&
Object.setPrototypeOf));
});
+41
View File
@@ -0,0 +1,41 @@
/*!
{
"name": "ES6 Promises",
"property": "promises",
"caniuse": "promises",
"polyfills": ["es6promises"],
"authors": ["Krister Kari", "Jake Archibald"],
"tags": ["es6"],
"notes": [{
"name": "The ES6 promises spec",
"href": "https://github.com/domenic/promises-unwrapping"
},{
"name": "Chromium dashboard - ES6 Promises",
"href": "https://www.chromestatus.com/features/5681726336532480"
},{
"name": "JavaScript Promises: an Introduction",
"href": "https://developers.google.com/web/fundamentals/primers/promises/"
}]
}
!*/
/* DOC
Check if browser implements ECMAScript 6 Promises per specification.
*/
define(['Modernizr'], function(Modernizr) {
Modernizr.addTest('promises', function() {
return 'Promise' in window &&
// Some of these methods are missing from
// Firefox/Chrome experimental implementations
'resolve' in window.Promise &&
'reject' in window.Promise &&
'all' in window.Promise &&
'race' in window.Promise &&
// Older version of the spec had a resolver object
// as the arg rather than a function
(function() {
var resolve;
new window.Promise(function(r) { resolve = r; });
return typeof resolve === 'function';
}());
});
});
+26
View File
@@ -0,0 +1,26 @@
/*!
{
"name": "ES6 String",
"property": "es6string",
"notes": [{
"name": "unofficial ECMAScript 6 draft specification",
"href": "https://web.archive.org/web/20180825202128/https://tc39.github.io/ecma262/"
}],
"polyfills": ["es6shim"],
"authors": ["Ron Waldon (@jokeyrhyme)"],
"warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
"tags": ["es6"]
}
!*/
/* DOC
Check if browser implements ECMAScript 6 String per specification.
*/
define(['Modernizr'], function(Modernizr) {
Modernizr.addTest('es6string', !!(String.fromCodePoint &&
String.raw &&
String.prototype.codePointAt &&
String.prototype.repeat &&
String.prototype.startsWith &&
String.prototype.endsWith &&
String.prototype.includes));
});