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.

region.js 531B

1234567891011121314151617181920
  1. const { browsers } = require('./browsers')
  2. function unpackRegion(packed) {
  3. return Object.keys(packed).reduce((list, browser) => {
  4. let data = packed[browser]
  5. list[browsers[browser]] = Object.keys(data).reduce((memo, key) => {
  6. let stats = data[key]
  7. if (key === '_') {
  8. stats.split(' ').forEach(version => (memo[version] = null))
  9. } else {
  10. memo[key] = stats
  11. }
  12. return memo
  13. }, {})
  14. return list
  15. }, {})
  16. }
  17. module.exports = unpackRegion
  18. module.exports.default = unpackRegion