UNPKG
verify-it
Version:
latest (2.4.0)
next (2.3.0-rc1)
2.4.0
2.3.3
2.3.2
2.3.1
2.3.0
2.3.0-rc1
2.2.0
2.1.0
2.0.1
2.0.0
1.2.1
1.1.0
1.0.1
1.0.0
Randomised test property/data generation for NodeJS
github.com/bbc/verify-it
bbc/verify-it
verify-it
/
src
/
function
/
getFunction.js
12 lines
(9 loc)
•
224 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
'use strict'
module
.
exports
=
(
parent, key
) =>
{
if
(parent && parent[key] &&
typeof
parent[key] ===
'function'
) {
/**
@type
{
typeof parent[key]
} */
const
value = parent[key]
return
value }
return
null
}