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.

normalize-identifier.js 630B

123456789101112131415161718
  1. 'use strict'
  2. function normalizeIdentifier(value) {
  3. return (
  4. value // Collapse Markdown whitespace.
  5. .replace(/[\t\n\r ]+/g, ' ') // Trim.
  6. .replace(/^ | $/g, '') // Some characters are considered “uppercase”, but if their lowercase
  7. // counterpart is uppercased will result in a different uppercase
  8. // character.
  9. // Hence, to get that form, we perform both lower- and uppercase.
  10. // Upper case makes sure keys will not interact with default prototypal
  11. // methods: no object method is uppercase.
  12. .toLowerCase()
  13. .toUpperCase()
  14. )
  15. }
  16. module.exports = normalizeIdentifier