source: trip-planner-front/node_modules/postcss-selector-parser/dist/util/stripComments.js@ b738035

Last change on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 527 bytes
Line 
1"use strict";
2
3exports.__esModule = true;
4exports["default"] = stripComments;
5
6function stripComments(str) {
7 var s = "";
8 var commentStart = str.indexOf("/*");
9 var lastEnd = 0;
10
11 while (commentStart >= 0) {
12 s = s + str.slice(lastEnd, commentStart);
13 var commentEnd = str.indexOf("*/", commentStart + 2);
14
15 if (commentEnd < 0) {
16 return s;
17 }
18
19 lastEnd = commentEnd + 2;
20 commentStart = str.indexOf("/*", lastEnd);
21 }
22
23 s = s + str.slice(lastEnd);
24 return s;
25}
26
27module.exports = exports.default;
Note: See TracBrowser for help on using the repository browser.