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.

index.js 387B

12345678910111213141516171819
  1. 'use strict';
  2. const shebangRegex = require('shebang-regex');
  3. module.exports = (string = '') => {
  4. const match = string.match(shebangRegex);
  5. if (!match) {
  6. return null;
  7. }
  8. const [path, argument] = match[0].replace(/#! ?/, '').split(' ');
  9. const binary = path.split('/').pop();
  10. if (binary === 'env') {
  11. return argument;
  12. }
  13. return argument ? `${binary} ${argument}` : binary;
  14. };