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.

un-camel-case.js 298B

12345678910111213
  1. 'use strict';
  2. function unCamelCase(str) {
  3. return str.replace(/[\w-]+/g, (s) =>
  4. /^[A-Z]?[a-z]*(?:[A-Z][a-z]*)+$/.test(s)
  5. ? s
  6. .replace(/[A-Z]/g, (s) => '-' + s.toLowerCase())
  7. .replace(/^(o|ms|moz|khtml|epub|(\w+-?)*webkit)(?=-)/i, '-$1')
  8. : s,
  9. );
  10. }
  11. module.exports = unCamelCase;