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

12345678910111213
  1. 'use strict';
  2. module.exports = string => string.replace(/^[\r\n]+/, '').replace(/[\r\n]+$/, '');
  3. module.exports.start = string => string.replace(/^[\r\n]+/, '');
  4. module.exports.end = string => {
  5. let end = string.length;
  6. while (end > 0 && (string[end - 1] === '\r' || string[end - 1] === '\n')) {
  7. end--;
  8. }
  9. return end < string.length ? string.slice(0, end) : string;
  10. };