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

12345678910111213141516171819202122232425262728
  1. 'use strict'
  2. module.exports = factory
  3. var noop = Function.prototype
  4. var own = {}.hasOwnProperty
  5. // Handle values based on a property.
  6. function factory(key, options) {
  7. var settings = options || {}
  8. function one(value) {
  9. var fn = one.invalid
  10. var handlers = one.handlers
  11. if (value && own.call(value, key)) {
  12. fn = own.call(handlers, value[key]) ? handlers[value[key]] : one.unknown
  13. }
  14. return (fn || noop).apply(this, arguments)
  15. }
  16. one.handlers = settings.handlers || {}
  17. one.invalid = settings.invalid
  18. one.unknown = settings.unknown
  19. return one
  20. }