array.js 872 B

1234567891011121314151617181920212223242526272829
  1. /*!
  2. {
  3. "name": "ES6 Array",
  4. "property": "es6array",
  5. "notes": [{
  6. "name": "unofficial ECMAScript 6 draft specification",
  7. "href": "https://web.archive.org/web/20180825202128/https://tc39.github.io/ecma262/"
  8. }],
  9. "polyfills": ["es6shim"],
  10. "authors": ["Ron Waldon (@jokeyrhyme)"],
  11. "warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
  12. "tags": ["es6"]
  13. }
  14. !*/
  15. /* DOC
  16. Check if browser implements ECMAScript 6 Array per specification.
  17. */
  18. define(['Modernizr'], function(Modernizr) {
  19. Modernizr.addTest('es6array', !!(Array.prototype &&
  20. Array.prototype.copyWithin &&
  21. Array.prototype.fill &&
  22. Array.prototype.find &&
  23. Array.prototype.findIndex &&
  24. Array.prototype.keys &&
  25. Array.prototype.entries &&
  26. Array.prototype.values &&
  27. Array.from &&
  28. Array.of));
  29. });