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.

Sync.js 491B

123456789101112131415161718192021222324
  1. 'use strict'
  2. const Thenable = require('./Thenable')
  3. const unwrapSync = require('./unwrapSync')
  4. class Sync {
  5. run (executors) {
  6. const args = Array.from(arguments).slice(1)
  7. return new Thenable(() => executors.sync.apply(null, args))
  8. }
  9. all (arr) {
  10. return new Thenable(() => arr.map(value => unwrapSync(value)))
  11. }
  12. returns (value) {
  13. return new Thenable(() => value)
  14. }
  15. throws (reason) {
  16. return new Thenable(() => { throw reason })
  17. }
  18. }
  19. module.exports = Sync