level-codec
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -5,5 +5,5 @@ var encodings = require('./encodings'); | ||
module.exports = function decodeKey(key, optionObjects){ | ||
var encoding = walk(optionObjects, ['keyEncoding', 'encoding']) || 'utf8'; | ||
var encoding = walk(optionObjects, ['keyEncoding']) || 'utf8'; | ||
if (typeof encoding == 'string') encoding = encodings[encoding]; | ||
return encoding.decode(key); | ||
}; |
@@ -5,5 +5,5 @@ var encodings = require('./encodings'); | ||
module.exports = function encodeKey(key, optionObjects){ | ||
var encoding = walk(optionObjects, ['keyEncoding', 'encoding']) || 'utf8'; | ||
var encoding = walk(optionObjects, ['keyEncoding']) || 'utf8'; | ||
if (typeof encoding == 'string') encoding = encodings[encoding]; | ||
return encoding.encode(key); | ||
}; |
@@ -5,5 +5,5 @@ var encodings = require('./encodings'); | ||
module.exports = function keyAsBuffer(optionObjects){ | ||
var encoding = walk(optionObjects, ['keyEncoding', 'encoding']) || 'utf8'; | ||
var encoding = walk(optionObjects, ['keyEncoding']) || 'utf8'; | ||
if (typeof encoding == 'string') encoding = encodings[encoding]; | ||
return encoding.buffer; | ||
}; |
{ | ||
"name": "level-codec", | ||
"repository": "Level/codec", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Levelup's encoding logic", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5727