Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
80724 views
1
// var B = require('../').Buffer
2
// var test = require('tape')
3
// var useragent = require('useragent')
4
// if (process.env.OBJECT_IMPL) B.TYPED_ARRAY_SUPPORT = false
5
6
7
// test('expected browsers get Uint8Array implementation', function (t) {
8
// if (typeof navigator === 'undefined') {
9
// t.pass('Not running in a browser -- skip this test')
10
// t.end()
11
// return
12
// }
13
// var agent = useragent.parse(navigator.userAgent)
14
// console.log('Family: ' + agent.family)
15
// console.log('Version: ' + agent.major + '.' + agent.minor)
16
17
// if ((agent.family === 'Chrome' && agent.major >= 7) ||
18
// (agent.family === 'Internet Explorer' && agent.major >= 10) ||
19
// (agent.family === 'Firefox' && agent.major >= 30) ||
20
// (agent.family === 'Opera' && agent.major >= 12) ||
21
// (agent.family === 'Safari' && agent.major === 5 && agent.minor === 1) ||
22
// (agent.family === 'Safari' && agent.major === 6)) {
23
// t.ok(B._useTypedArrays)
24
// } else {
25
// t.ok(!B._useTypedArrays)
26
// }
27
// t.end()
28
// })
29
30