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.

basic.js 958B

123456789101112131415161718192021222324
  1. var isBuffer = require('../')
  2. var test = require('tape')
  3. test('is-buffer', function (t) {
  4. t.equal(isBuffer(Buffer.alloc(4)), true, 'new Buffer(4)')
  5. t.equal(isBuffer(Buffer.allocUnsafeSlow(100)), true, 'SlowBuffer(100)')
  6. t.equal(isBuffer(undefined), false, 'undefined')
  7. t.equal(isBuffer(null), false, 'null')
  8. t.equal(isBuffer(''), false, 'empty string')
  9. t.equal(isBuffer(true), false, 'true')
  10. t.equal(isBuffer(false), false, 'false')
  11. t.equal(isBuffer(0), false, '0')
  12. t.equal(isBuffer(1), false, '1')
  13. t.equal(isBuffer(1.0), false, '1.0')
  14. t.equal(isBuffer('string'), false, 'string')
  15. t.equal(isBuffer({}), false, '{}')
  16. t.equal(isBuffer([]), false, '[]')
  17. t.equal(isBuffer(function foo () {}), false, 'function foo () {}')
  18. t.equal(isBuffer({ isBuffer: null }), false, '{ isBuffer: null }')
  19. t.equal(isBuffer({ isBuffer: function () { throw new Error() } }), false, '{ isBuffer: function () { throw new Error() } }')
  20. t.end()
  21. })