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

12345678910111213
  1. 'use strict';
  2. module.exports = function (str, sep) {
  3. if (typeof str !== 'string') {
  4. throw new TypeError('Expected a string');
  5. }
  6. sep = typeof sep === 'undefined' ? '_' : sep;
  7. return str
  8. .replace(/([a-z\d])([A-Z])/g, '$1' + sep + '$2')
  9. .replace(/([A-Z]+)([A-Z][a-z\d]+)/g, '$1' + sep + '$2')
  10. .toLowerCase();
  11. };