Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 

22 wiersze
512 B

  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var CSS = global.CSS;
  6. var env = process.env.NODE_ENV;
  7. var escapeRegex = /([[\].#*$><+~=|^:(),"'`])/g;
  8. exports['default'] = function (str) {
  9. // We don't need to escape it in production, because we are not using user's
  10. // input for selectors, we are generating a valid selector.
  11. if (env === 'production') return str;
  12. if (!CSS || !CSS.escape) {
  13. return str.replace(escapeRegex, '\\$1');
  14. }
  15. return CSS.escape(str);
  16. };