source: trip-planner-front/node_modules/postcss-discard-comments/dist/lib/commentRemover.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: 720 bytes
RevLine 
[6a3a178]1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = void 0;
7
8function CommentRemover(options) {
9 this.options = options;
10}
11
12CommentRemover.prototype.canRemove = function (comment) {
13 const remove = this.options.remove;
14
15 if (remove) {
16 return remove(comment);
17 } else {
18 const isImportant = comment.indexOf('!') === 0;
19
20 if (!isImportant) {
21 return true;
22 }
23
24 if (this.options.removeAll || this._hasFirst) {
25 return true;
26 } else if (this.options.removeAllButFirst && !this._hasFirst) {
27 this._hasFirst = true;
28 return false;
29 }
30 }
31};
32
33var _default = CommentRemover;
34exports.default = _default;
35module.exports = exports.default;
Note: See TracBrowser for help on using the repository browser.