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

12345678910111213141516171819
  1. 'use strict';
  2. const stripAnsi = require('strip-ansi');
  3. const charRegex = require('char-regex');
  4. const stringLength = string => {
  5. if (string === '') {
  6. return 0;
  7. }
  8. const strippedString = stripAnsi(string);
  9. if (strippedString === '') {
  10. return 0;
  11. }
  12. return strippedString.match(charRegex()).length;
  13. };
  14. module.exports = stringLength;