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.

settings.js 1.1KB

123456789101112131415161718192021222324
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. const path = require("path");
  4. const fsStat = require("@nodelib/fs.stat");
  5. const fs = require("./adapters/fs");
  6. class Settings {
  7. constructor(_options = {}) {
  8. this._options = _options;
  9. this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
  10. this.fs = fs.createFileSystemAdapter(this._options.fs);
  11. this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
  12. this.stats = this._getValue(this._options.stats, false);
  13. this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
  14. this.fsStatSettings = new fsStat.Settings({
  15. followSymbolicLink: this.followSymbolicLinks,
  16. fs: this.fs,
  17. throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
  18. });
  19. }
  20. _getValue(option, value) {
  21. return option !== null && option !== void 0 ? option : value;
  22. }
  23. }
  24. exports.default = Settings;