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.

json.js 322B

1234567891011121314
  1. 'use strict';
  2. const fs = require('fs');
  3. const stripBom = require('strip-bom');
  4. module.exports = (module, filename) => {
  5. const content = fs.readFileSync(filename, 'utf8');
  6. try {
  7. module.exports = JSON.parse(stripBom(content));
  8. } catch (error) {
  9. error.message = `${filename}: ${error.message}`;
  10. throw error;
  11. }
  12. };