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.

18 lines
327 B

4 years ago
'use strict'
var Buffer = require('buffer').Buffer
exports.test = function (key) {
return function test (impl) {
try {
impl.cmp(key, 0)
return true
} catch (err) {
return false
}
}
}
// Detect binary key support (IndexedDB Second Edition)
exports.bufferKeys = exports.test(Buffer.alloc(0))