Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
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.

findMediaOperator.js 521B

123456789101112131415161718192021222324
  1. // @ts-nocheck
  2. 'use strict';
  3. const rangeOperators = ['>=', '<=', '>', '<', '='];
  4. const styleSearch = require('style-search');
  5. module.exports = function (atRule, cb) {
  6. if (atRule.name.toLowerCase() !== 'media') {
  7. return;
  8. }
  9. const params = atRule.raws.params ? atRule.raws.params.raw : atRule.params;
  10. styleSearch({ source: params, target: rangeOperators }, (match) => {
  11. const before = params[match.startIndex - 1];
  12. if (before === '>' || before === '<') {
  13. return;
  14. }
  15. cb(match, params, atRule);
  16. });
  17. };