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.

blockString.js 710B

12345678910111213141516171819202122232425
  1. 'use strict';
  2. const beforeBlockString = require('./beforeBlockString');
  3. const hasBlock = require('./hasBlock');
  4. const rawNodeString = require('./rawNodeString');
  5. /** @typedef {import('postcss').Rule} Rule */
  6. /** @typedef {import('postcss').AtRule} AtRule */
  7. /**
  8. * Return a CSS statement's block -- the string that starts and `{` and ends with `}`.
  9. *
  10. * If the statement has no block (e.g. `@import url(foo.css);`),
  11. * return false.
  12. *
  13. * @param {Rule | AtRule} statement - postcss rule or at-rule node
  14. * @return {string | boolean}
  15. */
  16. module.exports = function (statement) {
  17. if (!hasBlock(statement)) {
  18. return false;
  19. }
  20. return rawNodeString(statement).slice(beforeBlockString(statement).length);
  21. };