git ssb

1+

Matt McKegg / mutant



Tree: 01e9e1d516a0bcf09d486425ab7cba0f919f5a1a

Files: 01e9e1d516a0bcf09d486425ab7cba0f919f5a1a / lib / add-lookup-methods.js

353 bytesRaw
1module.exports = function (target, lookup, checkUpdated) {
2 target.keys = function () {
3 checkUpdated && checkUpdated()
4 return Object.keys(lookup)
5 }
6
7 target.get = function (key) {
8 checkUpdated && checkUpdated()
9 return lookup[key]
10 }
11
12 target.has = function (key) {
13 checkUpdated && checkUpdated()
14 return key in lookup
15 }
16}
17

Built with git-ssb-web