UNPKG
fbz
Version:
latest (0.4.0)
0.4.0
0.3.0
0.2.0
0.1.0
Fork of the OpenBazaar 2.0 browser-based client.
localhost
Mentors4EDU/FBZ
fbz
/
src
/
util
/
propTypes.js
8 lines
(6 loc)
•
224 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
export
const
nonEmptyString
= (
props, propName, componentName
) => {
const
val = props[propName];
if
(
typeof
val !==
'string'
|| !val) {
return
new
Error
(
`
${propName}
must be provided as a non-empty string`
); } };