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.

indent-lines.js 438B

12345678910111213141516171819202122232425
  1. module.exports = indentLines
  2. var eol = /\r?\n|\r/g
  3. function indentLines(value, map) {
  4. var result = []
  5. var start = 0
  6. var line = 0
  7. var match
  8. while ((match = eol.exec(value))) {
  9. one(value.slice(start, match.index))
  10. result.push(match[0])
  11. start = match.index + match[0].length
  12. line++
  13. }
  14. one(value.slice(start))
  15. return result.join('')
  16. function one(value) {
  17. result.push(map(value, line, !value))
  18. }
  19. }