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.

createMatcher.js 670B

1234567891011121314151617181920212223242526
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var _multimatch = _interopRequireDefault(require("multimatch"));
  7. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  8. const path = require('path');
  9. var _default = pattern => {
  10. // Match everything if no pattern was given
  11. if (typeof pattern !== 'string' && !Array.isArray(pattern)) {
  12. return () => true;
  13. }
  14. const patterns = Array.isArray(pattern) ? pattern : [pattern];
  15. return file => (0, _multimatch.default)(path.normalize(file), patterns, {
  16. dot: true
  17. }).length > 0;
  18. };
  19. exports.default = _default;