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

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