collections.js 713 B

12345678910111213141516171819202122
  1. /*!
  2. {
  3. "name": "ES6 Collections",
  4. "property": "es6collections",
  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", "weakmap"],
  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 Map, Set, WeakMap and WeakSet
  17. */
  18. define(['Modernizr'], function(Modernizr) {
  19. Modernizr.addTest('es6collections', !!(
  20. window.Map && window.Set && window.WeakMap && window.WeakSet
  21. ));
  22. });