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.

index.js 333B

1234567891011121314151617181920212223
  1. 'use strict';
  2. const arrify = value => {
  3. if (value === null || value === undefined) {
  4. return [];
  5. }
  6. if (Array.isArray(value)) {
  7. return value;
  8. }
  9. if (typeof value === 'string') {
  10. return [value];
  11. }
  12. if (typeof value[Symbol.iterator] === 'function') {
  13. return [...value];
  14. }
  15. return [value];
  16. };
  17. module.exports = arrify;