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

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. module.exports = isTypedArray
  2. isTypedArray.strict = isStrictTypedArray
  3. isTypedArray.loose = isLooseTypedArray
  4. var toString = Object.prototype.toString
  5. var names = {
  6. '[object Int8Array]': true
  7. , '[object Int16Array]': true
  8. , '[object Int32Array]': true
  9. , '[object Uint8Array]': true
  10. , '[object Uint8ClampedArray]': true
  11. , '[object Uint16Array]': true
  12. , '[object Uint32Array]': true
  13. , '[object Float32Array]': true
  14. , '[object Float64Array]': true
  15. }
  16. function isTypedArray(arr) {
  17. return (
  18. isStrictTypedArray(arr)
  19. || isLooseTypedArray(arr)
  20. )
  21. }
  22. function isStrictTypedArray(arr) {
  23. return (
  24. arr instanceof Int8Array
  25. || arr instanceof Int16Array
  26. || arr instanceof Int32Array
  27. || arr instanceof Uint8Array
  28. || arr instanceof Uint8ClampedArray
  29. || arr instanceof Uint16Array
  30. || arr instanceof Uint32Array
  31. || arr instanceof Float32Array
  32. || arr instanceof Float64Array
  33. )
  34. }
  35. function isLooseTypedArray(arr) {
  36. return names[toString.call(arr)]
  37. }