Files: 6cbb0cdc8dd11c5f29e9c875e9f602f1d9a21f2a / lib / add-lookup-methods.js
256 bytesRaw
1 | module.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 |
Built with git-ssb-web