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 368B

12345678910111213141516
  1. 'use strict';
  2. module.exports = input => {
  3. const LF = typeof input === 'string' ? '\n' : '\n'.charCodeAt();
  4. const CR = typeof input === 'string' ? '\r' : '\r'.charCodeAt();
  5. if (input[input.length - 1] === LF) {
  6. input = input.slice(0, input.length - 1);
  7. }
  8. if (input[input.length - 1] === CR) {
  9. input = input.slice(0, input.length - 1);
  10. }
  11. return input;
  12. };