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.

jsonFormatter.js 472B

1234567891011121314151617181920
  1. 'use strict';
  2. /**
  3. * Omit any properties starting with `_`, which are fake-private
  4. *
  5. * @type {import('stylelint').Formatter}
  6. */
  7. module.exports = function jsonFormatter(results) {
  8. const cleanedResults = results.map((result) =>
  9. Object.entries(result)
  10. .filter(([key]) => !key.startsWith('_'))
  11. .reduce((/** @type {{ [key: string]: any }} */ obj, [key, value]) => {
  12. obj[key] = value;
  13. return obj;
  14. }, {}),
  15. );
  16. return JSON.stringify(cleanedResults);
  17. };