string.js 523 B

123456789101112131415161718192021
  1. /*!
  2. {
  3. "name": "ES5 String",
  4. "property": "es5string",
  5. "notes": [{
  6. "name": "ECMAScript 5.1 Language Specification",
  7. "href": "https://www.ecma-international.org/ecma-262/5.1/"
  8. }],
  9. "polyfills": ["es5shim"],
  10. "authors": ["Ron Waldon (@jokeyrhyme)"],
  11. "tags": ["es5"]
  12. }
  13. !*/
  14. /* DOC
  15. Check if browser implements ECMAScript 5 String per specification.
  16. */
  17. define(['Modernizr'], function(Modernizr) {
  18. Modernizr.addTest('es5string', function() {
  19. return !!(String.prototype && String.prototype.trim);
  20. });
  21. });