git ssb

2+

Dominic / pull-stream



Tree: 9e8b7714e605551f6eb22a0160194142cb7c3e47

Files: 9e8b7714e605551f6eb22a0160194142cb7c3e47 / util / prop.js

283 bytesRaw
1module.exports = function prop (key) {
2 return key && (
3 'string' == typeof key
4 ? function (data) { return data[key] }
5 : 'object' === typeof key && 'function' === typeof key.exec //regexp
6 ? function (data) { var v = key.exec(data); return v && v[0] }
7 : key
8 )
9}
10

Built with git-ssb-web