We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81858b7 commit f295cfeCopy full SHA for f295cfe
lib/dict.js
@@ -1,24 +1,16 @@
1
var Dict = module.exports = function Dict() {
2
Object.defineProperty(this, "_keys", {
3
enumerable: false,
4
- value: {},
+ value: [],
5
})
6
}
7
8
Dict.prototype.binaryKeys = function binaryKeys() {
9
- return Object.keys(this._keys).map(function(e) {
10
- return Buffer(e, "hex")
11
- })
12
-}
13
-
14
-Dict.prototype.binaryGet = function binaryGet(key) {
15
- key = key.toString("hex")
16
17
- return this._keys[key] && this[this._keys[key]]
+ return this._keys.slice()
18
19
20
Dict.prototype.binarySet = function binarySet(key, value) {
21
- this._keys[key.toString("hex")] = key.toString()
+ this._keys.push(key)
22
23
this[key] = value
24
0 commit comments