You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Symbol.js 805B

123456789101112131415161718192021222324
  1. // FIXME React Native does not polyfill Symbol at versions 0.39.2 or earlier.
  2. export default (global => {
  3. let clazz = global.Symbol;
  4. if (typeof clazz === 'undefined') {
  5. // XXX At the time of this writing we use Symbol only as a way to
  6. // prevent collisions in Redux action types. Consequently, the Symbol
  7. // implementation provided bellow is minimal and specific to our
  8. // purpose.
  9. const toString = function() {
  10. return this.join(''); // eslint-disable-line no-invalid-this
  11. };
  12. clazz = description => {
  13. const thiz = (description || '').split('');
  14. thiz.toString = toString;
  15. return thiz;
  16. };
  17. }
  18. return clazz;
  19. })(global || window || this); // eslint-disable-line no-invalid-this